diff --git a/bbot/core/helpers/dns.py b/bbot/core/helpers/dns.py index ed880150a..2ed10c3e3 100644 --- a/bbot/core/helpers/dns.py +++ b/bbot/core/helpers/dns.py @@ -958,7 +958,8 @@ async def is_wildcard_domain(self, domain, log_info=False): # continue for _ in range(self.wildcard_tests): rand_query = f"{rand_string(digits=False, length=10)}.{host}" - wildcard_tasks[rdtype].append(self.resolve(rand_query, type=rdtype, use_cache=False)) + wildcard_task = asyncio.create_task(self.resolve(rand_query, type=rdtype, use_cache=False)) + wildcard_tasks[rdtype].append(wildcard_task) # combine the random results is_wildcard = False diff --git a/bbot/modules/base.py b/bbot/modules/base.py index 01299c216..4d82fa85b 100644 --- a/bbot/modules/base.py +++ b/bbot/modules/base.py @@ -608,7 +608,8 @@ async def _worker(self): self.scan.stats.event_consumed(event, self) self.debug(f"Handling {event}") async with self.scan._acatch(context), self._task_counter.count(context): - handle_event_task = asyncio.create_task(self.handle_event(event)) + task_name = f"{self.name}.handle_event({event]})" + handle_event_task = asyncio.create_task(self.handle_event(event), name=task_name) await handle_event_task self.debug(f"Finished handling {event}") else: