Update yeti.py

change logs
pull/488/head
Sebdraven 2021-03-19 15:29:21 +01:00
parent 1be2c27131
commit ed3e0d56fd
1 changed files with 1 additions and 5 deletions

View File

@ -73,8 +73,7 @@ class Yeti():
object_misp = self.get_object(obs_to_add)
if object_misp:
self.misp_event.add_object(object_misp)
print(self.misp_event.to_json())
print('Event MISP %s' % self.misp_event.to_json())
def get_result(self):
event = json.loads(self.misp_event.to_json())
results = {key: event[key] for key in ('Attribute', 'Object')}
@ -94,15 +93,12 @@ class Yeti():
def __get_relation(self, obj_yeti):
typ_attribute = self.misp_mapping[obj_yeti['type']]
attr_misp = {'value': obj_yeti['value']}
print('att %s' % typ_attribute)
if typ_attribute == 'ip-src' or typ_attribute == 'ip-dst':
return 'ip'
elif 'domain' == typ_attribute:
return 'domain'
elif 'hostname' == typ_attribute:
return 'domain'
print('Attribute %s' % attr_misp)
return attr_misp