mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-07 09:28:58 +00:00
Fixes hashes in EmlParser
This commit is contained in:
parent
e3b618cbc1
commit
b5e1870c5b
@ -85,7 +85,6 @@ def parseEml(filepath):
|
||||
#attachments
|
||||
try:
|
||||
for attachment in parsed_eml['attachment']:
|
||||
sha256 = hashlib.sha256()
|
||||
attachmentSumUp = dict()
|
||||
attachmentSumUp['filename'] = attachment.get('filename', '')
|
||||
|
||||
@ -94,8 +93,9 @@ def parseEml(filepath):
|
||||
#it has to be calculated, the attachment is in base64
|
||||
attachmentSumUp['mime'] = magic.from_buffer(binascii.a2b_base64(attachment['raw']))
|
||||
attachmentSumUp['extension'] = attachment.get('extension', '')
|
||||
sha256.update(attachment['raw'])
|
||||
attachmentSumUp['sha256'] = sha256.hexdigest()
|
||||
attachmentSumUp['md5'] = attachment['hash']['md5']
|
||||
attachmentSumUp['sha1'] = attachment['hash']['sha1']
|
||||
attachmentSumUp['sha256'] = attachment['hash']['sha256']
|
||||
result['attachments'].append(attachmentSumUp)
|
||||
|
||||
except KeyError as e:
|
||||
|
@ -52,7 +52,13 @@
|
||||
</thead>
|
||||
<tbody ng-repeat="a in content.attachments">
|
||||
<tr>
|
||||
<td rowspan=2>{{a.filename}}</td>
|
||||
<td rowspan=3>{{a.filename}}</td>
|
||||
<td>[MD5]: {{a.md5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[SHA1]: {{a.sha1}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[SHA256]: {{a.sha256}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user