Skip to content

Conversation

ganzm
Copy link

@ganzm ganzm commented Sep 15, 2025

For zip2john, if there is only one candiate file, it is being prepeanded to the hash. This file name should also be sanitized and stripped off ':'

For zip2john, if there is only one candiate file, it is being prepeanded to the hash. This file name should also be sanitized and stripped off ':'
ctx->num_candidates, ctx->archive.check_bytes);
if(ctx->num_candidates == 1) {
/* sanitize here, as we don't need the raw file_name any more when exiting this function */
replace(ctx->best_files[0].file_name, ':', ' ');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment (I haven't tested this): I see we already replace with a space in line 957 in current code but IMHO we should replace with some non-space character such as '_' in both places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants