Advertisement
greyx

Mass bing grabber

Apr 20th, 2018
923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.97 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.     auto bingrabber with mass dork!
  5.     coded by jjeincovers!
  6.     @2018
  7. */
  8.  
  9. print "
  10. ______   _____  ____  _____   ______  
  11. |_   _ \ |_   _||_   \|_   _|.' ___  |
  12.  | |_) |  | |    |   \ | | / .'   \_|
  13.  |  __'.  | |    | |\ \| | | |   ____
  14. _| |__) |_| |_  _| |_\   |_\ `.___]  |
  15. |_______/|_____||_____|\____|`._____.'
  16. ## MASS BING GRABBER BY JJEINCOVERS! ##\n";
  17. @set_time_limit(0);
  18. //error_reporting(0);
  19.  
  20. // mass bing grabber @2018 by jjeincovers!
  21. // usage : php bing.php
  22.  
  23. function getsource($url) {
  24.     $curl = curl_init($url);
  25.     curl_setopt($curl, CURLOPT_USERAGENT, "jjeincovers/1.1");
  26.     //curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
  27.     curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  28.     $content = curl_exec($curl);
  29.     curl_close($curl);
  30.     return $content;
  31. }
  32.  
  33. $dork=file_get_contents("dork.txt");
  34. $edork=explode("\r\n",$dork);
  35. foreach($edork as $dorklist){
  36.         $npage = 1;
  37.         $npages = 30000;
  38.         $allLinks = array();
  39.         $incovers = array();
  40.         while($npage <= $npages) {
  41.             $x = getsource("http://www.bing.com/search?q=".urlencode($dorklist)."&first=" . $npage."&FORM=PERE4");
  42.             if ($x) {
  43.                 preg_match_all('#<h2><a href="(.*?)" h="ID#', $x, $findlink);
  44.                 foreach ($findlink[1] as $fl) array_push($allLinks, $fl);
  45.                 $npage = $npage + 10;
  46.                 if (preg_match("(first=" . $npage . "&amp)siU", $x, $linksuiv) == 0) break;
  47.             } else break;
  48.         }
  49.         $URLs = array();
  50.         foreach($allLinks as $url){
  51.             $exp = explode("/", $url);
  52.             $URLs[] = $exp[2];
  53.         }
  54.         $array = array_filter($URLs);
  55.         $array = array_unique($array);
  56.         $sss=count(array_unique($array));
  57.         echo"\n Dork : ". $dorklist.'';
  58.         echo"\n Total : ". $sss.' site';
  59.  
  60.         foreach ($array as $domain) {
  61.             $op=@fopen('bingresult.txt','a+');
  62.             $lol="\nhttp://".$domain.'/';
  63.             fwrite($op,$lol);
  64.             fclose($op);
  65.         }
  66. }
  67. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement