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