Skip to content

Commit

Permalink
Merge branch 'release/3.3.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Apr 11, 2024
2 parents d54cd55 + 502f396 commit 0400142
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion analyzers/ProofPoint/proofpoint_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def run(self):
if self.data_type == 'file':
filename = self.get_param('attachment.name', 'noname.ext')
filepath = self.get_param('file', None, 'File is missing')
sha256 = hashlib.sha256(open(filepath, 'r').read()).hexdigest()
with open(filepath, "rb") as f:
digest = hashlib.file_digest(f, "sha256")
sha256 = digest.hexdigest()
elif self.data_type == 'hash' and len(self.get_data()) == 64:
sha256 = self.get_data()
else:
Expand Down

0 comments on commit 0400142

Please sign in to comment.