The whois-servers.net server automatically redirects you to the WHOIS server responsible for the supplied TLD, so you don't have to remember them (and it also simplifies this script).
#!/bin/ash
if [ ! -n "$1" ]
then
echo "Usage:"
echo " $0 domain.tld"
exit 1
fi
tld=`echo $1 | sed 's/\/.*//' | grep -o '[[:alpha:]]*$'`
echo "$1" | netcat -T $tld.whois-servers.net 43
echo
exit 0
No comments:
Post a Comment