Skip to content

Commit

Permalink
restore wildcard rdtype optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Feb 14, 2024
1 parent ce95ce8 commit 28f24ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bbot/core/helpers/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ async def is_wildcard_domain(self, domain, log_info=False):
# resolve a bunch of random subdomains of the same parent
is_wildcard = False
wildcard_results = dict()
for rdtype in rdtypes_to_check:
for rdtype in list(rdtypes_to_check):
# continue if a wildcard was already found for this rdtype
# if rdtype in self._wildcard_cache[host_hash]:
# continue
Expand All @@ -952,6 +952,8 @@ async def is_wildcard_domain(self, domain, log_info=False):
wildcard_results[rdtype].update(results)
# we know this rdtype is a wildcard
# so we don't need to check it anymore
with suppress(KeyError):
rdtypes_to_check.remove(rdtype)

self._wildcard_cache.update({host_hash: wildcard_results})
wildcard_domain_results.update({host: wildcard_results})
Expand Down

0 comments on commit 28f24ac

Please sign in to comment.