EMAILGEN.PHP - Source Code

<html><head><title>EmailGen</title></head><body>
<?
// EMAILGEN.PHP - Fake email generator (Anti-spambot)
// Copyright (C) 2002, Wayne Diamond
// http://www.pbcrypto.com
// Free for public use. Please do not remove this header,
// but you are free to modify the script at will.
// USAGE: Simply link to this PHP script and ensure the config is ok, that's all.
// DESCRIPTION: Whenever an email-harvesting bot visits your webpage, it'll
// end up harvesting fake, randomised email addresses. Additionally,
// the script links to itself and parses a different value each time,
// so most bots will think the link is a different page. The result?
// The bot stays in a loop, continually filling up its harvest email
// address list with fake emails. If they try to email these addresses, their
// email will simply be returned straight to them (so they spam themselves!)

// CONFIGURATION
   $filename
= "emailgen.php"; // filename of the script
   $delaysecs = 3;             // wait 3 seconds before generating
   $maxemails = 50;            // maximum emails to generate on each page
   $maxloops = 10;             // maximum number of times to recurse the hyperlink.
// Bots will either end up visiting just once, or this many times.
// The reason for limiting their recursiveness is to prevent them
// going into an infinite loop - that would just eat your bandwidth.
// END OF CONFIG

// Compatible with all versions of PHP
$phpver = phpversion();
if ($phpver > 4.1) { $pagenum = $_GET['pagenum']; }

if (!$pagenum) {
$pagenum = 1;
} else {
$pagenum = $pagenum + 1;
};
if ($pagenum <= $maxloops) { echo "<a href=\"$filename?pagenum=$pagenum\">This page again</a><br><br>"; }

sleep($delay); // Delay execution for 5 seconds

for ($i = 1; $i <= $maxemails; $i++) {
$nextmail = "";
srand ((double) microtime() * 1000000);
$rnd = rand(5,12);
for ($a = 1; $a <= $rnd; $a++) {
srand ((double) microtime() * 1000000);
$tmp = rand(97, 122);
$nextmail .= chr($tmp);
}
$nextmail .= "@";
srand ((double) microtime() * 1000000);
$rnd = rand(5,12);
for ($a = 1; $a <= $rnd; $a++) {
// srand ((double) microtime() * 1000000);
$tmp = rand(97, 122);
$nextmail .= chr($tmp);
}
srand ((double) microtime() * 1000000);
$rnd = rand(1,13);
if ($rnd == 1) {
$nextmail = $nextmail . ".com";
} elseif ($rnd == 2) {
$nextmail = $nextmail . ".com"; // favour .com, so have it twice
} elseif ($rnd == 3) {
$nextmail = $nextmail . ".biz";
} elseif ($rnd == 4) {
$nextmail = $nextmail . ".info";
} elseif ($rnd == 5) {
$nextmail = $nextmail . ".com.au";
} elseif ($rnd == 6) {
$nextmail = $nextmail . ".co.uk";
} elseif ($rnd == 7) {
$nextmail = $nextmail . ".sg";
} elseif ($rnd == 8) {
$nextmail = $nextmail . ".cn";
} elseif ($rnd == 9) {
$nextmail = $nextmail . ".fr";
} elseif ($rnd == 10) {
$nextmail = $nextmail . ".de";
} elseif ($rnd == 11) {
$nextmail = $nextmail . ".org";
} elseif ($rnd == 12) {
$nextmail = $nextmail . ".gov";
} elseif ($rnd == 13) {
$nextmail = $nextmail . ".net";
}
echo "<a href=\"mailto:$nextmail\">$nextmail</a><br>\n";
}
?>
</body></html>