1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[TUTORIAL]How to run a "Javascript" on web browsers and monitor the requests.

Discussion in 'Black Hat SEO' started by RushingWind, May 1, 2013.

  1. RushingWind

    RushingWind Elite Member

    Joined:
    Apr 6, 2013
    Messages:
    2,416
    Likes Received:
    3,333
    Do you have a "Javascript" or a .js file that requires execution but you don't know how?

    Well you've come to the right place. In this tutorial I will be showing all of you how to run a "Javascript" in a web browser like chrome, safari, opera etc and monitoring the requests with fiddler.

    Steps to follow :-

    1) Make a sample html document like the following :

    Code:
    <!DOCTYPE html>
    <html>
    <body>
    [B][SIZE=4]
    YOUR JAVASCRIPT HERE!!!!
    
    [/SIZE][/B]</body>
    </html>
    2) Enter your Javascript which usually starts with "<script type='text/javascript'>" and ends with "</script>" in the area mentioned as "YOUR JAVASCRIPT HERE!!!!". You must not forget the "<script type='text/javascript'>" and the "</script>" or the "Javascript" will not execute properly.

    3) For this exact purpose, I will be using a YouTube views script as an example. Don't bother trying it out to get views as it's already patched.

    Ex :-

    Code:
    <!DOCTYPE html>
    <html>
    <body>
    <script type='text/javascript'>
    function rS(len) {
        var ch = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
        var ret = '';
        for (var i = 0; i < len; i++) {
            var rnum = Math.floor(Math.random() * ch.length);
            ret += ch.substring(rnum, rnum + 1);
        }
        return ret;
    }
    
    
    
    
    //VIDEO_ID
    var docid='ym2TbhtXRUQ';
    //Lenght seconds
    var len=30;
    //Random rt + Lenght seconds
    var rt=Math.floor(Math.random() * 20) + len;
    
    
    
    
    for(var i=0;i<4;i++){
     //plid
     var plid=rS(16);
     document.write('<script type="text/javascript" src="http://video.google.com/s?docid='+docid+'&app=youtube_gdata&ns=yt&len='+len+'&el=embedded&ps=android&rt='+rt+'.0&plid='+plid+'&av=2516_10&sw=0.1&playback=1&st=0.0&et='+len+'&sourceid=y&eurl=http://twitter.com/&fmt=18"><\/script>')
    }
    
    
    
    
    </script>
    </body>
    </html>
    
    4) Now the save the file as "whatsover.html" or "whatsoever.htm".

    5) Right - Click on the file and open with "Chrome" or any other browser.

    6) Before you do that be sure to keep fiddler open to monitor the web requests.

    Voila, you're done! The same method can be applied if you want the "Javascript" to run on a blog or a website.
    Cheers,
    RushingWind.
     
    • Thanks Thanks x 1
  2. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,062
    Likes Received:
    2,872
    Gender:
    Male
    Try the console instead. Simple and hassle free...
     
    • Thanks Thanks x 1
  3. RushingWind

    RushingWind Elite Member

    Joined:
    Apr 6, 2013
    Messages:
    2,416
    Likes Received:
    3,333
    Erm I'm not sure I get you :)
     
  4. Gozpy

    Gozpy Regular Member

    Joined:
    Nov 18, 2008
    Messages:
    244
    Likes Received:
    64
    Ctrl + shift + k - in my Firefox version :)

    But I don't really understand all the hassle. JavaScript is meant to be executed by your browser. How else would you execute it? And how/why would you write a JavaScript script if you didn't knew how to execute it? And last, you don't even need the HTML tags, so how does this tutorial help anyone?
     
    • Thanks Thanks x 1
    Last edited: May 1, 2013
  5. RushingWind

    RushingWind Elite Member

    Joined:
    Apr 6, 2013
    Messages:
    2,416
    Likes Received:
    3,333
    This tutorial is not for those who write js but those who download javascripts and don't know how to execute it.
     
  6. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,062
    Likes Received:
    2,872
    Gender:
    Male
    I am talking about testing. Suppose you have a client's site which you don't yet have access to, or you are testing out a function which is not working properly because you did not bind it to a browser event. In these cases, you can directly run the javascript from your console. I use firebug by the way.
     
    • Thanks Thanks x 1
  7. Gozpy

    Gozpy Regular Member

    Joined:
    Nov 18, 2008
    Messages:
    244
    Likes Received:
    64
    Oh, that's a good suggestion. :)
     
  8. RushingWind

    RushingWind Elite Member

    Joined:
    Apr 6, 2013
    Messages:
    2,416
    Likes Received:
    3,333
    I see. I just wanted to help some newbies.
    Cheers :)
     
    • Thanks Thanks x 1
  9. RushingWind

    RushingWind Elite Member

    Joined:
    Apr 6, 2013
    Messages:
    2,416
    Likes Received:
    3,333
    It sure is :)