کمک در تصحیح اسکریپت جست و جو در بینگ و گوگل

MR AMIR-KHORE

تازه وارد
سلام خدمت دوستان ،

نزدیک یه هفته داشتم میگشتم دنبال اسکریپتی که متنی رو توی گوگل و بینگ سرچ کنه با بد بختی تونستم بهترین اسکریپتشو پیدا کنم ، اما این اسکریپت یه مشکلی که داره متن رو فقط میتونه توی گوگل سرچ کنه و قسمت بینگش خرابه کد هاشو میدم ببینید میتونید قسمت بینگ رو هم درست کنید خیلی لازمه ممنون میشم زود جواب بدید!!!!

کد index.html :


کد:
<div class='mybox'><h2>Searcher <span class='desc' style='font-size:12px;'>- By : Google & Bing</span></h2>
<table class='myboxtbl'>
<tr><td style='width:100px;'>Dork</td><td><input style='width:100%;' class='inputz' type='text' id="dk" placeholder="inurl:news.php?id=1"></td></tr>
<tr><td style='width:100px;'>Dump file</td><td><input style='width:100%;' class='inputz' type='text' id="df" placeholder="Dump file" /></td></tr>
<tr><td style='width:100px;'>Service</td><td><select class="inputz" id="sel"><option>Google</option><option>Bing</option></select></td></tr>
</table>
<input type='submit' id="btn" class='inputzbut' value='Search' style='width:120px;height:30px;margin:10px 2px 0 2px;' onclick="if(this.value=='Search'){Searcheaza();this.value='Stop';}else if(this.value=='Stop'){this.value='Search';work=0;}else if(this.value='Continue'){work=1;go(contor);this.value='Stop';}" />
</div>    
<div class='mybox'><h2>Results</h2>
</br><div id="r"></div>
<div id="ar"></div>
</div>
<script>
var drk=document.getElementById('dk');
var opt=document.getElementById('sel');
var contor;
var Page;
var dork;
var total;
var work;
var file=document.getElementById('df');
var area=document.getElementById('ar');
var c1=document.getElementById('r');
xmlhttp = new XMLHttpRequest();
function go(c){
if(opt.value=='Google'){
if(file.value!="")
xmlhttp.open("GET", "get.php?t=google&dk="+encodeURIComponent(dork)+"&cont="+c+"&file="+file.value, true);
else
xmlhttp.open("GET", "get.php?t=google&dk="+encodeURIComponent(dork)+"&cont="+c+"&file=", true);
}else{
if(file.value!="")
xmlhttp.open("GET", "get.php?t=bing&dk="+encodeURIComponent(dork)+"&cont="+c+"&file="+file.value+"&pag="+Page, true);
else
xmlhttp.open("GET", "get.php?t=bing&dk="+encodeURIComponent(dork)+"&cont="+c+"&file="+"&pag="+Page, true);
}
xmlhttp.overrideMimeType('text/html; charset=UTF-8');
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4) {
parse();
}
}
xmlhttp.send(null)
}
function Searcheaza(){
if(opt.value=="Google"){
dork=drk.value;
Page=-1;
contor=1;
work=1;
go(contor);
}else{
dork=drk.value;
Page=1;
contor=1;
total=111111111111111;
work=1;
go(contor);
}
}
function parse(){
sursa=xmlhttp.responseText;
if(opt.value=="Google"){
      if(sursa.search("- did not match any documents.")>-1){
      }else if(sursa.search("blockedblockedblockedblockedblockedblockedblocked")>-1){
      }else{
      if(Page==-1){
      total=parseInt(sursa);
      go(contor);
      contor=1;
      Page=1;
      }else{
          if(Page<total){
              if(Page==1)
              contor=10;
              else
              contor=contor+10;
              Page++;
              c1.innerHTML="Page "+Page+" of "+total;
              s=sursa.split(",");
              for(i=0;i<s.length;i++)
                     area.innerHTML=area.innerHTML+s[i]+"<br>";
              go(contor);
          }
      }
      }
}else{
if(work==1){
if(Page<total){
if(sursa.search("blockedblockedblockedblockedblockedblockedblocked")>-1){
work=0;
document.getElementById('btn').value='Continue';
}else{
if(Page==1){
total=sursa.split("<!--AllContent");
total=total[1].split("--");
total=(parseInt(total)/10)+1;
s=sursa.replace("<!--AllContent"+total+"--"+">");
}
s=sursa.split(",");
for(i=0;i<s.length;i++)
   area.innerHTML=area.innerHTML+s[i]+"<br>";
contor=contor+10;
Page++;
c1.innerHTML="Page "+Page+" of "+total;
go(contor);
}
}else{
document.getElementById('btn').value='Start';
work=0;
}
}
}
}
</script>
و محتویات داخل فایل get.php :


کد:
 <?php
session_start();
if($_REQUEST['t']=='google'){
if(!isset($_SESSION['prox']))
$_SESSION['prox']=0;
$*****=array("nimic","217.12.113.67:443","222.124.198.136:3129","91.214.200.45:8080");
$useragent = "Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.14912/870; U; id) Presto/2.4.15";
if($_REQUEST['cont']==1){
$data=file_get_contents("http://www.google.com/search?hl=en&tbo=d&site=&source=hp&q=".urlencode($_REQUEST['dk']));
$split=explode('<div class="sd" id="resultStats">About ',$data);
$split=explode(' results',$split[1]);
echo ((int)str_replace(",","",$split[0])/10);
}else{
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, "http://www.google.com/search?hl=en&tbo=d&site=&source=hp&q=".urlencode($_REQUEST['dk'])."&start=".$_REQUEST['cont']);
//curl_setopt($ch, CURLOPT_*****,"217.12.113.67:443");
curl_setopt ($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$output = curl_exec ($ch);
curl_close($ch);
if(strpos($output,"To continue, please type the characters below:")!=false){
$_SESSION['prox']=(int)$_SESSION['prox']+1;
echo $_SESSION['prox'];
echo 'blockedblockedblockedblockedblockedblockedblocked';
exit;
}
$split=explode('<div style="clear:both"><a href="/url?q=',$output);
for($i=1;$i<count($split);$i++)
{
      $aux=explode("&sa=U",$split[$i]);
      echo urldecode($aux[0])."<br>";
}
}
}if($_REQUEST['t']=='bing'){
error_reporting(0);
if(!isset($_SESSION['pro']))
$_SESSION['pro']=0;
function start(){
$useragent=array("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_4) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.65 Safari/535.11","Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7","Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))","Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25");
$*****=array("217.12.113.67:443","222.124.198.136:3129","91.214.200.45:8080");
if($_REQUEST['pag']=="1")
$url="http://www.bing.com/search?q=".urlencode($_REQUEST['dk'])."&qs=n&form=QBLH&pq=".urlencode($_REQUEST['dk'])."&sc=0-5&sp=-1&sk=";
else{
if($_REQUEST['pag']=="2")
$url="http://www.bing.com/search?q=".urlencode($_REQUEST['dk'])."&qs=n&pq=".urlencode($_REQUEST['dk'])."&sc=0-5&sp=-1&sk=&first=11&FORM=PERE";
else
$url="http://www.bing.com/search?q=".urlencode($_REQUEST['dk'])."&qs=n&pq=".urlencode($_REQUEST['dk'])."&sc=0-0&sp=-1&sk=&first=".$_REQUEST['cont']."&FORM=PERE".$_REQUEST['pag'];
}
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_*****,$*****[(int)$_SESSION['pro']]);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 200);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 2); 
curl_setopt($ch, CURLOPT_USERAGENT,$useragent[rand(0,count($useragent)-1)]);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$data = curl_exec($ch);
curl_close($ch);
$data=str_replace(",","",$data);
return $data;
}
//".urlencode($_REQUEST['dk'])." cont=

$data=start();
if(strpos($data,"Bad Request")!=false||strpos($data,"Pardon the interruption")!=false){
echo 'blockedblockedblockedblockedblockedblockedblocked';
$s=(int)$_SESSION['pro'];
if($s<(count($*****)-1))
$_SESSION['pro']=(int)$_SESSION['pro']+1;
exit;
}
//$split=explode('',$data);
if($_REQUEST['cont']=="1"){
$split=explode('<span class="sb_count">',$data);
$split=explode(' results',$split[1]);
echo '<!--AllContent'.$split[0].'-->';
}
$split=explode('<li class="b_algo"><h2><a href="',$data);
for($i=1;$i<count($split);$i++)
{
      $aux=explode("&sa=U",$split[$i]);
      echo urldecode($aux[0])."<br>";
}
if($_REQUEST['file']!="")
$f=fopen($_REQUEST['file'],'a');
for($i=1;$i<count($split);$i++)
{
    $aux=explode('"',$split[$i]);
    if($_REQUEST['file']!="")
    fwrite($f,strip_tags(urldecode($aux[0]))."\r\n");
    echo strip_tags(urldecode($aux[0])).",";
}
if($_REQUEST['file']!="")
fclose($f);
}
?>
 

MR AMIR-KHORE

تازه وارد
سلام خدمت دوستان ،نزدیک یه هفته داشتم میگشتم دنبال اسکریپتی که متنی رو توی گوگل و بینگ سرچ کنه با بد بختی تونستم بهترین اسکریپتشو پیدا کنم ، اما این اسکریپت یه مشکلی که داره متن رو فقط میتونه توی گوگل سرچ کنه و قسمت بینگش خرابه کد هاشو میدم ببینید میتونید قسمت بینگ رو هم درست کنید خیلی لازمه ممنون میشم زود جواب بدید!!!!

کد index.html :


کد:
<div class='mybox'><h2>Searcher <span class='desc' style='font-size:12px;'>- By : Google & Bing</span></h2>
<table class='myboxtbl'>
<tr><td style='width:100px;'>Dork</td><td><input style='width:100%;' class='inputz' type='text' id="dk" placeholder="inurl:news.php?id=1"></td></tr>
<tr><td style='width:100px;'>Dump file</td><td><input style='width:100%;' class='inputz' type='text' id="df" placeholder="Dump file" /></td></tr>
<tr><td style='width:100px;'>Service</td><td><select class="inputz" id="sel"><option>Google</option><option>Bing</option></select></td></tr>
</table>
<input type='submit' id="btn" class='inputzbut' value='Search' style='width:120px;height:30px;margin:10px 2px 0 2px;' onclick="if(this.value=='Search'){Searcheaza();this.value='Stop';}else if(this.value=='Stop'){this.value='Search';work=0;}else if(this.value='Continue'){work=1;go(contor);this.value='Stop';}" />
</div>    
<div class='mybox'><h2>Results</h2>
</br><div id="r"></div>
<div id="ar"></div>
</div>
<script>
var drk=document.getElementById('dk');
var opt=document.getElementById('sel');
var contor;
var Page;
var dork;
var total;
var work;
var file=document.getElementById('df');
var area=document.getElementById('ar');
var c1=document.getElementById('r');
xmlhttp = new XMLHttpRequest();
function go(c){
if(opt.value=='Google'){
if(file.value!="")
xmlhttp.open("GET", "get.php?t=google&dk="+encodeURIComponent(dork)+"&cont="+c+"&file="+file.value, true);
else
xmlhttp.open("GET", "get.php?t=google&dk="+encodeURIComponent(dork)+"&cont="+c+"&file=", true);
}else{
if(file.value!="")
xmlhttp.open("GET", "get.php?t=bing&dk="+encodeURIComponent(dork)+"&cont="+c+"&file="+file.value+"&pag="+Page, true);
else
xmlhttp.open("GET", "get.php?t=bing&dk="+encodeURIComponent(dork)+"&cont="+c+"&file="+"&pag="+Page, true);
}
xmlhttp.overrideMimeType('text/html; charset=UTF-8');
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4) {
parse();
}
}
xmlhttp.send(null)
}
function Searcheaza(){
if(opt.value=="Google"){
dork=drk.value;
Page=-1;
contor=1;
work=1;
go(contor);
}else{
dork=drk.value;
Page=1;
contor=1;
total=111111111111111;
work=1;
go(contor);
}
}
function parse(){
sursa=xmlhttp.responseText;
if(opt.value=="Google"){
      if(sursa.search("- did not match any documents.")>-1){
      }else if(sursa.search("blockedblockedblockedblockedblockedblockedblocked")>-1){
      }else{
      if(Page==-1){
      total=parseInt(sursa);
      go(contor);
      contor=1;
      Page=1;
      }else{
          if(Page<total){
              if(Page==1)
              contor=10;
              else
              contor=contor+10;
              Page++;
              c1.innerHTML="Page "+Page+" of "+total;
              s=sursa.split(",");
              for(i=0;i<s.length;i++)
                     area.innerHTML=area.innerHTML+s[i]+"<br>";
              go(contor);
          }
      }
      }
}else{
if(work==1){
if(Page<total){
if(sursa.search("blockedblockedblockedblockedblockedblockedblocked")>-1){
work=0;
document.getElementById('btn').value='Continue';
}else{
if(Page==1){
total=sursa.split("<!--AllContent");
total=total[1].split("--");
total=(parseInt(total)/10)+1;
s=sursa.replace("<!--AllContent"+total+"--"+">");
}
s=sursa.split(",");
for(i=0;i<s.length;i++)
   area.innerHTML=area.innerHTML+s[i]+"<br>";
contor=contor+10;
Page++;
c1.innerHTML="Page "+Page+" of "+total;
go(contor);
}
}else{
document.getElementById('btn').value='Start';
work=0;
}
}
}
}
</script>
و محتویات داخل فایل get.php :


کد:
 <?php
session_start();
if($_REQUEST['t']=='google'){
if(!isset($_SESSION['prox']))
$_SESSION['prox']=0;
$*****=array("nimic","217.12.113.67:443","222.124.198.136:3129","91.214.200.45:8080");
$useragent = "Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.14912/870; U; id) Presto/2.4.15";
if($_REQUEST['cont']==1){
$data=file_get_contents("http://www.google.com/search?hl=en&tbo=d&site=&source=hp&q=".urlencode($_REQUEST['dk']));
$split=explode('<div class="sd" id="resultStats">About ',$data);
$split=explode(' results',$split[1]);
echo ((int)str_replace(",","",$split[0])/10);
}else{
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, "http://www.google.com/search?hl=en&tbo=d&site=&source=hp&q=".urlencode($_REQUEST['dk'])."&start=".$_REQUEST['cont']);
//curl_setopt($ch, CURLOPT_*****,"217.12.113.67:443");
curl_setopt ($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$output = curl_exec ($ch);
curl_close($ch);
if(strpos($output,"To continue, please type the characters below:")!=false){
$_SESSION['prox']=(int)$_SESSION['prox']+1;
echo $_SESSION['prox'];
echo 'blockedblockedblockedblockedblockedblockedblocked';
exit;
}
$split=explode('<div style="clear:both"><a href="/url?q=',$output);
for($i=1;$i<count($split);$i++)
{
      $aux=explode("&sa=U",$split[$i]);
      echo urldecode($aux[0])."<br>";
}
}
}if($_REQUEST['t']=='bing'){
error_reporting(0);
if(!isset($_SESSION['pro']))
$_SESSION['pro']=0;
function start(){
$useragent=array("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_4) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.65 Safari/535.11","Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7","Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))","Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25");
$*****=array("217.12.113.67:443","222.124.198.136:3129","91.214.200.45:8080");
if($_REQUEST['pag']=="1")
$url="http://www.bing.com/search?q=".urlencode($_REQUEST['dk'])."&qs=n&form=QBLH&pq=".urlencode($_REQUEST['dk'])."&sc=0-5&sp=-1&sk=";
else{
if($_REQUEST['pag']=="2")
$url="http://www.bing.com/search?q=".urlencode($_REQUEST['dk'])."&qs=n&pq=".urlencode($_REQUEST['dk'])."&sc=0-5&sp=-1&sk=&first=11&FORM=PERE";
else
$url="http://www.bing.com/search?q=".urlencode($_REQUEST['dk'])."&qs=n&pq=".urlencode($_REQUEST['dk'])."&sc=0-0&sp=-1&sk=&first=".$_REQUEST['cont']."&FORM=PERE".$_REQUEST['pag'];
}
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_*****,$*****[(int)$_SESSION['pro']]);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 200);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 2); 
curl_setopt($ch, CURLOPT_USERAGENT,$useragent[rand(0,count($useragent)-1)]);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$data = curl_exec($ch);
curl_close($ch);
$data=str_replace(",","",$data);
return $data;
}
//".urlencode($_REQUEST['dk'])." cont=

$data=start();
if(strpos($data,"Bad Request")!=false||strpos($data,"Pardon the interruption")!=false){
echo 'blockedblockedblockedblockedblockedblockedblocked';
$s=(int)$_SESSION['pro'];
if($s<(count($*****)-1))
$_SESSION['pro']=(int)$_SESSION['pro']+1;
exit;
}
//$split=explode('',$data);
if($_REQUEST['cont']=="1"){
$split=explode('<span class="sb_count">',$data);
$split=explode(' results',$split[1]);
echo '<!--AllContent'.$split[0].'-->';
}
$split=explode('<li class="b_algo"><h2><a href="',$data);
for($i=1;$i<count($split);$i++)
{
      $aux=explode("&sa=U",$split[$i]);
      echo urldecode($aux[0])."<br>";
}
if($_REQUEST['file']!="")
$f=fopen($_REQUEST['file'],'a');
for($i=1;$i<count($split);$i++)
{
    $aux=explode('"',$split[$i]);
    if($_REQUEST['file']!="")
    fwrite($f,strip_tags(urldecode($aux[0]))."\r\n");
    echo strip_tags(urldecode($aux[0])).",";
}
if($_REQUEST['file']!="")
fclose($f);
}
?>
up++++

یعنی کسی نیس به من کمک کنه؟ :(

 
بالا