diff --git a/src/MISP_maltego/transforms/attributetoevent.py b/src/MISP_maltego/transforms/attributetoevent.py index e76b596..3f4b127 100644 --- a/src/MISP_maltego/transforms/attributetoevent.py +++ b/src/MISP_maltego/transforms/attributetoevent.py @@ -32,7 +32,7 @@ class AttributeInMISP(Transform): pass misp = get_misp_connection(config) - events_json = misp.search(controller='events', value=maltego_misp_attribute.value, withAttachments=False) + events_json = misp.search(controller='events', value=maltego_misp_attribute.value, with_attachments=False) # we need to do really rebuild the Entity from scratch as request.entity is of type Unknown for e in events_json: attr = get_attribute_in_event(e, maltego_misp_attribute.value) @@ -59,7 +59,7 @@ class AttributeInMISP(Transform): # cidrs = ipaddress.summarize_address_range(ipaddress.IPv4Address(ip_start), ipaddress.IPv4Address(ip_end)) # for cidr in cidrs: # print(str(cidr)) -# attr_json = misp.search(controller='attributes', values=str(cidr), withAttachments=False) +# attr_json = misp.search(controller='attributes', value=str(cidr), with_attachments=False) # print(attr_json) # return response @@ -87,14 +87,14 @@ class AttributeToEvent(Transform): tag_name = get_entity_property(request.entity, 'tag_name') if not tag_name: tag_name = request.entity.value - events_json = misp.search(controller='events', tags=tag_name, withAttachments=False) + events_json = misp.search(controller='events', tags=tag_name, with_attachments=False) for e in events_json: response += event_to_entity(e, link_direction=LinkDirection.OutputToInput) return response # from Object elif 'properties.mispobject' in request.entity.fields: if request.entity.fields.get('event_id'): - events_json = misp.search(controller='events', eventid=request.entity.fields.get('event_id').value, withAttachments=False) + events_json = misp.search(controller='events', eventid=request.entity.fields.get('event_id').value, with_attachments=False) for e in events_json: response += event_to_entity(e, link_direction=LinkDirection.OutputToInput) return response @@ -102,7 +102,7 @@ class AttributeToEvent(Transform): return response # standard Entities (normal attributes) else: - events_json = misp.search(controller='events', value=request.entity.value, withAttachments=False) + events_json = misp.search(controller='events', value=request.entity.value, with_attachments=False) # return the MISPEvent or MISPObject of the attribute for e in events_json: diff --git a/src/MISP_maltego/transforms/eventtoattributes.py b/src/MISP_maltego/transforms/eventtoattributes.py index 86d0192..0826b9e 100644 --- a/src/MISP_maltego/transforms/eventtoattributes.py +++ b/src/MISP_maltego/transforms/eventtoattributes.py @@ -39,7 +39,7 @@ class EventToTransform(Transform): maltego_misp_event = request.entity self.misp = get_misp_connection(config) event_id = maltego_misp_event.id - search_result = self.misp.search(controller='events', eventid=event_id, withAttachments=False) + search_result = self.misp.search(controller='events', eventid=event_id, with_attachments=False) if search_result: self.event_json = search_result.pop() else: diff --git a/src/MISP_maltego/transforms/galaxytoevent.py b/src/MISP_maltego/transforms/galaxytoevent.py index e68c5f8..9ad608a 100644 --- a/src/MISP_maltego/transforms/galaxytoevent.py +++ b/src/MISP_maltego/transforms/galaxytoevent.py @@ -41,7 +41,7 @@ class GalaxyToEvents(Transform): tag_name = maltego_misp_galaxy.tag_name else: tag_name = maltego_misp_galaxy.value - events_json = misp.search(controller='events', tags=tag_name, withAttachments=False) + events_json = misp.search(controller='events', tags=tag_name, with_attachments=False) for e in events_json: response += MISPEvent(e['Event']['id'], uuid=e['Event']['uuid'], info=e['Event']['info'], link_direction=LinkDirection.OutputToInput) return response