Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion trufflehog.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
SCRIPT_NAME = "scanner.py"
VERIFIED_FLAG = "--only-verified"
OVERLAP_FLAG = "--allow-verification-overlap"
# Check if the script is running on Windows or not
INTERPRETER = "python" if 'windir' in os.environ else "python3"


class BurpExtender(IBurpExtender, IHttpListener, IExtensionStateListener):
Expand Down Expand Up @@ -159,7 +161,7 @@ def start_external_process(self):
allow_overlap_flag = OVERLAP_FLAG if self.truffle_tab.getAllowOverlapFlag() else ""

# Build the command to start the child process
command = ["python3", binary_path, "--tempdir", self.temp_dir, "--trufflehog-path", self.truffle_tab.trufflehog_exec_path, only_verified_flag, allow_overlap_flag]
command = [INTERPRETER, binary_path, "--tempdir", self.temp_dir, "--trufflehog-path", self.truffle_tab.trufflehog_exec_path, only_verified_flag, allow_overlap_flag]

# Remove empty flags b/c they can cause errors
command = [c for c in command if c]
Expand Down