/usr/share/doc/python-dnspython/examples/xfr.py is in python-dnspython 1.10.0-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/usr/bin/env python
import dns.query
import dns.resolver
import dns.zone
soa_answer = dns.resolver.query('dnspython.org', 'SOA')
master_answer = dns.resolver.query(soa_answer[0].mname, 'A')
z = dns.zone.from_xfr(dns.query.xfr(master_answer[0].address, 'dnspython.org'))
names = z.nodes.keys()
names.sort()
for n in names:
print z[n].to_text(n)
|