diff options
| author | Bob Halley <halley@nominum.com> | 2011-05-03 11:21:21 +0100 |
|---|---|---|
| committer | Bob Halley <halley@nominum.com> | 2011-05-03 11:21:21 +0100 |
| commit | 2a44fece55034369d8e85aac67957546ec3eeaf4 (patch) | |
| tree | 69f512bcf2e8f74aa5bf2a1e65f9ea25e7f65fab /examples | |
| parent | e09149d72cb9e3fbd6393a6355ed532f6ace1642 (diff) | |
| download | dnspython-2a44fece55034369d8e85aac67957546ec3eeaf4.tar.gz | |
compute dnspython.org master server and xfr from it
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/xfr.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/xfr.py b/examples/xfr.py index 5cd6f55..e67ab18 100755 --- a/examples/xfr.py +++ b/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: |
