-
hi- i'm having an experience similar to discussion #824. i have the following: https://gist.github.com/junkb/1d66a2d7de99bb13ce19ca8abc368ea2 , and like @bjabson, it appears to work [a packet capture confirms the zone transfer succeeds], but i'm struggling to understand what to do with zone_transfer_result. what am i missing to [for example] print the zone data to stdout? thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It updates the zone object you gave it, so just use the zone object's various interfaces to get at the data. For example, here's printing the zone: z = dns.zone.Zone("example") |
Beta Was this translation helpful? Give feedback.
-
(The "update a zone object" design lets us support incremental zone transfers as well as regular zone transfers.) |
Beta Was this translation helpful? Give feedback.
-
thanks! i was overcomplicating it :) |
Beta Was this translation helpful? Give feedback.
It updates the zone object you gave it, so just use the zone object's various interfaces to get at the data. For example, here's printing the zone:
z = dns.zone.Zone("example")
dns.query.inbound_xfr("127.0.0.1", z)
for n in sorted(z.nodes.keys()):
print(z[n].to_text(n))