From 013ee022f22a0cc5dd305ddf16afad43ef2e862b Mon Sep 17 00:00:00 2001 From: heuzef Date: Fri, 9 Feb 2018 09:19:28 +0100 Subject: [PATCH] update whitlist conf --- conf/keywords.cfg | 2 +- defacement_check.pl | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/keywords.cfg b/conf/keywords.cfg index a97e352..fa6f146 100644 --- a/conf/keywords.cfg +++ b/conf/keywords.cfg @@ -1,4 +1,4 @@ -#EMAIL REGEX (?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]) +(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]) 0wn3d 0wned anonymous diff --git a/defacement_check.pl b/defacement_check.pl index 4e0d928..bae355f 100644 --- a/defacement_check.pl +++ b/defacement_check.pl @@ -38,23 +38,23 @@ print "FOUND \t\t=> URLs\n"; # } # Import config Website (LOAD domain in ARG : perl defacement_check.pl example.com) +my @whitelist; 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)) { +my $ignores = 'conf/' . $site . '.ignore'; +if (open(my $f, '<:encoding(UTF-8)', $ignores)) { while (my $row = <$f>) { chomp $row; - push @ignore, $row; + push @whitelist, $row; } } else { - warn "Could not open file '$ignore' $!"; + warn "Could not open file '$ignores' $!"; } # Import config Keywords @@ -96,7 +96,7 @@ foreach $file (@files) foreach my $s (@search) { foreach (grep(/$s/i, split(/\n/, $site))) { - if($_ =~ m/prolibre/i) { + if($_ =~ m/club/i) { print "\033[35mIGNORE "; } else { push @found, $_;