fix: Properly get and decode the body of the email
父节点
cb15bdfca1
当前提交
04d3183115
|
|
@ -40,8 +40,8 @@ class EMailObject(AbstractMISPObjectGenerator):
|
|||
return to_return
|
||||
|
||||
def generate_attributes(self):
|
||||
if self.__email.get_body():
|
||||
self.add_attribute('email-body', value=self.__email.get_body().as_string())
|
||||
if self.__email.get_body(preferencelist=('html', 'plain')):
|
||||
self.add_attribute('email-body', value=self.__email.get_body(preferencelist=('html', 'plain')).get_payload(decode=True).decode())
|
||||
if 'Reply-To' in self.__email:
|
||||
self.add_attribute('reply-to', value=self.__email['Reply-To'])
|
||||
if 'Message-ID' in self.__email:
|
||||
|
|
|
|||
正在加载...
在新工单中引用