fix: Update calls to getStringStream to the public method

pull/1104/head
Raphaël Vinot 2023-11-17 13:21:18 +01:00
parent 4270e97cce
commit 2dcb5f1efa
1 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ class EMailObject(AbstractMISPObjectGenerator):
_html = body.get('html', {}).get('obj')
for attch in attachments:
if _html.find("cid:{0}".format(attch.cid)) != -1:
_content_type = attch._getStringStream('__substg1.0_370E')
_content_type = attch.getStringStream('__substg1.0_370E')
maintype, subtype = _content_type.split("/", 1)
related_content[attch.cid] = (attch,
{'obj': attch.data,
@ -210,7 +210,7 @@ class EMailObject(AbstractMISPObjectGenerator):
message.add_alternative(**mime_dict)
for attch in attachments: # Add attachments at the end.
if attch.cid not in related_content.keys():
_content_type = attch._getStringStream('__substg1.0_370E')
_content_type = attch.getStringStream('__substg1.0_370E')
maintype, subtype = _content_type.split("/", 1)
message.add_attachment(attch.data,
maintype=maintype,