I'm a python newbie and I don't understand why it won't read my IP and ADDR variables in the function dns.zone.query(IP, ADDR)???
import dns.query
import dns.zone
import sys
IP = sys.stdin.readline()
ADDR = sys.stdin.readline()
z = dns.zone.from_xfr(dns.query.xfr(IP , ADDR))
names = z.nodes.keys()
names.sort()
for n in names:
print z[n].to_text(n)
It works when I pass an actual IP and Domain, but not with the variables... I don't get what's wrong?