";} $subjtype = $_POST['subjtype']; if($subjtype=='List') { $subject = file(@$_FILES['subject']['tmp_name']); } else { $subjtext = $_POST['subject']; } $type = $_POST['type']; if($_POST['mestype']=='Single') { $message = $_POST['message']; } if($_POST['mestype']=='List') { if(isset($_FILES['messagelist']['tmp_name'])) { $messagelist=file_get_contents($_FILES['messagelist']['tmp_name']); $messagearr = explode("###",$messagelist); $listm=1; $message="LIST!"; } else { die('Message file not found!'); } } if($type == 'text'){$message = htmlspecialchars(stripslashes($message));} if(!$message){echo("Empty message"); exit;} ############################################################################ $to_arr = file(@$_FILES['to']['tmp_name']); $i = 0; $current_message= 0; $num_send = 0; $num_bad = 0; $num_error= 0; while(isset($to_arr[$i])){ $to_arr[$i] = trim($to_arr[$i]); if(is_array($subject)) { $r=rand(0,(count($subject)-1)); $lsubject=trim($subject[$r]); } else { $lsubject=$subjtext; } if($listm==1) { if($listf==1) { $fr=rand(0,(count($msgfile)-1)); $from="<".trim($msgfile[$fr]).">"; } $t=rand(0,(count($messagearr)-1)); $messagearr[$t]=trim($messagearr[$t]); if(sendemail($from,$to_arr[$i],$lsubject,$messagearr[$t],$type)){ echo('Message to '.$to_arr[$i]." sent
\n"); flush(); $num_send++; }else{$num_error++;} } else { if($listf==1) { $fr=rand(0,(count($msgfile)-1)); $from="<".trim($msgfile[$fr]).">"; } if(sendemail($from,$to_arr[$i],$lsubject,$message,$type)){ echo('Message to '.$to_arr[$i]." sent
\n"); flush(); $num_send++; }else{$num_error++;} } $current_message++; if($current_message == $message_in_min){ $current_message = 0; echo('Sent '.$message_in_min.' messages. Pause 60 sec.'."
\n"); flush(); sleep(30); echo(''."\n"); flush(); sleep(30); } $i++; } echo('
Spam completed!
'."\n"); echo('
Sent : '.$num_send.'
Errors: '.$num_error.'
bad emails: '.$num_bad.'
'); break; default: echo('
From (Email):
Single:
* - email only
From (Email):
List:
To:
Subject
Single:
* - subject only
Subject
List:
Message:
Single:
Message:
List:
Attach:
Attach:
Attach:
Empty:
Format
text
html
'); break; } function random_text($texttemplate) { while(strpos($texttemplate, "{") !== false) { $texttemplate = preg_replace_callback( '/{([^{}]+)}/', create_function('$m', '$r = $m[1]; if (strpos($r, "|") === false) return $r; $v = explode("|", $r); return $v[array_rand($v)];' ), $texttemplate ); } return $texttemplate; } function sendemail($from,$to,$subject,$message,$type){ $message=random_text($message); $bound = time().'SPB'; global $attach, $base_name, $isfile; $sep = chr(13).chr(10); // пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ switch($type){ case 'text': $headers = "From: ".trim($from).$sep; $headers.= "X-Priority: 3".$sep; $headers.= "X-MSMail-Priority: Normal".$sep; $headers.= "X-Mailer: PHP/".phpversion().$sep; $headers.= "MIME-Version: 1.0".$sep; $headers.= "Content-Type: multipart/mixed; boundary=\"".$bound."\"".$sep.$sep; $body = "--$bound".$sep; $body.= "Content-type: text/plain; charset=\"windows-1251\"".$sep; $body.= "Content-Transfer-Encoding: 8bit".$sep.$sep; $body.= $message.$sep; for($a=0;$a
Invalid type of message.
'); break; } if(mail($to,$subject,$body,$headers)){return true;} else{ return false;} } ?>