diff --git a/bbot/modules/base.py b/bbot/modules/base.py index c102b138d..a55ff2ae4 100644 --- a/bbot/modules/base.py +++ b/bbot/modules/base.py @@ -1481,6 +1481,10 @@ async def _worker(self): except asyncio.CancelledError: self.log.trace("Worker cancelled") raise + except BaseException as e: + self.critical(f"Critical failure in intercept module {self.name}: {e}") + self.critical(traceback.format_exc()) + self.scan.stop() self.log.trace(f"Worker stopped") async def get_incoming_event(self): diff --git a/bbot/test/test_step_1/test_target.py b/bbot/test/test_step_1/test_target.py index ed5c1b7ef..7d8117d52 100644 --- a/bbot/test/test_step_1/test_target.py +++ b/bbot/test/test_step_1/test_target.py @@ -51,12 +51,12 @@ def test_target(bbot_scanner): assert not "www.evilcorp.com" in strict_target target = Target() - target.add_target("evilcorp.com") + target.add("evilcorp.com") assert not "com" in target assert "evilcorp.com" in target assert "www.evilcorp.com" in target strict_target = Target(strict_scope=True) - strict_target.add_target("evilcorp.com") + strict_target.add("evilcorp.com") assert not "com" in strict_target assert "evilcorp.com" in strict_target assert not "www.evilcorp.com" in strict_target