-
Notifications
You must be signed in to change notification settings - Fork 6
/
auto_detect.pl
89 lines (83 loc) · 3.16 KB
/
auto_detect.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
#!/usr/bin/perl
#use Win32::Console::ANSI;
#use Term::ANSIColor;
#use LWP::UserAgent;
##############################################
system(($^O eq 'MSWin32') ? 'cls' : 'clear');
##############################################
$Anonsec = 'Auto_Detector';
$auteur = 'By Satya Enki';
$version = '1.0';
$groupe = '*** Anonsec ***';
$update = '03/06/2017';
$merci = 'All friends';
##############################################
$res="Result";
if (-e $res)
{
}
else
{
mkdir $res or die "Pas obtenu de créer le répertoire: $res";
}
################# ACCUEIL #############
print "\n";
print colored("+------------------------------------------------------------------------+",'red'),"\n";
print colored(" --=[ $Anonsec ]=--",'BOLD WHITE'),"\n";
print colored(" +---**---==[ Team: $groupe ]==---**---+",'BOLD WHITE'),"\n";
print colored(" +---**---==[ merci: $merci ]==---**---+",'BOLD GREEN'),"\n";
print colored("+------------------------------------------------------------------------+",'red'),"\n";
print "\n";
########## PART WORK #################
print colored("[LA LISTE DE VOS SITES]: ",'BOLD WHITE');
$liste=<STDIN>;
chomp($liste);
print "\n";
open (liste, "<$liste") || die "\n [liste de sites non selectionner]";
my @liste = <liste>;
close liste;
foreach $site(@liste) {
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);
#################### 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);
}
#################### 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);
}
#################### 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);
}
#################### 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 ##################################
else{
print colored("[CMS NON DETECTER]: $site",'BOLD WHITE'),"\n";
open(save, '>>Result/Cms_N_Detecter.txt');
print save "$site\n";
close(save);
}
}