Reorganise code

master
heuzef 7 years ago
parent 556f64ac63
commit 6b13588ee7
  1. 19
      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;

Loading…
Cancel
Save