Better Living Through Thinking |
|
Fun Ways to Aggravate SpammersMon, 19 Jul 2004Fun Ways to Aggravate Spammers: This entry falls under the "useless but fun to do" category of spam thwarting techniques. Several months ago, I was scanning my Apache web logs for anything funny. I found entries like this: xx.xx.xx.xx - - [27/Jan/2004:06:44:05 -0600] "POST /cgi-bin/formmail.pl HTTP/1.0" 403 307 Some poor schmuck looking for an open formmail.pl relay on my server. I honestly felt pity for the guy; 403 and 404 errors all day long can really take the wind out of your sails. So I decided to give the troller something useful to read (repetition is the key to learning): #!/usr/bin/perl -w use strict; print "Content-Type: text/html\n\n"; print <<_HTML_; <html> <head> <title>FormMail.pl</title> </head> <body> _HTML_ for (1..500) {
print "You are stupid.<br>\n" x 1000;
select(undef, undef, undef, .25);
}
print <<_HTML_; </body> </html> _HTML_ exit; This brief Perl script has brought me joy; my desire is that it brings formmail.pl trollers joy also. The script, when completely finished, returns an HTML page approximately 10,000,000 bytes long (10MB) and it takes about 2 minutes to do that (the select statement slows things down, so all the joy does not come at once). The above script is linked to the following files in my cgi-bin directory now: BFormMail.pl FormMail.pl comments.pl contact.cgi contact_us.pl formmail.cgi formmail.pl mailform.pl nether-mail.pl register.pl sendmail.cgi sendmail.pl Now my trolling friends get entries like this in my Apache log: 63.208.149.200 - - [06/Jul/2004:16:42:25 -0600] "POST /cgi-bin/formmail.pl HTTP/1.0" 200 10000073 216.234.203.132 - - [09/Jul/2004:13:42:18 -0600] "POST /cgi-bin/formmail.pl HTTP/1.0" 200 516071 66.54.3.245 - - [10/Jul/2004:00:51:31 -0600] "POST /cgi-bin/formmail.pl HTTP/1.1" 200 53321 209.183.136.159 - - [10/Jul/2004:03:08:41 -0600] "POST /cgi-bin/formmail.pl HTTP/1.0" 200 10000073 67.94.60.18 - - [11/Jul/2004:09:34:55 -0600] "POST /cgi-bin/formmail.pl HTTP/1.0" 200 114663 64.14.144.85 - - [12/Jul/2004:19:51:11 -0600] "POST /cgi-bin/formmail.pl HTTP/1.1" 200 69735 216.123.219.194 - - [13/Jul/2004:19:21:06 -0600] "POST /cgi-bin/formmail.pl HTTP/1.0" 200 90087 64.65.191.117 - - [13/Jul/2004:21:24:52 -0600] "POST /cgi-bin/mailform.pl HTTP/1.0" 200 81895 What a nice feeling it is to turn 403 and 404 HTTP errors into productive 200 HTTP responses, and just look at the bytes sent in the past month! |
Audio Broadcast(standby)Moon StatusPhase: 47.73%Illuminated: 99.49% Age (days): 14.09
Mon Feb 6 23:37:33 MST 2012 |