Update yeti.py

add relation object
pull/488/head
Sebdraven 2021-03-19 11:01:02 +01:00
parent 48f56b0690
commit 0618e288d3
1 changed files with 3 additions and 3 deletions

View File

@ -90,14 +90,14 @@ class Yeti():
def __get_attribute(self, obj_yeti):
typ_attribute = self.misp_mapping[obj_yeti['type']]
attr_misp = {'type':typ_attribute, 'value': obj_yeti['value']}
attr_misp = {'type':typ_attribute, 'value': obj_yeti['value'],
'object_relation': 'pdns'}
return attr_misp
def handler(q=False):
if q is False:
return False
apikey = None
yeti_url = None
yeti_client = None
@ -106,7 +106,7 @@ def handler(q=False):
attribute = request['attribute']
if attribute['type'] not in mispattributes['input']:
return {'error': 'Unsupported attributes type'}
print(request)
if 'config' in request and 'url' in request['config']:
yeti_url = request['config']['url']
if 'config' in request and 'apikey' in request['config']: