尝试这个:
短信.php
?><?php
echo "<title>Ultoo SmS Sender | PRaman.TK</title>";
?>
<?php
$username = $_POST['uid'];
$password = $_POST['pwd'];
$tomob = $_POST['to'];
$c = $_REQUEST['recaptcha_challenge_field'];
$cv = $_REQUEST['recaptcha_response_field'];
$cookie = tempnam("/coki", "CURLCOOKIE");
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://sms.ultoo.com/login.php");
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie);
curl_setopt($ch,CURLOPT_HEADER,1);
curl_setopt($ch,CURLOPT_VERBOSE,1);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_REFERER,"http://sms.ultoo.com/login.php");
$one=curl_exec($ch);
preg_match("/input name=\"(.*?)\" type=\"text\" class=\"existing_user round_four\" id=/i",$one,$matches);
$user = $matches[1];
preg_match("/input name=\"(.*?)\" type=\"password\" class=\"existing_user round_four\" id=/i",$one,$matches);
$pass = $matches[1];
$post_data = "$user=$username&$pass=$password&RememberMe=1&submit2=LOGIN HERE";
$url = "http://sms.ultoo.com/login.php";
$cookie = tempnam("/coki", "CURLCOOKIE");
$ch = curl_init();
curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/7.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0" );
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
curl_setopt( $ch, CURLOPT_ENCODING, "" );
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
$ct = curl_exec( $ch );
if(stristr($ct,"number & password"))
{
echo "<font color='red'><b>Invalid mobile number / password. Try Again With Correct Details.</b></font>";
}
else
{
if(stristr($ct,"secure.php"))
{
$post_data2 = "recaptcha_challenge_field=$c&recaptcha_response_field=$cv";
curl_setopt($ch, CURLOPT_URL,"http://sms.ultoo.com/secure.php?zxcoiesesscd=");
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_REFERER, "http://sms.ultoo.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$dt = curl_exec($ch);
if(!stristr($dt,"mywallet.php"))
{
die("<font color='red'><b>Invalid Captcha. Try Again.</b></font>");
}
}
curl_setopt($ch, CURLOPT_URL,"http://sms.ultoo.com/home.php?zxcoiesesscd=");
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_REFERER, "http://sms.ultoo.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$dt = curl_exec($ch);
preg_match_all("/document.getElementById(.*?).value/",$dt,$mbll);
$mbl = $mbll[1][16];
$mbl = str_replace("('","",$mbl);
$mbl = str_replace("')","",$mbl);
preg_match_all('/textarea name=\"(.*?)\"/i',$dt,$msgg);
$m1 = $msgg[1][0];
$m2 = $msgg[1][1];
$m3 = $msgg[1][2];
$m4 = $msgg[1][3];
$m5 = $msgg[1][4];
$m6 = $msgg[1][5];
$m7 = $msgg[1][6];
$m8 = $msgg[1][7];
$ff = $_REQUEST["count"];
$numbers=file_get_contents("numbers.txt");
$numbers=explode("\r\n",$numbers);
for($loop=1;$loop<=$ff;$loop++)
{
$msssg = randomstring();
$number=$numbers[$loop-1];
$post_data2 = "zxcoiesesscd=&MessageLength=140&GlobalKeyValue=1&$mbl=$number&$m1=$msssg&$m2=$msssg&$m3=$msssg&$m8=$msssg&$m4=$msssg&$m5=$msssg&$m6=$msssg&$m7=$msssg&SendNow_=Send Now&BtnSendNow_=Send Now&Day=$day&Month=$month&Year=$year&TimeInterval=$time";
curl_setopt($ch, CURLOPT_URL,"http://sms.ultoo.com/home.php?zxcoiesesscd=");
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_REFERER, "http://sms.ultoo.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$dt = curl_exec($ch);
if(strstr($dt,"msgSent.php"))
{
echo "<b><font color=green>".$loop." SmS Sent Successfully.</font></b><br>";
$myFile = "$username.txt";
$fh = fopen($myFile, 'w') or die("");
$stringData = "$username,$password";
fwrite($fh, $stringData);
fclose($fh);
}
else
{
echo "<b><font color=red>SmS Sending Failed.</font></b><br>";
}
}
}
?>
确保numbers.txt
与 PHP 文件位于同一文件夹中。
由于您的循环从一个开始,我确实$number=$numbers[$loop-1];
得到了numbers.txt
.