Problem with DNS resolver library -- pydns

VanL vlindberg at
Mon Oct 14 19:32:05 CEST 2002


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='', server='', qtype='A')
a = r.req()
; <<>> 1.0 <<>> A
;; options: recurs
;; got answer:
;; ->>HEADER<<- opcode 0, status NOERROR, id 0
;; flags: qr rd; Ques: 1, Ans: 0, Auth: 5, Addit: 5
;;, type = A, class = IN


;; AUTHORITY RECORDS:               172800L  NS               172800L  NS               172800L  NS               172800L  NS               172800L  NS

;; ADDITIONAL RECORDS:           172800L  A           172800L  A           172800L  A           172800L  A           172800L  A

;; Total query time: 48 msec
;; 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?



More information about the Python-list mailing list