a/aaaa decoders: Ensure addresses are always unique

This commit is contained in:
Oleksii Shevchuk 2019-04-23 09:30:38 +03:00
parent 0218599f11
commit d1da866eeb
1 changed files with 3 additions and 3 deletions

View File

@ -182,11 +182,11 @@ class DnsCommandsClient(Thread):
'{} is not supported by native resolver'.format(self.qtype)
)
return [
return set(
addr[0] for af_family, _, _, _, addr in socket.getaddrinfo(
hostname, 80, family
) if af_family == family
]
)
def _dnslib_resolve(self, hostname):
q = dnslib.DNSRecord.question(hostname, self.qtype)
@ -230,7 +230,7 @@ class DnsCommandsClient(Thread):
result.append(str(record.rdata))
return result
return set(result)
def _aaaa_page_decoder(self, addresses, nonce, symmetric=None):
if symmetric is None: