From 48f3f9eea0ea92fdae52851430a827c16e611352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 7 May 2018 10:53:40 +0200 Subject: [PATCH] fix: Add extension in case the attachment has no name. --- mail_to_misp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail_to_misp.py b/mail_to_misp.py index fc3f8cf..daccc51 100755 --- a/mail_to_misp.py +++ b/mail_to_misp.py @@ -107,7 +107,7 @@ class Mail2MISP(): # Create file objects for the attachments for attachment_name, attachment in email_object.attachments: if not attachment_name: - attachment_name = 'NameMissing' + attachment_name = 'NameMissing.txt' f_object, main_object, sections = make_binary_objects(pseudofile=attachment, filename=attachment_name, standalone=False) self.misp_event.add_object(f_object) if main_object: