Event to Event relation has DashDot Linkstyle

pull/12/head
Christophe Vandeplas 2018-12-01 19:44:28 +01:00
parent 656ab9a49d
commit 7e13696d1b
2 changed files with 5 additions and 3 deletions

View File

@ -214,8 +214,8 @@ def get_attribute_in_object(o, attribute_type, drop=False):
return found_attribute
def event_to_entity(e):
return MISPEvent(e['Event']['id'], uuid=e['Event']['uuid'], info=e['Event']['info'])
def event_to_entity(e, link_style=LinkStyle.Normal):
return MISPEvent(e['Event']['id'], uuid=e['Event']['uuid'], info=e['Event']['info'], link_style=link_style)
def galaxycluster_to_entity(c, link_label=None):

View File

@ -3,6 +3,8 @@ from canari.maltego.transform import Transform
# from canari.framework import EnableDebugWindow
from MISP_maltego.transforms.common.entities import MISPEvent, MISPObject
from MISP_maltego.transforms.common.util import get_misp_connection, attribute_to_entity, event_to_entity, galaxycluster_to_entity, object_to_entity, object_to_attributes
from canari.maltego.message import LinkStyle
import json
__author__ = 'Christophe Vandeplas'
@ -33,7 +35,7 @@ class EventToAttributes(Transform):
if not event_json.get('Event'):
return response
for e in event_json['Event']['RelatedEvent']:
response += event_to_entity(e)
response += event_to_entity(e, link_style=LinkStyle.DashDot)
for a in event_json['Event']["Attribute"]:
for entity in attribute_to_entity(a):
if entity: