#!/usr/bin/perl
#
# Trap for Spammer Robots
# Bruno Wolff III
# February 1, 1999
#
use Time::CTime;
print "Content-Type: text/html\n";
# The only request types we want to handle are "GET" and "HEAD".
if ($ENV{'REQUEST_METHOD'} !~ m/GET|HEAD/) {
print "Status: 501 Method not implemented\n\n";
print "\n";
print "
\n";
print "501 Method Not Implemented\n";
print "\n";
print "Method Not Implemented
\n";
print "Method '$ENV{'REQUEST_METHOD'}' not implented for $ENV{'REQUEST_URI'}.\n";
print "\n";
exit;
}
# Wait a bit so that impolite robots don't go too fast.
sleep 2;
# Set mtime to a week ago.
$mtime = time - (7*24*60*60);
print strftime("Last-Modified: %a, %d %b %Y %T GMT\n", gmtime($mtime));
# The server will add other headers as well.
print "\n";
print "\n";
print "\n";
print "\n";
print "Spammer Robot Trap\n";
print "\n";
print "\n";
print "Spammer Robot Trap
\n";
print "\n";
srand(time|$$);
for($i=0; $i<100; $i++) {
$j = int(rand(1000000000));
print "- Another incarnation of this page.";
$k = int(rand(6)+3);
$login = '';
for ($l=0; $l<$k; $l++) {
$login .= pack('c', ord('a') + int(rand(26)));
}
$k = int(rand(13)+3);
$domain = '';
for ($l=0; $l<$k; $l++) {
$domain .= pack('c', ord('a') + int(rand(26)));
}
print " Bogus email address.\n";
}
print "
\n";
if (open(SIG, ';
close(SIG);
print @sig;
}
print "\n";
print "\n";