Moin!
On 04.08.2007, at 05:44, Naveen Nathan wrote:
> import dns.resolver
> root_res = dns.resolver.Resolver(configure=False)
> root_res = ["192.228.79.201"] # B.ROOT-SERVERS.NET
> a = root_res.query('www.google.com.', 'ns')
>
> When executing these statements the dns.resolver.NoAnswer exception is
> raised. However there should be an additional section and I would like
> to know how I can get the answer/response object so I can retrieve
> this
> information.
Which is correct as you don't get an answer, you get a referral. The
resolver function is there for querying servers that have recursion
enabled. If you want to do other queries use the dns.query.udp function:
q = dns.message.make_query ('www.google.com.', dns.rdatatype.NS)
a = dns.query.udp (q, '192.228.79.201')
you can then traverse the additional section in a.additional.
> Basically for my end result I'm trying to gatjher information using
> dnspython
> in the fashion of dig +trace www.google.com so I can debug zones
> and perform
> sanity checks. Basically a small script that maks it easy to find
> problems
> domains at the registrar/parent, NS, and zone level.
I use the functions as described above to check if the zones on our
servers
are still delegated, so that should fit your purpose also.
Hope this helps.
So long
-Ralf
---
Ralf Weber
e: [email protected]
_______________________________________________
dnspython-users mailing list
[email protected]
http://woof.play-bow.org/mailman/listinfo/dnspython-users