mirror of https://github.com/MISP/mail_to_misp
fix: missing attachment file name
parent
e364b69bfa
commit
e713ab2939
|
@ -106,6 +106,8 @@ class Mail2MISP():
|
||||||
if email_object.attachments:
|
if email_object.attachments:
|
||||||
# Create file objects for the attachments
|
# Create file objects for the attachments
|
||||||
for attachment_name, attachment in email_object.attachments:
|
for attachment_name, attachment in email_object.attachments:
|
||||||
|
if not attachment_name:
|
||||||
|
attachment_name = 'NameMissing'
|
||||||
f_object, main_object, sections = make_binary_objects(pseudofile=attachment, filename=attachment_name, standalone=False)
|
f_object, main_object, sections = make_binary_objects(pseudofile=attachment, filename=attachment_name, standalone=False)
|
||||||
self.misp_event.add_object(f_object)
|
self.misp_event.add_object(f_object)
|
||||||
if main_object:
|
if main_object:
|
||||||
|
|
Loading…
Reference in New Issue