Skip to content

Commit

Permalink
Merge pull request #730 from TofBaasken/master
Browse files Browse the repository at this point in the history
Fix bug emlparser when 'content-type' string in mail is in lower case
  • Loading branch information
garanews authored Apr 24, 2020
2 parents c7bc691 + 11fca40 commit b4fe28a
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 @@ -89,7 +89,7 @@ def parseEml(filepath):
#splited string because it was returning the body inside 'Content-Type'
hParser = email.parser.HeaderParser()
h = str(hParser.parsestr(raw_eml))
result['headers'] = h[:h.index('Content-Type:')]
result['headers'] = h[:h.lower().index('content-type:')]

parsed_eml = eml_parser.eml_parser.decode_email(filepath, include_raw_body=True, include_attachment_data=True)
#parsed_eml['header'].keys() gives:
Expand Down

0 comments on commit b4fe28a

Please sign in to comment.