We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c71a9c commit 9e0e948Copy full SHA for 9e0e948
intelmq/bots/parsers/json/parser.py
@@ -12,15 +12,19 @@
12
from intelmq.lib.bot import ParserBot
13
from intelmq.lib.message import MessageFactory
14
from intelmq.lib.utils import base64_decode
15
+import json
16
17
18
class JSONParserBot(ParserBot):
19
"""Parse IntelMQ-JSON data"""
20
splitlines = False
21
+ multiple_events = False
22
23
def process(self):
24
report = self.receive_message()
- if self.splitlines:
25
+ if self.multiple_events:
26
+ lines = [json.dumps(event) for event in json.loads(base64_decode(report['raw']))]
27
+ elif self.splitlines:
28
lines = base64_decode(report['raw']).splitlines()
29
else:
30
lines = [base64_decode(report['raw'])]
0 commit comments