From a8c2e50036404acf4ad9d730bdf10bf9cf1d3623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 8 May 2018 11:03:38 +0200 Subject: [PATCH] fix: Properly pass the attached email to the object generator --- 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 1ec06dc..35b1c3e 100755 --- a/mail_to_misp.py +++ b/mail_to_misp.py @@ -77,7 +77,7 @@ class Mail2MISP(): # Search for email forwarded as attachment # I could have more than one, attaching everything. if attachment.get_filename() and attachment.get_filename().endswith('.eml'): - forwarded_emails.append(self.forwarded_email(pseudofile=BytesIO(attachment.get_content().get_payload(decode=True)))) + forwarded_emails.append(self.forwarded_email(pseudofile=BytesIO(attachment.get_content().as_bytes()))) else: filename = attachment.get_filename() if not filename: