summaryrefslogtreecommitdiff
path: root/lib/dnspython/examples/xfr.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dnspython/examples/xfr.py')
-rwxr-xr-xlib/dnspython/examples/xfr.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/dnspython/examples/xfr.py b/lib/dnspython/examples/xfr.py
new file mode 100755
index 0000000000..5cd6f55c06
--- /dev/null
+++ b/lib/dnspython/examples/xfr.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+import dns.query
+import dns.zone
+
+z = dns.zone.from_xfr(dns.query.xfr('204.152.189.147', 'dnspython.org'))
+names = z.nodes.keys()
+names.sort()
+for n in names:
+ print z[n].to_text(n)