Skip to content

Commit

Permalink
Merge pull request #1076 from blacklanternsecurity/gowitness-chromium…
Browse files Browse the repository at this point in the history
…-fix-2

Ensure gowitness has a working chrome install
  • Loading branch information
TheTechromancer authored Feb 8, 2024
2 parents e1e03ed + d37c0a3 commit 49b4f36
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bbot/modules/gowitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ async def setup(self):
custom_chrome_path = self.helpers.tools_dir / "chrome-linux" / "chrome"
if custom_chrome_path.is_file():
self.chrome_path = custom_chrome_path

# make sure we have a working chrome install
chrome_test_pass = False
for binary in ("chrome", "chromium", custom_chrome_path):
binary_path = self.helpers.which(binary)
if binary_path and Path(binary_path).is_file():
chrome_test_proc = await self.helpers.run([binary_path, "--version"])
if getattr(chrome_test_proc, "returncode", 1) == 0:
self.verbose(f"Found chrome executable at {binary_path}")
chrome_test_pass = True
break
if not chrome_test_pass:
return False, "Failed to set up Google chrome. Please install manually or try again with --force-deps."

self.db_path = self.base_path / "gowitness.sqlite3"
self.screenshot_path = self.base_path / "screenshots"
self.command = self.construct_command()
Expand Down

0 comments on commit 49b4f36

Please sign in to comment.