I am looking for a way to get the primary and secondary NS records of a given domain name, and the IP addresses associated with them.
Now this kind of information is available from websites like intodns.com, but I am working on a huge list of domains and would like to automate this process with a bash script (probably not the best choice for this...).
I tried nslookup domain.com
, which gives me the primary NS IP address.
hostname domain.com
returns nothing...
I also tested dig domain.com TYPE NS
which doesn't add much info.
At this point I am thinking of a wget
of the intodns.com page and parsing the html to get what I need...
Do you know of any better way for doing this?
Thanks a lot!