fix: Provide the extension of the EML file to attach.

pull/232/head
Raphaël Vinot 2018-05-07 10:18:38 +02:00
parent 1193e904bf
commit cb15bdfca1
1 changed files with 1 additions and 4 deletions

View File

@ -25,16 +25,13 @@ class EMailObject(AbstractMISPObjectGenerator):
super(EMailObject, self).__init__('email', standalone=standalone, **kwargs)
self.__email = message_from_bytes(self.__pseudofile.getvalue(), policy=policy.default)
if attach_original_email:
self.add_attribute('eml', value='Full email', data=self.__pseudofile)
self.add_attribute('eml', value='Full email.eml', data=self.__pseudofile)
self.generate_attributes()
@property
def email(self):
return self.__email
def force_eml(self, pseudofile):
self.eml.data = pseudofile
@property
def attachments(self):
to_return = []