PHP to flood email spam bots
Posted: Wed Mar 19, 2003 10:24 am
I've made a little script that will generate 2000 random emails, in which will flood a spam bot searching for emails.
Average load time: 3sec
Function: Generates 2000 emails
File size: 2kb
Example: http://www.perfectphp.com/random_emails.php
Source:
I'm looking for anyone to improve on this little function to make it faster to load, and will use all letters of the alphabits in the first and second variables. Comments welcome.
Average load time: 3sec
Function: Generates 2000 emails
File size: 2kb
Example: http://www.perfectphp.com/random_emails.php
Source:
Code: Select all
<?php
// Start "time taken to load" function
function utime (){
$time = explode( " ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
}
$start = utime();
echo "<a href="$PHP_SELF?list=" . md5(rand(1,9999)) . "" style=font-family:Verdana;font-size:18px;color:000000>Continue to another list of 2000 emails</a><p>\n\n";
for ($i = 0; $i < 2000; $i++) {
$first = rand(0,999) . rand(0,999) . rand(0,999);
$second = rand(0,999) . rand(0,999) . rand(0,999);
// Change numbers to letters
$first = str_replace("0", "a", $first);
$first = str_replace("1", "b", $first);
$first = str_replace("2", "c", $first);
$first = str_replace("3", "d", $first);
$first = str_replace("4", "e", $first);
$first = str_replace("5", "f", $first);
$first = str_replace("6", "g", $first);
$first = str_replace("7", "h", $first);
$first = str_replace("8", "i", $first);
$first = str_replace("9", "j", $first);
$second = str_replace("0", "a", $second);
$second = str_replace("1", "b", $second);
$second = str_replace("2", "c", $second);
$second = str_replace("3", "d", $second);
$second = str_replace("4", "e", $second);
$second = str_replace("5", "f", $second);
$second = str_replace("6", "g", $second);
$second = str_replace("7", "h", $second);
$second = str_replace("8", "i", $second);
$second = str_replace("9", "j", $second);
// Set domain name extention
$ext = rand(0, 9);
$ext = str_replace("0", "com", $ext);
$ext = str_replace("1", "net", $ext);
$ext = str_replace("2", "org", $ext);
$ext = str_replace("3", "us", $ext);
$ext = str_replace("4", "biz", $ext);
$ext = str_replace("5", "info", $ext);
$ext = str_replace("6", "tv", $ext);
$ext = str_replace("7", "cc", $ext);
$ext = str_replace("8", "ws", $ext);
$ext = str_replace("9", "name", $ext);
echo "<a href="mailto:$first@$second.$ext" style=font-family:Verdana;font-size:10px;color:7979BB>$first@$second.$ext</a><br>\n";
}
echo "<p>\n";
// Display "time taken to load" function
$end = utime();
$run = $end - $start;
echo "<font style=font-family:Verdana;font-size:10px;color:000000>Time taken to load: " . substr($run, 0, 5) . " secs";
?>