Created
May 19, 2017 02:44
-
-
Save kurobeats/4d481e10d6086dadb3c2b28528e19ea6 to your computer and use it in GitHub Desktop.
whois but pretty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###### show Url information | |
function url-info() | |
{ | |
doms=$@ | |
if [ $# -eq 0 ]; then | |
echo -e "No domain given\nTry $0 domain.com domain2.org anyotherdomain.net" | |
fi | |
for i in $doms; do | |
_ip=$(host $i|grep 'has address'|awk {'print $4'}) | |
if [ "$_ip" == "" ]; then | |
echo -e "\nERROR: $i DNS error or not a valid domain\n" | |
continue | |
fi | |
ip=`echo ${_ip[*]}|tr " " "|"` | |
echo -e "\nInformation for domain: $i [ $ip ]\nQuerying individual IPs" | |
for j in ${_ip[*]}; do | |
echo -e "\n$j results:" | |
whois $j |egrep -w 'OrgName:|City:|Country:|OriginAS:|NetRange:' | |
done | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment