mirror of https://github.com/MISP/PyMISP
fix: Provide the extension of the EML file to attach.
parent
1193e904bf
commit
cb15bdfca1
|
@ -25,16 +25,13 @@ class EMailObject(AbstractMISPObjectGenerator):
|
||||||
super(EMailObject, self).__init__('email', standalone=standalone, **kwargs)
|
super(EMailObject, self).__init__('email', standalone=standalone, **kwargs)
|
||||||
self.__email = message_from_bytes(self.__pseudofile.getvalue(), policy=policy.default)
|
self.__email = message_from_bytes(self.__pseudofile.getvalue(), policy=policy.default)
|
||||||
if attach_original_email:
|
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()
|
self.generate_attributes()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def email(self):
|
def email(self):
|
||||||
return self.__email
|
return self.__email
|
||||||
|
|
||||||
def force_eml(self, pseudofile):
|
|
||||||
self.eml.data = pseudofile
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def attachments(self):
|
def attachments(self):
|
||||||
to_return = []
|
to_return = []
|
||||||
|
|
Loading…
Reference in New Issue