Skip to content

Commit

Permalink
better error handling in intercept modules
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Apr 25, 2024
1 parent 1e49271 commit 949f9c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions bbot/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions bbot/test/test_step_1/test_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 949f9c7

Please sign in to comment.