#!/usr/local/bin/perl
############################################################################
# Spam-X version 3.0, A sophisticated and very mean spambot tarpit. #
# See http://www.lindstromconsulting.com/ for more information. #
# #
# Copyright (C) 2003 Nathan W. Lindstrom #
# #
# If you use this script on your web site, please put a link to #
# http://www.lindstromconsulting.com/ somewhere on your web site. Thanks! #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# You can also view it online at http://www.gnu.org/licenses/gpl.html #
############################################################################
use IO::Handle; # Allows us to use "autoflush STDOUT;"
$http_user_agent = $ENV { 'HTTP_USER_AGENT' }; # Get the User-Agent of visitor
$referer = $ENV { 'HTTP_REFERER' }; # Find out who called us
$programpath = $programname = reverse ($0); # Load up our full path and name in reverse
$programpath =~ s/^[^\/]*\///; # Strip off our full name and trailing slash
$programname =~ s/\/.*//; # Strip off our full path, leaving our name...
$programname =~ s/lp\.//; # ...without the ".pl" extension
$programpath = reverse ($programpath); # Reverse the string to normal
$programname = reverse ($programname); # Reverse the string to normal
check_referer (); # Make sure we're authorized to respond
check_for_robot (); # Don't flood search engine crawlers or robots
flood_spambot (); # Flood visiting spambot with mailto: links
#################################################################################################
sub check_referer {
my $refokay = 0;
if (open (REFERER, "$programpath/$programname.domains")) {
flock (REFERER, 1);
while ( This is Spam-X, available from here. ");
autoflush STDOUT;
my @chars = ("a" .. "z", "0" .. "9", "-");
my @nextline = (" ", ", ", ". ", "; ", "--", "/", ". ", ".
", ".
");
# Full list of ICANN-approved TLDs
my @zones = ("aero", "biz", "com", "coop", "edu", "gov", "info", "int", "mil", "museum", "name", "net", "org", "pro");
for (my $i = 0; $i <= (rand (time())%1024); $i++) {
my $limit = (rand time())%32;
my $username = join("", @chars[ map { rand (@chars) } ( 0 .. $limit )]);
my $domain = join("", @chars[ map { rand (@chars) } ( 0 .. $limit )]);
my $zone = $zones[(rand (time())%$#zones)];
print ("");
print ("$wordlist[(rand (time())%($#wordlist + 1))] $wordlist[(rand (time())%($#wordlist + 1))] ");
print ("$username\@$domain.$zone ");
print ("$wordlist[(rand (time())%($#wordlist + 1))] $wordlist[(rand (time())%($#wordlist + 1))]");
print ("$nextline[(rand (time())%($#nextline + 1))]");
autoflush STDOUT;
sleep 1;
}
print ("
"); print ("$wordlist[(rand (time())%($#wordlist + 1))]."); print ("
\n"); print ("\n"); print ("\n"); }