mirror of https://github.com/MISP/misp-modules
parent
1be2c27131
commit
ed3e0d56fd
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue