From 2dcb5f1efaf10c281b84d0f0ca1ab2b37a880715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 17 Nov 2023 13:21:18 +0100 Subject: [PATCH] fix: Update calls to getStringStream to the public method --- pymisp/tools/emailobject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymisp/tools/emailobject.py b/pymisp/tools/emailobject.py index 8093872..cb75941 100644 --- a/pymisp/tools/emailobject.py +++ b/pymisp/tools/emailobject.py @@ -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,