Script para mostrar ip del registo A y MX de un domino


Muestra diferente informaciĆ³n de los registros de un dominio. Para la revisiĆ³n de direcciones IPs de dominios o subdominios de sus registro A y MX.

#!/bin/bash
#Usage
# bash script.sh "domain.com"
echo -e "[i] IP: "$( dig +noall +answer +short $1 )
echo -e "[i] MX: "$( dig +noall +answer +short MX $1 )
echo -e "[i] IP MX: "$( dig +noall +answer +short $( dig +noall +answer +short MX $1 | cut -f2 -d' ' ) )
echo -e "[i] Server Domain IP:"$( dig +short +noall +answer -x $(dig +noall +answer +short $1) )
echo -e "[i] Server Domain IP MX:"$( dig +short +noall +answer -x $( dig +noall +answer +short $( dig +noall +answer +short MX $1 | cut -f2 -d' ' ) ) )
echo -e "[i] Whois"
whois $1