1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 08:08:10 +00:00

Expose deprecated status and notice in hash info

This commit is contained in:
Dávid Bolvanský 2022-09-04 23:02:06 +02:00
parent ea29cb5805
commit ba886c4805

View File

@ -639,6 +639,7 @@ void hash_info_single_json (hashcat_ctx_t *hashcat_ctx, user_options_extra_t *us
if (hashconfig_init (hashcat_ctx) == 0)
{
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
module_ctx_t *module_ctx = hashcat_ctx->module_ctx;
printf ("\"%u\": { ", hashconfig->hash_mode);
printf ("\"name\": \"%s\", ", hashconfig->hash_name);
@ -648,6 +649,13 @@ void hash_info_single_json (hashcat_ctx_t *hashcat_ctx, user_options_extra_t *us
printf ("\"password_len_min\": %u, ", hashconfig->pw_min);
printf ("\"password_len_max\": %u, ", hashconfig->pw_max);
printf ("\"is_deprecated\": %s, ", (module_ctx->module_deprecated_notice != MODULE_DEFAULT) ? "true" : "false");
if (module_ctx->module_deprecated_notice != MODULE_DEFAULT) {
const char *deprecated_notice = module_ctx->module_deprecated_notice (hashconfig, hashcat_ctx->user_options, user_options_extra);
printf ("\"deprecated_notice\": \"%s\", ", deprecated_notice);
}
printf ("\"is_salted\": %s, ", (hashconfig->is_salted == true) ? "true" : "false");
if (hashconfig->is_salted == true)