%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/doc/python3-dnspython/examples/
Upload File :
Create Path :
Current File : //usr/share/doc/python3-dnspython/examples/xfr.py

#!/usr/bin/env python3

import dns.query
import dns.resolver
import dns.zone

soa_answer = dns.resolver.resolve('dnspython.org', 'SOA')
master_answer = dns.resolver.resolve(soa_answer[0].mname, 'A')

z = dns.zone.from_xfr(dns.query.xfr(master_answer[0].address, 'dnspython.org'))
for n in sorted(z.nodes.keys()):
    print(z[n].to_text(n))

Zerion Mini Shell 1.0