Where is the Windows version of the Linux file resolv.conf?

I'm currently trying to do a reverse DNS lookup on all ips in the local subnet. My code takes in resolv.conf on Linux to do the reverse lookup but I need to make the script cross platform compatible so I'm trying to find the Windows equivalent.

I've checked the etc directory that hosts resides in and the information on Google seems to say that Windows doesn't exactly use a file to point to the nameserver? If so, how do I get the IP of the local nameserver (eg. 192.168.0.1 or 192.168.2.2)?

link|improve this question
Indeed, nameserver info is not stored in a file. What is your script written in? – squillman Sep 19 '11 at 20:37
It's written in python. How should I get the ip of the nameserver in python then? – Emsu Sep 19 '11 at 20:39
You're asking how to get host info via Python. Off to SO you go. – mfinni Sep 19 '11 at 20:52
feedback

closed as off topic by mfinni, mailq, WesleyDavid, John Gardeniers, Shane Madden Sep 20 '11 at 3:16

Questions on Server Fault are expected to generally relate to servers, networking, or desktop infrastructure, within the scope defined in the faq.

1 Answer

up vote 1 down vote accepted

There is no file for it. Use ipconfig /all to see your configured nameservers.

link|improve this answer
In python, is there a better way than calling ipconfig/all and parsing the results? – Emsu Sep 19 '11 at 20:42
@Emsu How should I know? Isn't there a help on Python? – mailq Sep 19 '11 at 20:43
Yeah, I was just wondering if you might know. Thanks for your help :) – Emsu Sep 19 '11 at 20:46
@Emsu Google knows everything: thescriptlibrary.com/… – mailq Sep 19 '11 at 20:55
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.