From: Shivani Bhardwaj Date: Fri, 5 Jun 2020 13:13:16 +0000 (+0530) Subject: createst: add strictcsum option X-Git-Tag: suricata-6.0.4~257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da2e34ce38dfff7f9747955d384e706ca8018956;p=thirdparty%2Fsuricata-verify.git createst: add strictcsum option --- diff --git a/createst.py b/createst.py index 6b8fa4c25..3801873e3 100755 --- a/createst.py +++ b/createst.py @@ -141,6 +141,8 @@ def write_to_file(data): sys.exit(1) with open(test_yaml_path, "w+") as fp: fp.write("# *** Add configuration here ***\n\n") + if not args["strictcsums"]: + fp.write("args:\n- -k none\n\n") fp.write(data) @@ -340,6 +342,8 @@ def parse_args(): help="Create filter blocks based on event types only") parser.add_argument("--allow-events", nargs="?", default=None, help="Create filter blocks for the specified events") + parser.add_argument("--strictcsums", default=None, action="store_true", + help="Stricly validate checksum") # add arg to allow stdout only args = parser.parse_args() @@ -379,6 +383,8 @@ def generate_eve(): largs = create_local_args() env = create_env() + if not args["strictcsums"]: + largs += ["-k", "none"] p = subprocess.Popen( largs, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)