Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- NC='\033[0m'
- GREEN='\e[38;5;82m'
- CYAN='\e[38;5;45m'
- RED='\e[38;5;196m'
- ##
- printf "\e[38;5;82m ____ _ _ _____ __ __ _______ _____ \n"
- printf "\e[38;5;82m | _ \ /\ | | | | / ____| | \/ | |__ __| | __ \ \n"
- printf "\e[38;5;82m | |_) | / \ | |__| | | (___ | \ / | | | | |__) | \n"
- printf "\e[38;5;82m | _ < / /\ \ | __ | \___ \ | |\/| | | | | ___/ \n"
- printf "\e[38;5;82m | |_) | / ____ \ | | | | ____) | | | | | | | | | \n"
- printf "\e[38;5;82m |____/ /_/ \_\ |_| |_| |_____/ |_| |_| |_| |_| V1.0 \n"
- printf "\e[38;5;82m \n"
- printf "\n"
- printf " . .._. __..___..___.__ . .. ._..__. .__ ._..__ . ..___. \n"
- printf " |\/| | (__ | [__ [__) |_/ | | | | [__) | [ __|__| | \n"
- printf " | |_|_.__) | [___| \ | \|____|_|__| | \_|_[_./| | | MISTER KLIO RIGHT \n"
- printf " \n"
- printf "${NC}\n"
- printf "${RED}${NC}\n\n"
- printf "\n";
- # mail.sh
- # echo "PUT YOUR MAIL BODY HERE" | mailx -s "We've blocked any access attempts to your account."
- #-S smtp=mail.mashami.com
- #-S smtp-auth=login
- #-S smtp-auth-user=service@mashami.com
- #-S smtp-auth-password=???
- #-S from="Service <sender@mail.com>" recipient@mail.com
- if [ $# -ne 7 ]
- then
- echo "Usage: $0 FromAdress ToAdress Domain MailServer MailTextFile AuthEmail AuthPass"
- stop 1
- fi
- # $authemail "mail smtp"
- $authemail=`echo $6|openssl enc -base64|awk 'sub("..$", "login@mail.com")'`
- # $authpass "mail password"
- $authpass=`echo $7|openssl enc -base64|awk 'sub("..$", "password")'`
- if [ ! -f $mailtext ]
- then
- echo "Cannot find your mail text file. Exiting..."
- exit 1
- fi
- exec 9<>/dev/tcp/$mailserver/25
- echo "HELO $domain" >&9
- read -r temp <&9
- echo "$temp"
- echo "auth login" >&9
- read -r temp <&9
- echo "$authemail" >&9
- read -r temp <&9
- echo "$authpass" >&9
- read -r temp <&9
- echo "Mail From: $from" >&9
- read -r temp <&9
- echo "$temp"
- echo "Rcpt To: $to" >&9
- read -r temp <&9
- echo "$temp"
- echo "Data" >&9
- read -r temp <&9
- echo "$temp"
- cat $mailtext >&9
- echo "." >&9
- read -r temp <&9
- echo "$temp"
- echo "quit" >&9
- read -r temp <&9
- echo "$temp"
- 9>&-
- 9<&-
- echo "All Done Sending Email. See above for errors"
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement