Advertisement
Guest User

Fopo 18 marc

a guest
Mar 18th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.83 KB | None | 0 0
  1. <?php  set_time_limit(120); $cookie=tempnam("/tmp","CURLCOOKIE"); $uid=isset($_REQUEST["uid"])?trim($_REQUEST["uid"]):"9899999999"; $pwd=isset($_REQUEST["pwd"])?trim($_REQUEST["pwd"]):"99999"; $start = 0; $server="sms.ultoo.com"; $url="$server/login.php"; $url_h="$server/home.php"; $url_a="$server/AnswereIt.php"; $url_ap="$server/AnswereItGraph.php"; $agent = "Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20100101 Firefox/17.0"; $file = "ans.txt"; $handle = fopen($file, "r"); $read = file_get_contents($file); $lines = explode(";", $read); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"$url"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch,CURLOPT_ENCODING,"gzip,deflate"); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*")); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_REFERER, "$url"); curl_setopt( $ch, CURLOPT_AUTOREFERER, 1); $html=curl_exec($ch); if (preg_match("/input name=\"(.*?)\" type=\"text\" class=\"existing_user round_four\" id=\"(.*?)\"/i",$html, $n)) { $usr=$n[1]; } else { goto error; } if (preg_match("/input name=\"(.*?)\" type=\"password\" class=\"existing_user round_four\" id=\"(.*?)\"/i",$html, $n)) { $pass=$n[1]; } else { goto error; } $data1 = "Rpidci=&$usr=$uid&$pass=$pwd&RememberMe=1&login_btn=login here"; curl_setopt($ch, CURLOPT_URL,"$url"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch,CURLOPT_ENCODING,"gzip"); curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*")); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_REFERER, "$url"); curl_setopt($ch, CURLOPT_AUTOREFERER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,"$data1"); $html=curl_exec($ch); if(!preg_match("/mywallet.php(.*?)'/i",$html) && !preg_match("/home.php(.*?)'/i",$html,$matches)) { print "Login Error"; } else { while($start<=50) { curl_setopt($ch, CURLOPT_URL,"$url_a"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch,CURLOPT_ENCODING,"gzip,deflate"); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*")); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_REFERER, "$url_a"); curl_setopt( $ch, CURLOPT_AUTOREFERER, 1); $html=curl_exec($ch); if (preg_match("/<p class=\"qtionfont\">Question number:-(.*?)<\/p>/i",$html, $n)) { $qno=$n[1]; } else { goto error; } if(preg_match("/name=\"qxci\" value=\"(.*?)\"/i",$html,$matches)) { $qxci=urlencode($matches[1]); } else { goto error; } if(preg_match("/name=\"QuestionId\" value=\"(.*?)\"/i",$html,$matches)) { $qid=$matches[1]; } else { goto error; } if(preg_match("/input type=\"text\" name=\"(.*?)\" id=\"(.*?)\" class=\"inputtxt\"/i",$html,$matches)) { $ans=$matches[1]; } else { goto error; } $anstxt=$lines[$qno-1]; $post_data="$ans=$anstxt&zxcoiesesscd=&qxci=$qxci&QuestionId=$qid&submit=Submit"; curl_setopt($ch, CURLOPT_URL,"$url_a"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch,CURLOPT_ENCODING,"gzip"); curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*")); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_REFERER, "$url_ap"); curl_setopt($ch, CURLOPT_AUTOREFERER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,"$post_data"); $html=curl_exec($ch); if(preg_match("/AnswereItGraph.php(.*?)'/i", $html, $matches)){ $start++; } else { goto error; } } } echo "<font color=blue><b>Script by DIP<br></b></font>"; echo "<font color=green><b>Total Quiz Submitted: $start<br></b></font>"; flush(); ob_flush(); error: echo "<hr>"; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement