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