Allow dns zone transfer from IPv6 (#1643)

This commit is contained in:
notEvil 2019-10-28 11:31:50 +01:00 committed by Joshua Tauberer
parent 50e9e8af30
commit 7558ffd4f3
1 changed files with 4 additions and 1 deletions

View File

@ -876,7 +876,10 @@ def get_secondary_dns(custom_dns, mode=None):
if not hostname.startswith("xfr:"): if not hostname.startswith("xfr:"):
if mode == "xfr": if mode == "xfr":
response = dns.resolver.query(hostname+'.', "A") response = dns.resolver.query(hostname+'.', "A")
hostname = str(response[0]) values.extend(map(str, response))
response = dns.resolver.query(hostname+'.', "AAAA")
values.extend(map(str, response))
continue
values.append(hostname) values.append(hostname)
# This is a zone-xfer-only IP address. Do not return if # This is a zone-xfer-only IP address. Do not return if