I hate spam. And when I started my website, I started to get a ton of it. How? By SpamBots, like EmailSyphon that trolls top level websites and fishes out email addresses. But now it's time I fought back.

I got a very efficiant script that will kill a spambot from harvesting email addresses.

Heres a demo of the script in action:

http://www.moonport.org/contact/contact.cgi

All junk email addresses.

Heres the script:

----------------------------------------------------------------------

#!/usr/bin/perl

## Number of email addresses to feed the bot ##

$generate = 2500;

################################


$| = 1;
print "Content-type: text/html\n\n";
print "<html><head><title>Contact Us</title></head><body><ul>\n";
srand;
@c = split(/ */, "bcdfghjklmnpqrstvwxyz");
@v = split(/ */, "aeiou");

for ($i = 0; $i < $generate; $i++) {
print "<li><a href=\"mailto:";
$userpw = "";
$k = int(rand(4))+1;
for ($j = 0; $j <= $k; $j++) { print "$c[int(rand(21))]$v[int(rand(5))]"; }
print "\@";
$k = int(rand(4));
for ($j = 0; $j <= $k; $j++) { print "$c[int(rand(21))]$v[int(rand(5))]"; }
$k = int(rand(3));
if ($k == 0) { print ".com"; }
if ($k == 1) { print ".net"; }
if ($k == 2) { print ".org"; }
print "\">";
$k = int(rand(50));
if ($k == 0) { print "Anne "; }
if ($k == 1) { print "Barbara "; }
if ($k == 2) { print "Carleen "; }
if ($k == 3) { print "Chas "; }
if ($k == 4) { print "Chrissy "; }
if ($k == 5) { print "Dennis "; }
if ($k == 6) { print "Donna "; }
if ($k == 7) { print "Edward "; }
if ($k == 8) { print "Frank "; }
if ($k == 9) { print "Gerald "; }
if ($k == 10) { print "Hellen "; }
if ($k == 11) { print "Jacqueline "; }
if ($k == 12) { print "Jas "; }
if ($k == 13) { print "Jennifer "; }
if ($k == 14) { print "Jerome "; }
if ($k == 15) { print "Jerry "; }
if ($k == 16) { print "Joe "; }
if ($k == 17) { print "John "; }
if ($k == 18) { print "Josh "; }
if ($k == 19) { print "Kevin "; }
if ($k == 20) { print "Leroy "; }
if ($k == 21) { print "Marian "; }
if ($k == 22) { print "Marie "; }
if ($k == 23) { print "Maureen "; }
if ($k == 24) { print "Melissa "; }
if ($k == 25) { print "Michael "; }
if ($k == 26) { print "Mike "; }
if ($k == 27) { print "Nancy "; }
if ($k == 28) { print "Nicholas "; }
if ($k == 29) { print "Patricia "; }
if ($k == 30) { print "Paul "; }
if ($k == 31) { print "Peter "; }
if ($k == 32) { print "Philip "; }
if ($k == 33) { print "Robert "; }
if ($k == 34) { print "Sean "; }
if ($k == 35) { print "Sheila "; }
if ($k == 36) { print "Stephen "; }
if ($k == 37) { print "Terry "; }
if ($k == 38) { print "Thomas "; }
if ($k == 39) { print "Anthony "; }
if ($k == 40) { print "Arthur "; }
if ($k == 41) { print "Jason "; }
if ($k == 42) { print "Andrew "; }
if ($k == 43) { print "Guy "; }
if ($k == 44) { print "Christopher "; }
if ($k == 45) { print "Donald "; }
if ($k == 46) { print "Marylou "; }
if ($k == 47) { print "Emily "; }
if ($k == 48) { print "Laura "; }
if ($k == 49) { print "Kim "; }
$k = int(rand(50));
if ($k == 0) { print "Abel"; }
if ($k == 1) { print "Amato"; }
if ($k == 2) { print "Bendit"; }
if ($k == 3) { print "Bitner"; }
if ($k == 4) { print "Chesterbrook"; }
if ($k == 5) { print "Connel"; }
if ($k == 6) { print "Dambro"; }
if ($k == 7) { print "Deininger"; }
if ($k == 8) { print "Ellenbogen"; }
if ($k == 9) { print "Ellison"; }
if ($k == 10) { print "Fox"; }
if ($k == 11) { print "Foy"; }
if ($k == 12) { print "Glover"; }
if ($k == 13) { print "Gdansk"; }
if ($k == 14) { print "Hamilton"; }
if ($k == 15) { print "Hill"; }
if ($k == 16) { print "Ingle"; }
if ($k == 17) { print "Inzaina"; }
if ($k == 18) { print "Jolley"; }
if ($k == 19) { print "Jorden"; }
if ($k == 20) { print "Kane"; }
if ($k == 21) { print "Kellog"; }
if ($k == 22) { print "Lakofsky"; }
if ($k == 23) { print "Litwa"; }
if ($k == 24) { print "Madonna"; }
if ($k == 25) { print "Martin"; }
if ($k == 26) { print "Natale"; }
if ($k == 27) { print "Nitz"; }
if ($k == 28) { print "Odell"; }
if ($k == 29) { print "Orsini"; }
if ($k == 30) { print "Palermo"; }
if ($k == 31) { print "Peck"; }
if ($k == 32) { print "Quirk"; }
if ($k == 33) { print "Quinlan"; }
if ($k == 34) { print "Remish"; }
if ($k == 35) { print "Robinson"; }
if ($k == 36) { print "Schaffer"; }
if ($k == 37) { print "Schultz"; }
if ($k == 38) { print "Taylor"; }
if ($k == 39) { print "Tosti"; }
if ($k == 40) { print "Urie"; }
if ($k == 41) { print "Utt"; }
if ($k == 42) { print "Vernon"; }
if ($k == 43) { print "Venezia"; }
if ($k == 44) { print "Wifi"; }
if ($k == 45) { print "Wagner"; }
if ($k == 46) { print "Yank"; }
if ($k == 47) { print "Williams"; }
if ($k == 48) { print "Zahm"; }
if ($k == 49) { print "Zappitelli"; }
print "</a>\n";
}
print "</ul></body></html>\n";


END OF SCRIPT

------------------------------------------------------------------

Now save that as ANYFILENAME.CGI and put it on your web site space. Make sure you CHMOD the script and directory you put it in 755. Then put these lines in your website HTML (this is ONLY an example. whatever could be anything, botbomb could be any name and whatever could be any name):

<a href="http://www.whatever.com/botbomb/whatever.cgi></a>

The way SPAMBOTS work is it sniffs the HTMLs for email addresses (emailto: tags) and puts them in the database. They usually follow all links (a href="" tags) and gather more email addresses The trick is to get a spambot to follow your link to the script, and after 500-1000 crap email addresses, the spam harvester usually will have to dump the list, because it's corrupted.

The easiest way, and safer for your visitors, but fatal to SpamBpts, is if you set up an empty URL link in your CGI script (such as <a href="http://www.mysite.com/cgi-bin/trash.cgi"></a> ) Your users won't see the link, but Spambots will! I suggest having MULTIPLE copies of this in diffrent directories and filenames to really give spam harvester bots the case of the shits.

I tested this setup with Advanced Email Harvester, Email Syphon, and Power Email Harvester, and I find that the MAXIMUM number you should set to send is 2500 email addresses per URL. Any more than that, and the harvester will abort. My goal is not to have it just simply abort, oh no. I want to give those email harvesters a whole load of crap.

Enjoy! ph34r.gif