Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- print "
- Mr.MaGnoM
- mini bing dorker
- https://www.facebook.com/mr.magnom2/
- http://magsec.blogspot.com/
- ";
- // function getsource is not made by me .
- // usage : php script.php
- function getsource($url, $proxy) {
- $curl = curl_init($url);
- 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");
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- if ($proxy) {
- $proxy = explode(':', autoprox());
- curl_setopt($curl, CURLOPT_PROXY, $proxy[0]);
- curl_setopt($curl, CURLOPT_PROXYPORT, $proxy[1]);
- }
- $content = curl_exec($curl);
- curl_close($curl);
- return $content;
- }
- echo "\n\t ur dork here : ";$dork=trim(fgets(STDIN,1024));
- $do=urlencode($dork);
- //$ip="200.58.111.34";
- $npage = 1;
- $npages = 30000;
- $allLinks = array();
- $lll = array();
- while($npage <= $npages) {
- $x = getsource("http://www.bing.com/search?q=".$do."&first=" . $npage."&FORM=PERE4", $proxy);
- if ($x) {
- preg_match_all('#<h2><a href="(.*?)" h="ID#', $x, $findlink);
- foreach ($findlink[1] as $fl) array_push($allLinks, $fl);
- $npage = $npage + 10;
- if (preg_match("(first=" . $npage . "&)siU", $x, $linksuiv) == 0) break;
- } else break;
- }
- $URLs = array();
- foreach($allLinks as $url){
- $exp = explode("/", $url);
- $URLs[] = $exp[2];
- }
- $array = array_filter($URLs);
- $array = array_unique($array);
- $sss=count(array_unique($array));
- echo"\nToTaL SiTe : ". $sss.'';
- foreach ($array as $domain) {
- echo"\nhttp://".$domain.'/';
- }
- ?>
Add Comment
Please, Sign In to add comment