DNS Check

(echo;read -p "What is the domain? " domain;echo -e "\n\nDOMAIN: $domain\n\nREGISTRAR:\n$(whois $domain | egrep "Registrar( URL:|:)"|awk '{print $1,$2,$3,$4,$5,$6}')\n\nNAME SERVERS:\n$(whois $domain|grep "Name Server:"|awk '{print $3}'|xargs dig|grep IN|grep -v ";"|awk '{print $1" " $5}')\n\nA Records:\n$(dig A $domain|grep IN|grep -v ";"|awk '{print $1" " $5}')\n\nMX Records:\n$(dig MX $domain|grep IN|grep -v ";"|awk '{print$6}'|xargs dig A |grep IN|grep -v ";"|awk '{print $1" " $5}')\n")

Output example:

DOMAIN: google.com

NAME SERVERS:
NS1.GOOGLE.COM. 216.239.32.10
NS2.GOOGLE.COM. 216.239.34.10
NS3.GOOGLE.COM. 216.239.36.10
NS4.GOOGLE.COM. 216.239.38.10
ns3.google.com. 216.239.36.10
ns1.google.com. 216.239.32.10
ns2.google.com. 216.239.34.10
ns4.google.com. 216.239.38.10

A Records:
google.com. 172.217.8.174

MX Records:
alt1.aspmx.l.google.com. 209.85.144.27
alt4.aspmx.l.google.com. 209.85.202.27
alt3.aspmx.l.google.com. 64.233.186.27
aspmx.l.google.com. 108.177.112.27
alt2.aspmx.l.google.com. 74.125.141.27