[geeks] Anti-Spammer Tool

Jonathan C. Patschke jp at celestrion.net
Fri Apr 5 19:05:04 CST 2002


Hey, everyone,

     I looked in my Apache logs this week and found out that lots of
little bastards are trying to exploit (the non-existent) formmail CGI on
my system.  Rather than be content with the 404s they're getting, I wrote
a CGI in Bourne shell that looks up their netblock administrator in WHOIS,
looks up their domain administrator using DNS, and emails Postmaster and
abuse at the resulting domains.  It also returns a customizably nasty
error message, hopefully scaring the crap out of someone doing it
manually, or inviting more abuse (and, thus, more reports) from an
auto-spammer.

     If you think you might enjoy playing with this, I've posted it to my
web site here:

     http://celestrion.net/projects/formmail/

     Any comments, improvements, corrections, and suggestions will be
gratefully accepted.  I can guarantee you that it's not the most efficient
use of /bin/sh or sed or awk, but it gets the job done, and it's fairly
easy-to-follow.

     Has anyone else been getting a -lot- of random hits for
/cgi-bin/formmail.pl?

--Jonathan



More information about the geeks mailing list