diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2014-11-07 20:09:10 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-11-12 22:40:53 +0100 |
commit | fb39c6fb5edf70097ee31e1b8638838dfc081892 (patch) | |
tree | 670982bbd040b87c7acb3d91c0da1a05bfe65994 /third_party/dnspython/examples/xfr.py | |
parent | 776424e99113a3ffc6679c583093e2892304a7fd (diff) | |
download | samba-fb39c6fb5edf70097ee31e1b8638838dfc081892.tar.gz samba-fb39c6fb5edf70097ee31e1b8638838dfc081892.tar.xz samba-fb39c6fb5edf70097ee31e1b8638838dfc081892.zip |
Move dnspython to third_party.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 12 22:40:53 CET 2014 on sn-devel-104
Diffstat (limited to 'third_party/dnspython/examples/xfr.py')
-rwxr-xr-x | third_party/dnspython/examples/xfr.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/third_party/dnspython/examples/xfr.py b/third_party/dnspython/examples/xfr.py new file mode 100755 index 0000000000..e67ab18927 --- /dev/null +++ b/third_party/dnspython/examples/xfr.py @@ -0,0 +1,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) |