i get the following Error Message: "errorMessage": "Missing dataType field"
I rly dont know where it comes from and i didnt find anything on google or here the could bring me forward. I think i overseeing something, sr in advance.
I want to take a Alert/Case and get the IOCs out of the JSON. I just want to print it at the moment but later save it to a file. I rly dont know, where my mistake is.
If anyone could help me, even a link to a doku, i would be a little bit happy.
The Code is the following:
#!/usr/bin/env python3
# encoding: utf-8
from cortexutils.responder import Responder
import json
class Thor(Responder):
def __init__(self):
Responder.__init__(self)
def run(self):
Responder.run(self)
if self.data_type == 'thehive:case':
data = self.get_param('data.artifacts', None, 'No IOCs')
data = json.load(data)
print(json.dumps('data[hash]'))
elif self.data_type == 'thehive:alert':
data = self.get_param('data.artifacts', None, 'No IOcs')
data = json.dumps(data)
print(json.dumps('data[hash]'))
else:
self.error("WTF")
if __name__ == '__main__':
Thor().run()
Hi,
i get the following Error Message: "errorMessage": "Missing dataType field"
I rly dont know where it comes from and i didnt find anything on google or here the could bring me forward. I think i overseeing something, sr in advance.
I want to take a Alert/Case and get the IOCs out of the JSON. I just want to print it at the moment but later save it to a file. I rly dont know, where my mistake is.
If anyone could help me, even a link to a doku, i would be a little bit happy.
The Code is the following:
The json i work with: