NSLookup Functionality
Keywords: NSLookup Functionality RFC NSLOOKUP DNS
Question:
I wanted to write a simple script in WinBatch to help me automate some features of NSLOOKUP. Unfortunatly, it seems like WinBatch only has Host2Ip and Ip2Host functions. Furthermore, it seems to me that you cannot assign the queries to a different name server then the one you are currently using. Can I write a script that, for example, queries the a.root-servers.net for a SOA record of domain.com?Thanks in advance.
Answer:
UmmmThe WinSock extender does most any TCP communications. However some DNS users just use UDP.
I would guess that you can get the SOA record via TCP from a root server. However you need to know the protocol and port number presisely. If you can't use TCP and must use UDP then the WinSock extender will not work.
Try search Yahoo for RFC NSLOOKUP DNS and see what you find.
Question (cont'd):
Thanks for the quick reply.You gave me exactly the answer I was afraid to get. Haha! Seems like I have to script my own NSLOOKUP down to the bit. This is not a problem ofcourse, but I was hoping for a more quick (and dirty?) way to do this. Any way, thanks for the quick response!
(By the way; I am familiar with the DNS RFC's, no problems there!)
Article ID: W14562Filename: NSLookup Functionality.txt