mirror of
https://github.com/valitydev/SigmaHQ.git
synced 2024-11-08 10:13:57 +00:00
Merge pull request #470 from stevengoossensB/master
Mapping the fields in the select statement according to the configuration file
This commit is contained in:
commit
02d193c518
@ -198,9 +198,11 @@ class QRadarBackend(SingleTextQueryBackend):
|
||||
|
||||
qradarPrefix="SELECT "
|
||||
try:
|
||||
mappedFields = []
|
||||
for field in sigmaparser.parsedyaml["fields"]:
|
||||
mapped = sigmaparser.config.get_fieldmapping(field).resolve_fieldname(field, sigmaparser)
|
||||
qradarPrefix += str(sigmaparser.parsedyaml["fields"]).strip('[]')
|
||||
mappedFields.append(mapped)
|
||||
qradarPrefix += str(mappedFields).strip('[]')
|
||||
except KeyError: # no 'fields' attribute
|
||||
mapped = None
|
||||
qradarPrefix+="UTF8(payload) as search_payload"
|
||||
|
Loading…
Reference in New Issue
Block a user