From 41aaf015f78544523ab35d08704608da1d69090f Mon Sep 17 00:00:00 2001 From: Florian GAULTIER Date: Mon, 11 Mar 2019 16:28:18 +0100 Subject: [PATCH] Fix emlParser crash --- analyzers/EmlParser/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analyzers/EmlParser/parse.py b/analyzers/EmlParser/parse.py index ce4f1e0c0..cfd606770 100755 --- a/analyzers/EmlParser/parse.py +++ b/analyzers/EmlParser/parse.py @@ -94,7 +94,7 @@ def parseEml(filepath): #and one with the email body as text but wrapped in html #let's arbitrary take the one wrapped in html as body for attachment in parsed_eml['attachment']: - if 'HTML text' in attachment['content_header']['content-description']: + if 'content-description' in attachment['content_header'] and 'HTML text' in attachment['content_header']['content-description']: result['body'] = base64.b64decode(attachment['raw']).decode('utf-8') #attachments