Skip to content

Commit

Permalink
run.py: use suricata_bin for suricata binary
Browse files Browse the repository at this point in the history
suricata_bin is set correctly on startup for Windows or Linux. Fixes
running suricata-verify on certain Windows environments.
  • Loading branch information
jasonish committed Jun 14, 2023
1 parent bb05244 commit de752d2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@
VALIDATE_EVE = False
WIN32 = sys.platform == "win32"
LINUX = sys.platform.startswith("linux")
suricata_bin = "src\suricata.exe" if WIN32 else "./src/suricata"
suricata_yaml = "suricata.yaml" if WIN32 else "./suricata.yaml"

# Determine the Suricata binary
if os.path.exists("src\suricata.exe"):
suricata_bin = "src\suricata.exe"
else:
suricata_bin = "./src/suricata"

PROC_TIMEOUT=300

if LINUX:
Expand Down Expand Up @@ -849,7 +854,7 @@ def default_args(self):
args += [ "valgrind", "-v", "--error-exitcode=255", suppression_opt ]

args += [
os.path.join(self.cwd, "src/suricata"),
os.path.join(self.cwd, suricata_bin),
]

# Load args from config file.
Expand Down

0 comments on commit de752d2

Please sign in to comment.