1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Merge pull request #3134 from matrix/fix_PT_UPPER_testPassword

Fixed --hash-info example password output: force uppercase if OPTS_TYPE_PT_UPPER is set
This commit is contained in:
Jens Steube 2022-01-16 13:40:10 +01:00 committed by GitHub
commit 2915e9e9ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -29,6 +29,7 @@
- Fixed bug on benchmark engine, from now it will not stop at the first error detected
- Fixed false negative on Unit Test in case of out-of-memory with grep in single mode
- Fixed Unit Test early exit on luks test file download/extract failure
- Fixed --hash-info example password output: force uppercase if OPTS_TYPE_PT_UPPER is set
##
## Technical

View File

@ -699,6 +699,20 @@ void hash_info_single (hashcat_ctx_t *hashcat_ctx, user_options_extra_t *user_op
hcfree (tmp_buf);
}
else if (hashconfig->opts_type & OPTS_TYPE_PT_UPPER)
{
size_t st_pass_len = strlen (hashconfig->st_pass);
char *tmp_buf = (char *) hcmalloc (st_pass_len + 1);
strncpy (tmp_buf, hashconfig->st_pass, st_pass_len);
uppercase ((u8 *) tmp_buf, st_pass_len);
event_log_info (hashcat_ctx, " Example.Pass........: %s", tmp_buf);
hcfree (tmp_buf);
}
else
{
event_log_info (hashcat_ctx, " Example.Pass........: %s", hashconfig->st_pass);