From 6b13588ee75ab725f5429dd586bde49133799795 Mon Sep 17 00:00:00 2001 From: heuzef Date: Thu, 8 Feb 2018 09:42:46 +0100 Subject: [PATCH] Reorganise code --- defacement_check.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/defacement_check.pl b/defacement_check.pl index 4b4d449..452aeeb 100644 --- a/defacement_check.pl +++ b/defacement_check.pl @@ -16,7 +16,7 @@ sub uniq { print "\033[36m \nDEFACEMENT CHECK [" . $date . "]\n\nSearching for suspects ...\n"; print "FOUND \t\t=> URLs\n"; -# Import config +# Import config Website my @scan; my @search; my $websites = 'conf/websites.cfg'; @@ -29,6 +29,15 @@ if (open(my $f, '<:encoding(UTF-8)', $websites)) { warn "Could not open file '$websites' $!"; } +# Slurp Websites +my $site; +system("rm urls/*.urls"); +foreach $site (@scan) +{ + system("/bin/bash slurp_urls.sh $site"); +} + +# Import config Keywords my $keywords = 'conf/keywords.cfg'; if (open(my $f, '<:encoding(UTF-8)', $keywords)) { while (my $row = <$f>) { @@ -39,14 +48,6 @@ if (open(my $f, '<:encoding(UTF-8)', $keywords)) { warn "Could not open file '$keywords' $!"; } -# Slurp websites -my $site; -system("rm urls/*.urls"); -foreach $site (@scan) -{ - system("/bin/bash slurp_urls.sh $site"); -} - # Open URLS files my @files = glob( "urls/*.urls" ); my $file;