syst3m_h4x0r

Cms Detector

Nov 8th, 2017
24,943
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 3.77 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # CODADO POR v4p0r
  3. # SE FOR MODIFICAR PELO MENOS DEIXE ALGUM CRÉDITO PELO SCRIPT :P
  4. # YUNKERS CREW <3
  5. # CURTA NOIS AE MANO : https://www.facebook.com/yunkers01/
  6. # MEU CANAL : https://www.youtube.com/channel/UCLl84j_tLcuBxUHyktkQX-A
  7.  
  8. use Win32::Console::ANSI;
  9. use Term::ANSIColor;
  10. use LWP::UserAgent;
  11. ####################### LIMPAR O TERMINAL ############################################
  12. system(($^O eq 'MSWin32') ? 'cls' : 'clear');
  13. ####################### DISCRIÇÃO ####################################################
  14. $script = 'CMS DETECTOR';
  15. $author = 'v4p0r';
  16. $version = '0.0.1';
  17. $team = 'Yunkers Crew';
  18. $update = '10/05/2017';
  19. $greetz = 'All friends - Yunkers Crew';
  20. ####################### CRIANDO O DIRETORIO RESULT PARA SALVAR OS .TXT ###############
  21. $res="Result";
  22.     if (-e $res)
  23.     {
  24.     }
  25.     else
  26.     {
  27.         mkdir $res or die "NAO CONSEGUIMOS CRIAR O DIRETORIO: $res";
  28.     }
  29. ################# INICIO  #############
  30.  
  31. print "\n";
  32. print colored("         --=[ $script",'BOLD WHITE'),"\n";
  33. print colored("         +---**---==[ Version: $version ",'BOLD GREEN'),"\n";
  34. print colored("         +---**---==[ Author: $author  ",'BOLD WHITE'),"\n";
  35. print colored("         +---**---==[ Update Date : $update ",'BOLD GREEN'),"\n";
  36. print colored("         +---**---==[ Team: $team  ",'BOLD WHITE'),"\n";
  37. print colored("         +---**---==[ Agradecimentos: $greetz  ",'BOLD GREEN'),"\n";
  38.  
  39.  
  40. print colored("+------------------------------------------------------------------------+",'red'),"\n";
  41. print colored("+------------------------------------------------------------------------+",'red'),"\n";
  42.  
  43. ########## PART WORK #################
  44. print colored("[SUA LISTA DE SITES]: ",'BOLD WHITE');
  45.  
  46. $lista=<STDIN>;
  47. chomp($lista);
  48. open (lista, "<$lista") || die "\n [LISTA DE SITES NÃO SELECIONADA]";
  49. my @lista = <lista>;
  50. close lista;
  51.  
  52. foreach $site(@lista) {
  53.  
  54. if($site !~ /http:\/\//) { $site = "http://$site/"; };
  55. detect();
  56. }
  57. sub detect($site){
  58. $ua = LWP::UserAgent->new(keep_alive => 1);
  59. $ua->agent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31");
  60. $ua->timeout (8);
  61.  
  62. #################### PARTE DETECTANDO O CMS WORDPRESS ##################################
  63. my $checar = $ua->get("$site")->content;
  64. if($checar =~/wp-content\/themes\/|wp-content\/plugins\/|wordpress/) {
  65.     print colored("[WORDPRESS]: $site",'WHITE ON_CYAN'),"\n";
  66. open(save, '>>Result/WordPress.txt');
  67.     print save "$site\n";
  68.     close(save);
  69. }
  70. #################### PARTE DETECTANDO O CMS JOOMLA ##################################
  71. elsif($checar =~/<script type=\"text\/javascript\" src=\"\/media\/system\/js\/mootools.js\"><\/script>|Joomla!|Joomla|joomla/) {
  72.    print colored("[JOOMLA]: $site",'WHITE ON_GREEN'),"\n";
  73. open(save, '>>Result/Joomla.txt');
  74.    print save "$site\n";  
  75.    close(save);
  76.    }
  77. #################### PARTE DETECTANDO O CMS VBULLETIN ##################################
  78. elsif($checar =~/\/faq.php\/vb|\/forum\/|Powred by vbulletin/) {
  79.    print colored("[VBULLETIN]: $site",'WHITE ON_RED'),"\n";
  80. open(save, '>>Result/VBulletin.txt');
  81.    print save "$site\n";  
  82.    close(save);
  83.  }
  84. #################### PARTE DETECTANDO O CMS DRUPAL ##################################
  85. elsif($checar =~/\/modules\/system\/system.menus.css|\/sites\/default\/files\/|<meta name=\"Generator\" content=\"Drupal 7/) {
  86.    print colored("[DRUPAL]: $site",'WHITE ON_BLUE'),"\n";
  87. open(save, '>>Result/Drupal.txt');
  88.    print save "$site\n";  
  89.    close(save);
  90.    }
  91. #################### CMS NÃO DETECTADO ##################################
  92. else{
  93.    print colored("[CMS NAO DETECTADO]: $site",'BOLD WHITE'),"\n";
  94.    open(save, '>>Result/Cms_N_Detectado.txt');
  95.    print save "$site\n";
  96.    close(save);
  97. }
  98. }
Add Comment
Please, Sign In to add comment