Skip to content

Commit

Permalink
Fix emlParser crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian GAULTIER committed Mar 11, 2019
1 parent 9cb7dcf commit 41aaf01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analyzers/EmlParser/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41aaf01

Please sign in to comment.