diff options
Diffstat (limited to 'lib/dnspython/examples')
-rwxr-xr-x | lib/dnspython/examples/xfr.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/dnspython/examples/xfr.py b/lib/dnspython/examples/xfr.py index 5cd6f55c06..e67ab18927 100755 --- a/lib/dnspython/examples/xfr.py +++ b/lib/dnspython/examples/xfr.py @@ -1,9 +1,13 @@ #!/usr/bin/env python import dns.query +import dns.resolver import dns.zone -z = dns.zone.from_xfr(dns.query.xfr('204.152.189.147', 'dnspython.org')) +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: |