fix: Properly decode the body depending on the encoding of the email

Fix #671
pull/681/head
Raphaël Vinot 2021-01-11 14:15:30 +01:00
parent c50bbd5d1c
commit fa95c9d84f
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ class EMailObject(AbstractMISPObjectGenerator):
if self.encapsulated_body == body.get_content_type():
comment += " De-Encapsulated from RTF in original msg."
self.add_attribute("email-body",
body.get_payload(decode=True).decode('utf8', 'surrogateescape'),
body.get_content(),
comment=comment)
headers = ["{}: {}".format(k, v) for k, v in message.items()]