#!/usr/bin/perl
# diesl0w@hackphreak.org
use LWP::Simple;
# Open Filter Word File
open(WORDS, "words.cfg") or die("Unable to open filter word file.");
@words = <WORDS>;
chomp(@words);
$find = join("|",@words);
close(WORDS);
# Open URL File
open(URLS, "<urls.cfg") or die("Unable to open url file.");
# Write Main Output File
while(<URLS>)
{
my($line) = $_;
chomp($line);
my $content = lc ( get("http://$line") );
while ( $content =~ m/($find)/ig )
{
my $whash = "hash.";
$whash = $whash.$line;
$whash{$1}++; #increment the hashed word
}
print "# $line #\n";
for my $key (keys %whash ) {
print "$key had count of: $whash{$key} \n";
$whash{$key} = '';
}
print "\n";
open(MAIN, ">main/$line.main") or die("Unable to open output content main file.");
print MAIN $content;
close(MAIN);
}
close(URLS);