mirror of https://github.com/MISP/MISP-maltego
new: [entities] show attribute and object count in Event entity metadata
parent
ddb0ccab3c
commit
46ad6abdba
|
@ -32,6 +32,8 @@ class MISPEvent(Entity):
|
|||
# threat_level = EnumEntityField('type.enum', choices=['Undefined', 'Low', 'Medium', 'High'], display_name='Threat Level')
|
||||
# analysis = EnumEntityField('type.enum', choices=['Initial', 'Ongoing', 'Completed'])
|
||||
# org = StringEntityField('type.str', display_name='Organisation')
|
||||
count_attributes = IntegerEntityField('count_attributes', display_name="# attributes", matching_rule=MatchingRule.Loose)
|
||||
count_objects = IntegerEntityField('count_objects', display_name="# objects", matching_rule=MatchingRule.Loose)
|
||||
|
||||
|
||||
class MISPObject(Entity):
|
||||
|
|
|
@ -341,6 +341,8 @@ def event_to_entity(e, link_style=LinkStyle.Normal, link_direction=LinkDirection
|
|||
info=e['Event']['info'],
|
||||
link_style=link_style,
|
||||
link_direction=link_direction,
|
||||
count_attributes=len(e['Event'].get('Attribute')),
|
||||
count_objects=len(e['Event'].get('Object')),
|
||||
notes=notes,
|
||||
bookmark=Bookmark.Green)
|
||||
|
||||
|
|
Loading…
Reference in New Issue