Problem with DNS resolver library -- pydns
lei_pku at hotmail.com
Tue Oct 15 08:33:14 CEST 2002
Could you tell me where to get the pydns package besides sourceforge?
"VanL" <vlindberg at verio.net> wrote in message
news:mailman.1034616412.13524.python-list at python.org...
> Has anyone used the pynds resolver libraries? I think I must be missing
> something, because I'm just not getting out what I think that I should
> I'm trying to get a call getIP(domain, nameserver) that will return the
> IP of domain, (or at least what that nameserver thinks the IP is).
> However, I'm instead getting nothing in the answers, just a bunch of
> authority records.
> For example:
> import DNS
> r = DNS.Request(name='yahoo.com', server='18.104.22.168', qtype='A')
> a = r.req()
> ; <<>> PDG.py 1.0 <<>> yahoo.com A
> ;; options: recurs
> ;; got answer:
> ;; ->>HEADER<<- opcode 0, status NOERROR, id 0
> ;; flags: qr rd; Ques: 1, Ans: 0, Auth: 5, Addit: 5
> ;; QUESTIONS:
> ;; yahoo.com, type = A, class = IN
> ;; ANSWERS:
> ;; AUTHORITY RECORDS:
> yahoo.com 172800L NS ns1.yahoo.com
> yahoo.com 172800L NS ns2.yahoo.com
> yahoo.com 172800L NS ns3.yahoo.com
> yahoo.com 172800L NS ns4.yahoo.com
> yahoo.com 172800L NS ns5.yahoo.com
> ;; ADDITIONAL RECORDS:
> ns1.yahoo.com 172800L A 22.214.171.124
> ns2.yahoo.com 172800L A 126.96.36.199
> ns3.yahoo.com 172800L A 188.8.131.52
> ns4.yahoo.com 172800L A 184.108.40.206
> ns5.yahoo.com 172800L A 220.127.116.11
> ;; Total query time: 48 msec
> ;; To SERVER: 18.104.22.168
> ;; WHEN: Mon Oct 14 11:19:37 2002
> Notice that the ANSWERS section is empty. Not even the tests work:
> test5 returns an IndexError for trying to access answers['data'].
> Any help? Should I try another library? If so, which one?
More information about the Python-list