setup whitelist (ignore)

master
heuzef 7 years ago
parent eb7bd1eba3
commit 8c40f7eae5
  1. 1
      conf/keywords.cfg
  2. 18
      defacement_check.pl

@ -5,7 +5,6 @@ anonymous
attacked
base64_decode
base64decode
eval
fuck
greetz
gzinflate

@ -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, $_;
}
}
}

Loading…
Cancel
Save