|
|
|
@ -40,11 +40,23 @@ print "FOUND \t\t=> URLs\n"; |
|
|
|
|
# Import config Website (LOAD domain in ARG : perl defacement_check.pl example.com) |
|
|
|
|
my @search; |
|
|
|
|
my $site = $ARGV[0]; |
|
|
|
|
my @ignore; |
|
|
|
|
|
|
|
|
|
# Slurp Site |
|
|
|
|
system("rm urls/*.urls"); |
|
|
|
|
system("/bin/bash slurp_urls.sh $site"); |
|
|
|
|
|
|
|
|
|
# Import config Ignore |
|
|
|
|
my $ignore = 'conf/' . $site . '.ignore'; |
|
|
|
|
if (open(my $f, '<:encoding(UTF-8)', $ignore)) { |
|
|
|
|
while (my $row = <$f>) { |
|
|
|
|
chomp $row; |
|
|
|
|
push @ignore, $row; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
warn "Could not open file '$ignore' $!"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# Import config Keywords |
|
|
|
|
my $keywords = 'conf/keywords.cfg'; |
|
|
|
|
if (open(my $f, '<:encoding(UTF-8)', $keywords)) { |
|
|
|
@ -84,7 +96,11 @@ foreach $file (@files) |
|
|
|
|
|
|
|
|
|
foreach my $s (@search) { |
|
|
|
|
foreach (grep(/$s/i, split(/\n/, $site))) { |
|
|
|
|
push @found, $_; |
|
|
|
|
if($_ =~ m/prolibre/i) { |
|
|
|
|
print "\033[35mIGNORE "; |
|
|
|
|
} else { |
|
|
|
|
push @found, $_; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|