mirror of https://github.com/MISP/PyMISP
Properly split ip:port for ipv4 (openioc import)
parent
be0c8a1f8c
commit
c348fcc7dc
|
@ -147,5 +147,9 @@ def set_all_attributes(openioc, misp_event):
|
||||||
comment = extract_field(item, 'Comment')
|
comment = extract_field(item, 'Comment')
|
||||||
if comment:
|
if comment:
|
||||||
attribute_values["comment"] = '{} {}'.format(attribute_values["comment"], comment)
|
attribute_values["comment"] = '{} {}'.format(attribute_values["comment"], comment)
|
||||||
|
|
||||||
|
if mapping['type'] in ['ip-src', 'ip-dst'] and value.count(':') == 1:
|
||||||
|
attribute_values['type'] = mapping['type'] + '|port'
|
||||||
|
attribute_values['value'] = attribute_values['value'].replace(':', '|')
|
||||||
misp_event.add_attribute(**attribute_values)
|
misp_event.add_attribute(**attribute_values)
|
||||||
return misp_event
|
return misp_event
|
||||||
|
|
Loading…
Reference in New Issue