echo; echo "What is the domain you're digging?"; read as; IP=$(dig $as | awk '/^;; ANSWER SECTION:$/ { getline ; print $5 }'); IPin=$(dig @ns.inmotionhosting.com $as | awk '/^;; ANSWER SECTION:$/ { getline ; print $5 }'); Nameservers=$(dig $as ns +short | sed 's/.$//'); clear; echo; echo -e "Dig results for \033[00;33m$as\033[0m"; echo; echo -e "\033[01;36mA record @ DNS\033[0m = $IP"; echo -e "\e[01;93mA record @ IMH NS\033[0m = $IPin"; if [[ "$IP" != "$IPin" ]]; then echo; echo -e "\033[01;35m@NS mismatch, using CDN, custom NS or not pointed to us\033[0m"; fi; echo; echo -e "\033[01;36mNamservers:\033[0m"; if [[ "$Nameservers" != *"inmotionhosting"* ]]; then echo -e "\033[00;33m$Nameservers\033[0m"; else echo -e "\033[00;32m$Nameservers\033[0m"; fi; echo; echo -e "\033[01;36mPTR\033[0m for $IP = `dig -x $IP +short | head -1 | sed 's/.$//'`"; echo -e "\033[01;36mHostname\033[0m set for $IP = "`host $IP 2>/dev/null | awk '{print $5}' | sed 's/.$//'`; echo; echo -e "\033[01;36mSPF\033[0m Record = `dig $as TXT +short | sed 's/.$//'`"; echo -e "\033[01;36mDMARC\033[0m Record = `dig _dmarc.$as TXT +short | sed 's/.$//'`" ;echo; echo -e "\033[01;36mMX\033[0m record for $as:"; echo `dig $as mx +short`; echo; echo -e "\033[01;36mDomain expiration:\033[0m `whois $as |grep "Expiration Date:"| awk -F"Date:" '{print $2}'|cut -f 1`"; echo -e "\033[01;36mDomain registrar:\033[0m `whois $as |grep -i "Registrar:"| awk -F "Registrar:" '{print $2}'|cut -f 1`";