Closed xorond closed 8 years ago
How about this instead, we use whois if available, if it isn't, do the lookup on ipinfo.io? The benefit of whois is that it does both a lookup for both ip or name. ipinfo.io of course requires an ip, so I think we should take advantage of whois if it is installed. What do you think?
if ! [[ $? = 0 ]]; then
nslookup $TARGET
fi
sleep 1 && whois -H $TARGET
if ! [[ $? = 0 ]]; then
sleep 1 && curl ipinfo.io/$TARGET
fi
}
## create pingsweep function
pingsweep()
Sounds good. Adding the changes now.
removes unnecessary dependency whois