Kro0oz

dork bing wis

Dec 2nd, 2015
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.76 KB | None | 0 0
  1. <?php
  2.  
  3. print "
  4.   coded by Kro0oz (wis)
  5.           bing dork
  6. http://pastebin.com/u/Kro0oz
  7. ";
  8.  
  9.  
  10.  // coded by Kro0oz (wis)
  11. // usage : php wis.php
  12.  
  13. function getsource($url, $proxy) {
  14.     $curl = curl_init($url);
  15.     curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5");
  16.     curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  17.     if ($proxy) {
  18.         $proxy = explode(':', autoprox());
  19.         curl_setopt($curl, CURLOPT_PROXY, $proxy[0]);
  20.         curl_setopt($curl, CURLOPT_PROXYPORT, $proxy[1]);
  21.     }
  22.     $content = curl_exec($curl);
  23.     curl_close($curl);
  24.     return $content;
  25. }
  26.  
  27. echo "\n\t ur dork here (: : ";$dork=trim(fgets(STDIN,1024));
  28. $do=urlencode($dork);
  29.         //$ip="200.58.111.34";
  30.         $npage = 1;
  31.         $npages = 30000;
  32.         $allLinks = array();
  33.         $lll = array();
  34.         while($npage <= $npages) {
  35.             $x = getsource("http://www.bing.com/search?q=".$do."&first=" . $npage."&FORM=PERE4", $proxy);
  36.             if ($x) {
  37.                 preg_match_all('#<h2><a href="(.*?)" h="ID#', $x, $findlink);
  38.                 foreach ($findlink[1] as $fl) array_push($allLinks, $fl);
  39.                 $npage = $npage + 10;
  40.                 if (preg_match("(first=" . $npage . "&amp)siU", $x, $linksuiv) == 0) break;
  41.             } else break;
  42.         }
  43.         $URLs = array();
  44.         foreach($allLinks as $url){
  45.             $exp = explode("/", $url);
  46.             $URLs[] = $exp[2];
  47.         }
  48.         $array = array_filter($URLs);
  49.         $array = array_unique($array);
  50.         $sss=count(array_unique($array));
  51.         echo"\nToTaL SiTe : ". $sss.'';
  52.  
  53.         foreach ($array as $domain) {
  54.  
  55.             echo"\nhttp://".$domain.'/';
  56.  
  57.         }
  58. ?>
Advertisement
Add Comment
Please, Sign In to add comment