From 8512268542a452f8278bb13ca4aca83e5107a2b6 Mon Sep 17 00:00:00 2001 From: Christophe Vandeplas Date: Wed, 1 Apr 2020 20:38:43 +0200 Subject: [PATCH] new: [transform] from (hash)tag to MISP event works now --- src/MISP_maltego/transforms/attributetoevent.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/MISP_maltego/transforms/attributetoevent.py b/src/MISP_maltego/transforms/attributetoevent.py index daba654..46306d8 100644 --- a/src/MISP_maltego/transforms/attributetoevent.py +++ b/src/MISP_maltego/transforms/attributetoevent.py @@ -103,6 +103,15 @@ class AttributeToEvent(Transform): return response else: return response + # from Hashtag + elif 'properties.temp' in request.entity.fields: + tag_name = get_entity_property(request.entity, 'Temp') + if not tag_name: + tag_name = request.entity.value + 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 # standard Entities (normal attributes) else: events_json = misp.search(controller='events', value=request.entity.value, with_attachments=False)