Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
echo -e "\e[0;32mPlease enter the email address of who we're sending to: \e[0;36m";
read emailaddress;
emaildomain=$(echo "$emailaddress" | sed -r -e 's/^[^@]*[@]//g');
mailexchanger=$(dig -t mx +noall +answer $emaildomain | awk '{print $6}' | head -n 1);
mailserver=$(dig -t A +noall +answer $mailexchanger | awk '{print $5}' | head -n 1);
echo -e "\e[0;32mPlease enter the name of the relay server we're pretending to be (or make something up): \e[0;36m";
read helo;
echo -e "\e[0;32mPlease enter your email address (for replies to be sent): \e[0;36m";
read from;
@Mr920
Mr920 / cls - ls custom format
Last active August 29, 2015 13:55
cls - ls custom format
#!/bin/bash
printf '%s\n' $'\e[1;31m'"$(readlink -f "$PWD/"${1:-.}"")"$'\e[0m' && echo -e " " && ls -p --group-directories-first --color --width=80 ""${1:-.}"";