How to massively query NS record in batch mode
My friend asked me to verify suspension of web hosting services which the domain name server has been changed to other hosting service. He just has a long file with a domain per line. The trick is to query NS record of each given domain to see whether it is his name server or not. It is very easy to do so for a domain but it is not funny for thousand domains.
I research for a while and find dig
. dig
supports batch mode by itself.
dig ns -f domain.txt | grep -v '^;' | grep NS
Tags: dig, hosting, domain name
- sugree's blog
- 2467 reads
Post new comment