mirror of
https://github.com/valitydev/SigmaHQ.git
synced 2024-11-06 17:35:19 +00:00
Fixed before/after logic
If nothing was generated "None" was printed.
This commit is contained in:
parent
e76ef7da76
commit
ec3f0f6d60
@ -95,9 +95,13 @@ class BaseBackend:
|
||||
def generate(self, sigmaparser):
|
||||
"""Method is called for each sigma rule and receives the parsed rule (SigmaParser)"""
|
||||
for parsed in sigmaparser.condparsed:
|
||||
self.output.print(self.generateBefore(parsed), end="")
|
||||
before = self.generateBefore(parsed)
|
||||
if before is not None:
|
||||
self.output.print(before, end="")
|
||||
self.output.print(self.generateQuery(parsed))
|
||||
self.output.print(self.generateAfter(parsed), end="")
|
||||
after = self.generateAfter(parsed)
|
||||
if after is not None:
|
||||
self.output.print(after, end="")
|
||||
|
||||
def generateQuery(self, parsed):
|
||||
result = self.generateNode(parsed.parsedSearch)
|
||||
|
Loading…
Reference in New Issue
Block a user