!/usr/bin/perl ######################################################################### # # # Email Protector Script # # Version 1.22 (October 21, 2000) # # # ######################################################################### # # # This script protects your e-mail address from being grabbed by # # various e-mail collecting robots. # # # # Copyright (c) 1998-2000 by Christoph Rueegg # # Web site: http://www.siteware.ch/webresources/scripts/perl/emp.html # # # # 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, visit the Free # # Software Foundation's web site, http://www.fsf.org/ # ######################################################################### use strict; ############################## # Configuration # Operating mode # 0 = standard (prevents your email address from being grabbed) # 1 = bellingerent (prevents your email address from being grabbed and spams the spammer's database with 10,000 invalid addresses) my $mode = 0; # Enter your default e-mail user (the part left of the @) my $user = 'pascal.gigaud'; # Enter your default e-mail domain (the part right of the @) my $domain = 'free.fr'; # Robots from which the e-mail address will be hidden # A list of robots can be found at http://www.siteware.ch/webresources/useragents/collectors/ my @collectors = ('EmailSiphon', 'CherryPicker', 'EmailCollector', 'EmailWolf'); ############################## # Program # Retrieve email address to be protected. my @params = split(/&/, $ENV{'QUERY_STRING'}); # If an email address was supplied as a parameter, get it if (length(@params[0]) > 0) { # Split the parameters up into individual variables. foreach (@params) { my($name, $value) = split(/=/, $_); if ($name eq "user") { $user = $value; } elsif ($name eq "domain") { $domain = $value; } } } # Print HTML header print "Content-Type: text/html\n\n"; # Main program foreach (@collectors) { if ($ENV{'HTTP_USER_AGENT'} =~ $_) { if ($mode == 1) { print "The following 10,000 e-mail addresses are invalid:
\n"; for (my($i) = 0; $i < 10000; $i++) { print "email address #$i
\n"; } print "
\n"; } die; } } # Print true e-mail address print("$user\@$domain");