# --- SpamTrap.pl by Randolf Richardson --- # This script is public domain. Use at your own risk. Its # purpose was inspired by a discussion in an anti-spam forum # addressed at SPAM-L@PEACH.EASE.LSOFT.COM. Please check for # updated versions of this script at the following web page # or eMail "randolf@inter-corporate.com" with suggestions: # http://www.inter-corporate.com/products/freeware/ # --- 2001-Oct-31 v1.00 --- # First version of spamtrap.pl released. $version{spamtrap} = "1.00"; # --- Variables --- $title = "Title goes here"; $desc = "Description goes here"; $email = "eMail address goes here"; $timezone = "-0800"; $logfile = "/internet/logs/spamtrap.log"; # --- HTTP headers --- print "Content-Type: text/html\n\n"; # --- HTML code --- print < $title

Welcome to our web page, blah, blah, blah...

Contact us:  $email EndOfText # --- Time and date --- local($sec,$min,$hour,$dom,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year += 1900; # --- Year 2000 compliance --- $mon++; # --- Make sure first month starts at "1" --- $ddom = $dom; # --- Double-digit Day of Month --- $mon = "0$mon" if (length($mon) == 1); $ddom = "0$ddom" if (length($ddom) == 1); $hour = "0$hour" if (length($hour) == 1); $min = "0$min" if (length($min) == 1); $sec = "0$sec" if (length($sec) == 1); local @month = ("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); local @week = ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); # --- Add to log file --- open(FILE,">>$logfile"); print FILE "$ENV{REMOTE_ADDR} [$year-$month[$mon]-$ddom $hour:$min:$sec $timezone] $email\n"; close(FILE);