Compare commits

..

2 Commits

Author SHA1 Message Date
Thomas Patzke 5c0f811f4a Sigma tools release 0.3.2 2018-03-21 01:15:19 +01:00
Thomas Patzke 0018503501 sigmac: Fixed rulecommend backend option 2018-03-21 01:13:10 +01:00
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f:
setup(
name='sigmatools',
version='0.3.1',
version='0.3.2',
description='Tools for the Generic Signature Format for SIEM Systems',
long_description=long_description,
url='https://github.com/Neo23x0/sigma',
+4 -1
View File
@@ -200,9 +200,12 @@ class QuoteCharMixin:
class RulenameCommentMixin:
"""Prefixes each rule with the rule title."""
prefix = "# "
options = (
("rulecomment", False, "Prefix generated query with comment containing title", None),
)
def generateBefore(self, parsed):
if "rulecomment" in self.options:
if self.rulecomment:
try:
return "\n%s%s\n" % (self.prefix, parsed.sigmaParser.parsedyaml['title'])
except KeyError: