How to find out DNS ?

Matthew Sherborne miracle at paradise.net.nz
Fri Jun 28 18:29:10 EDT 2002


There is a way but it's very hard. You take a list of root dns servers, 
you get your local host name, (gethostbyaddr(youripaddress)), you remove 
from it the computer name, so you've just got the domain name. Then 
taking a list of "root" dns servers, you ask one of them, what's the dns 
server for this domain?

It'l l say "I don't know, ask server X" then you ask server X, which 
will be a closer server to your host than the root server. You keep on 
going until one of the servers says "yes, This is/I am  your server" 
then that's your dns server.

You can do this with  the code in http://pydns.sf.net.

Is it an open-source project you're working on? I might take an interest :)

Blessings
Matthew Sherborne








More information about the Python-list mailing list