<?php
function get_img($cookies, $s)
{
for($i = 0;$i < 10; $i++)
{
$r = curl_get_img("http://mamba.ru/my/reg.phtml?image=1&sold=$s", $cookies, "", "", "");
$fp = fopen($i.".jpg","w+");
fputs($fp, $r);
$i + 1;
}
}
function get_reg_page()
{
$r = curl_get("http://mamba.ru/my/reg.phtml?1=1&set_cookies=no","","http://mamba.ru/my/reg.phtml","","");
$fp = fopen("1.txt","w+");
fputs($fp,$r);
$r = explode("|||",$r);
return $r[1];
}
function do_reg($cookies, $code)
{
global $name;
global $dlogin;
global $login;
global $mail;
$query = "SELECT * FROM `options` LIMIT 1";
$result = query($query);
$row = mysql_fetch_array($result);
$pass = htmlspecialchars($row['pass']);
$fp = file('data/city.txt');
$city = $fp[rand(0,(count($fp)-1))];
if($_POST['sex'] == 'm') $sex = "M";
if($_POST['sex'] == 'f') $sex = "F";
if($_POST['birth'] == '2') $birth = rand(date("Y",time())-20,date("Y",time())-18);
if($_POST['birth'] == '3') $birth = rand(date("Y",time())-25,date("Y",time())-20);
if($_POST['birth'] == '4') $birth = rand(date("Y",time())-30,date("Y",time())-25);
if($_POST['birth'] == '5') $birth = rand(date("Y",time())-40,date("Y",time())-30);
if($_POST['birth'] == '6') $birth = rand(date("Y",time())-50,date("Y",time())-40);
if($_POST['birth'] == '7') $birth = rand(date("Y",time())-80,date("Y",time())-50);
$r = curl_get("http://mamba.ru/my/reg.phtml", $cookies, "http://mamba.ru/my/reg.phtml","action=post&tcurl=&noerror=0&login=$login&genpass=0&password1=$pass&textpassword1=&password2=$pass&textpassword2=&email=$mail&name=$name&gender=$sex&birthday=".rand(10,20)."&birthmonth=0".rand(10,12)."&birthyear=".$birth."&city=$city&zipcode=&lookfor%5Bm%5D=on&check=$code&condition_accepted=1","");
$fp = fopen("3.txt","w+");
fputs($fp, $r);
if(strpos($r,'reg.phtml?image=1') == 0)
{
$query = "INSERT INTO `users` VALUES (NULL, '".clear($login)."', '".clear($pass)."')";
$result = mysql_query($query);
if($result)
{
echo $login."<br/>";
}
}
else
{
echo "False<br/>";
}
}
function curl_get($url, $cookies, $ref, $post, $proxy)
{
$cr = curl_init($url);
curl_setopt($cr, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)");
curl_setopt($cr, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cr, CURLOPT_REFERER, $ref);
curl_setopt($cr, CURLOPT_HEADER, 1);
curl_setopt($cr, CURLOPT_TIMEOUT, 50);
curl_setopt($cr, CURLOPT_COOKIE, $cookies);
curl_setopt($cr, CURLOPT_PROXY, "");
curl_setopt($cr, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($cr, CURLOPT_SSL_VERIFYHOST, 0);
if($post <> "")
{
curl_setopt($cr, CURLOPT_POST, 1);
curl_setopt($cr, CURLOPT_POSTFIELDS, $post);
}
$r = curl_exec($cr);
if(curl_error($cr))
{
return "error";
exit;
}
curl_close($cr);
$cookies = "";
$cook = explode("Set-Cookie:",$r);
if(count($cook) <> 1)
for($i=1;$i<count($cook);$i++)
$cookies.=SubStR($cook[$i],0,StrPos($cook[$i],";")+1);
//$r = str_replace('</td><td><img align="left" src="', '</td><td><img align="left" src="1.jpg', $r);
return $r."|||".$cookies;
}
function curl_get_img($url,$cookies,$ref,$post,$proxy)
{
$cr = curl_init($url);
curl_setopt($cr, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)");
curl_setopt($cr, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cr, CURLOPT_REFERER, $ref);
// curl_setopt($cr, CURLOPT_HEADER, 1);
curl_setopt($cr, CURLOPT_TIMEOUT, 150);
curl_setopt($cr, CURLOPT_COOKIE, $cookies);
curl_setopt($cr, CURLOPT_PROXY, "");
curl_setopt($cr, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($cr, CURLOPT_SSL_VERIFYHOST, 0);
if($post <> "")
{
curl_setopt($cr, CURLOPT_POST, 1);
curl_setopt($cr, CURLOPT_POSTFIELDS, $post);
}
$r = curl_exec($cr);
if (curl_error($cr))
{
return "error";
exit;
}
curl_close($cr);
$cookies = "";
$cook = explode("Set-Cookie:",$r);
if(count($cook) <> 1)
for ($i = 1;$i < count($cook); $i++)
$cookies .= substr($cook[$i],0,strpos($cook[$i],";")+1);
return $r;
}
?>
|