From ae5ae8f763c48b67ff2c5ebdbf4ce11047d588d3 Mon Sep 17 00:00:00 2001 From: Thomas Patzke Date: Wed, 29 Mar 2017 22:21:40 +0200 Subject: [PATCH] Verbose mode prints tokens if parsing failed --- tools/sigmac.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/sigmac.py b/tools/sigmac.py index e2782b037..1a7ccd3c0 100755 --- a/tools/sigmac.py +++ b/tools/sigmac.py @@ -97,4 +97,9 @@ for sigmafile in get_inputs(cmdargs.inputs, cmdargs.recurse): print("Feel free to contribute for fun and fame, this is open source :) -> https://github.com/Neo23x0/sigma", file=sys.stderr) finally: f.close() + try: + for condtoken in parser.condtoken: + print_debug("Condition Tokens:", condtoken) + except AttributeError: + print_debug("Sigma rule didn't reached condition tokenization") print_debug()