SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | set_time_limit(0); | |
3 | //error_reporting(0); | |
4 | // coded by Mr. Magnom | |
5 | // Re-Coded to Web Based by Mr. Error 404 - IndoXploit | |
6 | // greetz to Mr. Magnom - Sanjungan Jiwa | |
7 | ||
8 | // usage: php bing.php 'bing_dork' -> with ' (ex: php bing.php '"/admin/" site:com') | |
9 | ||
10 | function getsource($url) { | |
11 | $curl = curl_init($url); | |
12 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); | |
13 | $content = curl_exec($curl); | |
14 | curl_close($curl); | |
15 | return $content; | |
16 | } | |
17 | $do = urlencode($argv[1]); | |
18 | if(isset($argv[1])) { | |
19 | $npage = 1; | |
20 | $npages = 30000; | |
21 | $allLinks = array(); | |
22 | $lll = array(); | |
23 | while($npage <= $npages) { | |
24 | $x = getsource("http://www.bing.com/search?q=".$do."&first=".$npage); | |
25 | if($x) { | |
26 | preg_match_all('#<h2><a href="(.*?)" h="ID#', $x, $findlink); | |
27 | foreach ($findlink[1] as $fl) array_push($allLinks, $fl); | |
28 | $npage = $npage + 10; | |
29 | if (preg_match("(first=" . $npage . "&)siU", $x, $linksuiv) == 0) break; | |
30 | } else break; | |
31 | } | |
32 | $URLs = array(); | |
33 | foreach($allLinks as $url){ | |
34 | $exp = explode("/", $url); | |
35 | $URLs[] = $exp[2]; | |
36 | } | |
37 | $array = array_filter($URLs); | |
38 | $array = array_unique($array); | |
39 | $sss = count(array_unique($array)); | |
40 | //echo "ToTaL SiTe : $sss\n"; | |
41 | //echo "--------------------------------------\n"; | |
42 | foreach($array as $domain) { | |
43 | echo "http://$domain/\n"; | |
44 | } | |
45 | } | |
46 | ?> |