#!/bin/bash HOST=192.168.5.6 PORT=25 echo -n "Pozitiv vagy negativ virusteszt? ( [p]/n ): " read TESTTYPE if [ "$TESTTYPE" == "n" ] then MSG="Normal e-mail teszt" else MSG="X5O!P%@AP[4\PZX54(P^)7CC)7}\$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!\$H+H*" fi ( echo "ehlo meteor" echo "mail from: ica@meteor" echo "rcpt to: joska@verem.zold.and" echo "data" echo "Date: 2013" echo "From: Ica" echo "To: Joska" echo "Subject: Teszt level" echo "Message-ID: <123455>" echo "MIME-Version: 1.0" echo -e "Content-Type: multipart/mixed; boundary=\"aaaa\"" echo "Content-Disposition: inline" echo "User-Agent: testscript" echo echo "--aaaa" echo "Content-Type: text/plain; charset=us-ascii" echo "Content-Disposition: inline" echo echo "Virusteszt level" echo echo "--aaaa" echo "Content-Type: text/plain; charset=us-ascii" echo -e "Content-Disposition: attachment; filename=\"virustest.txt\"\n" echo -e "$MSG" echo "--aaaa" echo "." echo "quit" ) | nc $HOST $PORT