mdaxfr

- Mass DNS AXFR
git clone git://git.acid.vegas/mdaxfr.git
Log | Files | Refs | Archive | README | LICENSE

commit f9f7e3d110d41b22478dd4c977e930b5943a9a0b
parent 6fc5d41124ec1dd4f164e9b2e0f5d54058d00895
Author: acidvegas <acid.vegas@acid.vegas>
Date: Sat, 28 Oct 2023 22:29:58 -0400

Fixing tld nameserver querying

Diffstat:
Mmdaxfr.py | 4++--

1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mdaxfr.py b/mdaxfr.py
@@ -52,7 +52,7 @@ def get_root_tlds() -> list:
 
 def get_tld_nameservers(tld: str) -> list:
     '''Get the nameservers for a TLD.'''    
-    return [nameserver for nameserver in dns.resolver.query(tld+'.', 'NS' )]
+    return [rdata.target for rdata in dns.resolver.resolve(tld+'.', 'NS')]
 
 def resolve_nameserver(nameserver: str) -> str:
     '''
@@ -74,7 +74,7 @@ if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='Mass DNS AXFR')
     parser.add_argument('-r', '--root', action='store_true', help='perform zone transfer on root nameservers')
     parser.add_argument('-t', '--tld', help='perform zone transfer on a specific TLD')
-    parser.add_argument('-ts', '--tlds', help='perform zone transfer on all TLDs')
+    parser.add_argument('-ts', '--tlds', action='store_true', help='perform zone transfer on all TLDs')
     parser.add_argument('-o', '--output', default='axfrout', help='output directory')
     args = parser.parse_args()