Skip to content

Instantly share code, notes, and snippets.

import subprocess
import json
def run_axfr_query(name_server, domain):
# Run the AXFR query using dig
command = f"dig @{name_server} {domain} AXFR +noall +answer"
output = subprocess.check_output(command, shell=True, universal_newlines=True)
# Parse the output and create the JSON dictionary
records = {}