Skip to content

Commit

Permalink
fix: Error out if dumpcap is enabled but not available
Browse files Browse the repository at this point in the history
  • Loading branch information
rumpelsepp committed Oct 28, 2022
1 parent ca4b8ba commit c5f129a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gallia/command/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import asyncio
import fcntl
import os
import shutil
import signal
import sys
import traceback
Expand Down Expand Up @@ -495,6 +496,8 @@ async def setup(self, args: Namespace) -> None:
# Start dumpcap as the first subprocess; otherwise network
# traffic might be missing.
if args.dumpcap:
if shutil.which("dumpcap") is None:
self.parser.error("--dumpcap specified but `dumpcap` is not available")
self.dumpcap = await Dumpcap.start(args.target, self.artifacts_dir)
await self.dumpcap.sync()

Expand Down

0 comments on commit c5f129a

Please sign in to comment.