Skip to content

Commit

Permalink
better task debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Dec 26, 2023
1 parent b52c05b commit b47389f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bbot/core/helpers/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion bbot/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b47389f

Please sign in to comment.