Problem with DNS resolver library -- pydns

VanL vlindberg at verio.net
Mon Oct 14 13:32:05 EDT 2002


Hello,

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 get.

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='151.164.1.1', qtype='A')
a = r.req()
a.show()
; <<>> 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       66.218.71.63
ns2.yahoo.com           172800L  A       209.132.1.28
ns3.yahoo.com           172800L  A       217.12.4.104
ns4.yahoo.com           172800L  A       63.250.206.138
ns5.yahoo.com           172800L  A       64.58.77.85

;; Total query time: 48 msec
;; To SERVER: 151.164.1.1
;; 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[0]['data'].

Any help?  Should I try another library?  If so, which one?

Thanks,

VanL





More information about the Python-list mailing list