#!/usr/bin/perl # spamrr_v1.pl - # by dual # # shouts to phrox for the find, # bland for the inspiration, # ntheory for the help and # T.C & N.T. for the Perl Cookbook # # (...and don't actually use this) ###################################################### if ($#ARGV < 0) { help(); exit(-1); } $st = $ARGV[0]; sub help { print "spamrr_v1.pl -\n"; print "usage: perl spamrr.pl [x]\n"; print "where x is the coverage area\n"; print "requires lynx (http://lynx.browser.org/)\n"; } system("lynx -dump http://home.$st.rr.com > raw_$st"); open(RAW, "raw_$st") || die "error opening raw data: $!\n\n"; open(SPAM, ">spam_$st.txt") || die "could not create file: $!\n\n"; chomp(@data=); foreach $line(@data){ if ($line =~ /\[\d*\]/){ ($junk, $mail) = split(/]/, $line, 2); print SPAM "$mail\@$st.rr.com\n"; } } close(RAW); close(SPAM); unlink "raw_$st"; print "spam_$st.txt created\n";