Skip to content

Commit

Permalink
#535 add binary flag to open() function as input of hashlib()
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Sep 20, 2019
1 parent 68248c2 commit 79a01d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analyzers/HybridAnalysis/HybridAnalysis_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def run(self):

if hashes is None:
filepath = self.get_param('file', None, 'File is missing')
query_data = hashlib.sha256(open(filepath, 'r').read()).hexdigest()
query_data = hashlib.sha256(open(filepath, 'rb').read()).hexdigest()
else:
# find SHA256 hash
query_data = next(h for h in hashes if len(h) == 64)
Expand Down

0 comments on commit 79a01d1

Please sign in to comment.