mirror of https://github.com/MISP/MISP-maltego
Event to Event relation has DashDot Linkstyle
parent
656ab9a49d
commit
7e13696d1b
|
@ -214,8 +214,8 @@ def get_attribute_in_object(o, attribute_type, drop=False):
|
||||||
return found_attribute
|
return found_attribute
|
||||||
|
|
||||||
|
|
||||||
def event_to_entity(e):
|
def event_to_entity(e, link_style=LinkStyle.Normal):
|
||||||
return MISPEvent(e['Event']['id'], uuid=e['Event']['uuid'], info=e['Event']['info'])
|
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):
|
def galaxycluster_to_entity(c, link_label=None):
|
||||||
|
|
|
@ -3,6 +3,8 @@ from canari.maltego.transform import Transform
|
||||||
# from canari.framework import EnableDebugWindow
|
# from canari.framework import EnableDebugWindow
|
||||||
from MISP_maltego.transforms.common.entities import MISPEvent, MISPObject
|
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 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
|
import json
|
||||||
|
|
||||||
__author__ = 'Christophe Vandeplas'
|
__author__ = 'Christophe Vandeplas'
|
||||||
|
@ -33,7 +35,7 @@ class EventToAttributes(Transform):
|
||||||
if not event_json.get('Event'):
|
if not event_json.get('Event'):
|
||||||
return response
|
return response
|
||||||
for e in event_json['Event']['RelatedEvent']:
|
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 a in event_json['Event']["Attribute"]:
|
||||||
for entity in attribute_to_entity(a):
|
for entity in attribute_to_entity(a):
|
||||||
if entity:
|
if entity:
|
||||||
|
|
Loading…
Reference in New Issue