]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
more features detection in run.py
authorEric Leblond <eric@regit.org>
Thu, 1 Aug 2019 19:28:29 +0000 (21:28 +0200)
committerJason Ish <jason.ish@oisf.net>
Fri, 30 Apr 2021 18:08:31 +0000 (12:08 -0600)
run.py

diff --git a/run.py b/run.py
index 636a5f0609cd661f936aa704a052e927e3d05118..d6da6123cbc30686959ea530ace632bb7af5a2f6 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -226,9 +226,18 @@ class SuricataConfig:
 
     def load_build_info(self):
         output = subprocess.check_output([suricata_bin, "--build-info"])
+        start_support = False
         for line in output.splitlines():
             if line.decode().startswith("Features:"):
                 self.features = set(line.decode().split()[1:])
+            if "Suricata Configuration" in line.decode():
+                start_support = True
+            if start_support and "support:" in line.decode():
+                (fkey, val) = line.decode().split(" support:")
+                fkey = fkey.strip()
+                val = val.strip()
+                if val.startswith("yes"):
+                    self.features.add(fkey)
 
     def load_config(self, config_filename):
         output = subprocess.check_output([