Skip to content

Commit

Permalink
#937 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Feb 9, 2021
1 parent da49e8c commit 3b0fbf3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ share
analyzers/*/input
analyzers/*/output
responders/*/input
responders/*/output
responders/*/output
analyzers/*/cortexutils
2 changes: 1 addition & 1 deletion analyzers/EmlParser/EmlParser.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EmlParser",
"version": "1.2",
"version": "1.3",
"author": "ninsmith",
"url": "https://github.com/TheHive-Project/Cortex-Analyzers",
"license": "AGPL-V3",
Expand Down
3 changes: 1 addition & 2 deletions analyzers/EmlParser/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,10 @@ def parseEml(filepath, job_directory):
attachmentSumUp['md5'] = attachment['hash']['md5']
attachmentSumUp['sha1'] = attachment['hash']['sha1']
attachmentSumUp['sha256'] = attachment['hash']['sha256']
attachmentSumUp['blah'] = "3"
filepath = os.path.join(job_directory, 'output', attachment.get('filename', ''))
attachmentSumUp['path'] = filepath
with open(filepath, 'wb') as f:
f.write(attachment['raw'])
f.write(base64.b64decode(attachment['raw']))
f.close()
result['attachments'].append(attachmentSumUp)

Expand Down
2 changes: 1 addition & 1 deletion analyzers/EmlParser/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cortexutils;python_version>='3.5'
#cortexutils;python_version>='3.5'
eml_parser
python-magic
iocextract

0 comments on commit 3b0fbf3

Please sign in to comment.