Skip to content

Commit

Permalink
Merge pull request #55 from CybercentreCanada/bugfix_file_name
Browse files Browse the repository at this point in the history
Use file hash instead of file name for decoded file name
  • Loading branch information
cccs-jh authored Jul 19, 2023
2 parents e3ee47a + 4a6edeb commit dfd0129
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def execute(self, request: ServiceRequest) -> None:
if request.deep_scan or (len(clean) > 1000 and heuristic.score >= 500) or diff_tags or rev_tags:
# Save extracted file
byte_count = 500
file_name = f"{os.path.basename(request.file_name)}_decoded_final"
file_name = f"{request.sha256}_decoded_final"
file_path = os.path.join(self.working_directory, file_name)
# Ensure directory exists before write
os.makedirs(os.path.dirname(file_path), exist_ok=True)
Expand Down

0 comments on commit dfd0129

Please sign in to comment.