Advertisement
iAnonGuy

~ Simple CMS Checker ~

Mar 25th, 2016
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.30 KB | None | 0 0
  1. <?php
  2. /*
  3.  * Coded by an0nguy [at] protonmail.ch ~ http://blog.lolwaleet.com/
  4.  * Based on -- http://www.blackcoder.info/c/cmschecker.txt
  5.  *
  6.  * Pic -- http://i.imgur.com/pZfMyZg.png
  7.  * Thanks to => T3N38R15 <= for improving teh code ^_^
  8.  */
  9. $curfile = $argv[0];
  10. $domain = @$argv[1];
  11. echo "
  12. ------------------------------------------------\n
  13. -         Simple CMS Checker by AnonGuy        -\n
  14. ------------------------------------------------\n";
  15.  
  16. if(!$domain){ echo "
  17. Usage -- $curfile www.example.com
  18.      -- $curfile 8.8.8.8
  19. "; }
  20. else{
  21. $domainsLined = file_get_contents("http://api.hackertarget.com/reverseiplookup/?q=$domain");
  22. $domainsArray = explode("\n", $domainsLined);
  23. array_pop($domainsArray); # *pop* :P
  24. # Empty variables which'll get filled by the end of execution ..
  25. $joomla = 0
  26. $wordpress = 0;
  27. $drupal = 0;
  28. $vbulletin = 0;
  29. $custom = 0;
  30.  
  31. foreach ($domainsArray as $domain){
  32. $curl = curl_init();
  33. curl_setopt_array($curl, array(
  34.     CURLOPT_RETURNTRANSFER => true,
  35.     CURLOPT_FOLLOWLOCATION => true,
  36.     CURLOPT_URL => $domain,
  37.     CURLOPT_USERAGENT => 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
  38. ));
  39. $source = curl_exec($curl);
  40. curl_close($curl);
  41. if(strpos($source, "Joomla") !== false) {echo "$domain -- Joomla!\n"; array_push($joomla, $domain); file_put_contents("joom.txt", "$domain\n", FILE_APPEND); }
  42. elseif(strpos($source, "wordpress") !== false || strpos($source, "xmlrpc.php") !== false ) {echo "$domain -- Wordpress!\n"; array_push($wordpress, $domain); file_put_contents("wp.txt", "$domain\n", FILE_APPEND);}
  43. elseif(strpos($source, "Drupal") !== false) {echo "$domain -- Drupal!\n"; array_push($drupal, $domain); file_put_contents("drupal.txt", "$domain\n", FILE_APPEND);}
  44. elseif(strpos($source, "vBulletin") !== false) {echo "$domain -- vBulletin!\n"; array_push($vbulletin, $domain); file_put_contents("vb.txt", "$domain\n", FILE_APPEND);}
  45. else {echo "$domain -- Custom CMS!\n"; array_push($custom, $domain); file_put_contents("custom.txt", "$domain\n", FILE_APPEND);}}
  46. echo "\n------------------------------------------------\nWordpress -- $wordpress --> wp.txt\nJoomla    -- $joomla --> joom.txt\nDrupal    -- $drupal --> drupal.txt\nvBulletin -- $vbulletin --> vb.txt\nCustom    -- $custom --> custom.txt\n------------------------------------------------";}
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement