Advertisement
ecchiexploit

CMS Scanner

Oct 10th, 2020 (edited)
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.23 KB | None | 0 0
  1. <?php
  2. //error_reporting(0);
  3. define("wp","\e[32m");
  4. define("joomla","\e[96m");
  5. define("lokomedia","\e[93m");
  6. define("drupal","\e[95m");
  7. define("vbulletin","\e[35m");
  8. define("live","\e[35m");
  9. define("file","\e[90m");
  10. define("notfound","\e[31m");
  11. define("note","\e[36m");
  12. define("author","\e[92m");
  13. define("chose","\e[94m");
  14. define("chose2","\e[33m");
  15.     class CMS{
  16.         public function curl($url){
  17.             $curl = curl_init();
  18.             curl_setopt($curl, CURLOPT_URL, $url);
  19.             curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  20.             curl_setopt($curl, CURLOPT_HEADER, false);
  21.             curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
  22.             //curl_setopt($curl, CURLOPT_MAXREDIRS, 3);
  23.             $exe = curl_exec($curl);
  24.             curl_close($curl);
  25.             return $exe;
  26.         }
  27.         public function Save($save,$name){
  28.             $result = fopen($name, "a+");
  29.             fwrite($result,"$save\n");
  30.             fclose($result);
  31.         }
  32.         public function Scann_CMS($url){
  33.             $web = "http://".$url;
  34.             $site = $this->curl($web);
  35.             for ($i=0; $i < $site; $i++);
  36.             if (preg_match("/\/wp-login.php\/|\/wp-content\/|\/wp-includes\/|\/xmlrpc.php/",$site)) {
  37.                 echo wp."this site is Wordpress => $web\n";
  38.                 $this->Save($url,"Wordpress.txt");
  39.             }
  40.             else if(preg_match("/\/administrator\/|\/components\/|\/com_tags\/|\/<script type=\"text\/javascript\" src=\"\/media\/system\/js\/mootools.js\"><\/script>|Joomla|\/media\/system\/js\/|mootools-core.js|com_content|Joomla!/", $site)){
  41.                 echo joomla."this site is Joomla => $web\n";
  42.                 $this->Save($url,"Joomla.txt");
  43.             }
  44.             else if(preg_match("/\/Drupal|drupal|sites\/all|drupal.org/", $site)){
  45.                 echo drupal."this site is Drupal => $web\n";
  46.                 $this->Save($url,"Drupal.txt");
  47.             }
  48.             else if(preg_match("/\/faq.php\/vb|\/clientscript\/|vBulletin\/|\/vbulletin/", $site)){
  49.                 echo vbulletin."this site is vBulletin => $web\n";
  50.                 $this->Save($url,"vBulletin.txt");
  51.             }
  52.             else if(preg_match("/\/skin\/frontend\/base\/default\/|\/\/magentocore.net\/mage\/mage.js|\/webforms\/index\/index\/|\/customer\/account\/login/", $site)){
  53.                 echo magento."this site is Magento => $web\n";
  54.                 $this->Save($url,"Magento.txt");
  55.             }
  56.             else if(preg_match("/\/route=product|OpenCart|route=common|catalog\/view\/theme/", $site)){
  57.                 echo opencart."this site is OpenCart => $web\n";
  58.                 $this->Save($url,"OpenCart.txt");
  59.             }
  60.             else if(preg_match("/\/semua-agenda.html|foto_banner\/|lokomedia/", $site)){
  61.                 echo lokomedia."this site is Lokomedia => $web\n";
  62.                 $this->Save($url,"Lokomedia.txt");
  63.             }
  64.             else if(preg_match("/\/filemanager.php|filemanager|fileman|\/assets\/global\/plugins\/|\/assets\/plugins\/|\/assets\/public\/plugins\/|\/assets\/private\/plugins\/|\/assets\/admin|\/admin\/plugins\/|assets\/dashboard\//", $site)){
  65.                 echo file."this site is have Filemanager Source => $web\n";
  66.                 $this->Save($url,"Filemanager.txt");
  67.             }
  68.             else if(preg_match("/\/mcc.godaddy.com\/park\/|domain has expired|Domain Expired|domain expired|Undermainteance|mcc.godaddy.com|Under Construction|Construction|expired/", $site)){
  69.                 echo notfound."this site is Expired => $web\n";
  70.                 $this->Save($url,"Expired.txt");
  71.             }
  72.             else if(preg_match("/html|head|body/", $site)){
  73.                 echo live."this site is live but unknown CMS => $web\n";
  74.                 $this->Save($url,"LiveUnknown.txt");
  75.             }
  76.             else {
  77.                 echo notfound."Unknown => $web\n";
  78.                 $this->Save($url,"Unknown.txt");
  79.             }
  80.         }
  81.         public function Mass_Scan($list){
  82.             if(!file_exists($list)) die("File List ".$list." Not Found");
  83.             $domain = explode("\n", file_get_contents($list));
  84.             foreach ($domain as $web) {
  85.                 $this->Scann_CMS($web);
  86.             }
  87.         }
  88.         public function Chose(){
  89.             echo author."\n[#] Author ./EcchiExploit [#]\n";
  90.             echo note."Note : Don't Change http:// Or https:// !!!\n\n";
  91.             echo chose2."\t\t1. Mass Scan CMS\n";
  92.             echo chose2."\t\t2. Not Mass Scan CMS\n";
  93.             echo chose."\nYour Chose => ";
  94.             $pilih = trim(fgets(STDIN));
  95.             switch ($pilih) {
  96.                 case '1':
  97.                     echo "\tYour List site => ";
  98.                     $list = trim(fgets(STDIN));
  99.                     $this->Mass_Scan($list);
  100.                     break;
  101.                 case '2':
  102.                     echo "\tYour Site => ";
  103.                     $url = trim(fgets(STDIN));
  104.                     $this->Scann_CMS($url);
  105.                     break;
  106.                 default:
  107.                     echo "Fuck You!!\n";
  108.                     break;
  109.             }
  110.         }
  111.     }
  112.     $scan = new CMS();
  113.     $scan->Chose();
  114. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement