Compare commits

...

12 Commits

@ -889,6 +889,13 @@ typedef void * hc_dynfunc_t;
* structs
*/
typedef struct dynamicx
{
char *dynamicx_buf;
u32 dynamicx_len;
} dynamicx_t;
typedef struct user
{
char *user_name;
@ -916,9 +923,10 @@ typedef struct split
typedef struct hashinfo
{
user_t *user;
char *orighash;
split_t *split;
dynamicx_t *dynamicx;
user_t *user;
char *orighash;
split_t *split;
} hashinfo_t;

@ -1400,6 +1400,7 @@ bool autodetect_hashmode_test (hashcat_ctx_t *hashcat_ctx)
hashinfo_t *hash_info = (hashinfo_t *) hcmalloc (sizeof (hashinfo_t));
hash_info->dynamicx = (dynamicx_t *) hcmalloc (sizeof (dynamicx_t));
hash_info->user = (user_t *) hcmalloc (sizeof (user_t));
hash_info->orighash = (char *) hcmalloc (256);
hash_info->split = (split_t *) hcmalloc (sizeof (split_t));

@ -1003,7 +1003,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
void *esalts_buf = NULL;
void *hook_salts_buf = NULL;
if ((user_options->username == true) || (hashconfig->opts_type & OPTS_TYPE_HASH_COPY) || (hashconfig->opts_type & OPTS_TYPE_HASH_SPLIT))
if ((user_options->dynamic_x == true) || (user_options->username == true) || (hashconfig->opts_type & OPTS_TYPE_HASH_COPY) || (hashconfig->opts_type & OPTS_TYPE_HASH_SPLIT))
{
u64 hash_pos;
@ -1013,6 +1013,11 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
hashes_buf[hash_pos].hash_info = hash_info;
if (user_options->dynamic_x == true)
{
hash_info->dynamicx = (dynamicx_t *) hcmalloc (sizeof (dynamicx_t));
}
if (user_options->username == true)
{
hash_info->user = (user_t *) hcmalloc (sizeof (user_t));

@ -688,7 +688,7 @@ bool default_potfile_keep_all_hashes (MAYBE_UNUSED const hashconfig_t *hashconfi
// keep all hashes if --username was combined with --left or --show
if (user_options->username == true)
if ((user_options->username == true) || (user_options->dynamic_x == true))
{
if ((user_options->show == true) || (user_options->left == true))
{

@ -58,7 +58,7 @@ static int sort_by_hash_t_salt (const void *v1, const void *v2)
}
*/
// this function is special and only used whenever --username and --show are used together:
// this function is special and only used whenever --username or --dynamic-x and --show are used together:
// it will sort all tree entries according to the settings stored in hashconfig
int sort_pot_tree_by_hash (const void *v1, const void *v2)
@ -425,7 +425,7 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx)
}
// we only need this variable in a very specific situation:
// whenever we use --username and --show together we want to keep all hashes sorted within a nice structure
// whenever we use --username or --dynamic-x and --show together we want to keep all hashes sorted within a nice structure
pot_tree_entry_t *all_hashes_tree = NULL;
pot_tree_entry_t *tree_entry_cache = NULL;
@ -715,6 +715,22 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
username[user_len] = 0;
}
// dynamic-x
unsigned char *dynamicx_buf = NULL;
u32 dynamicx_len = 0;
dynamicx_t *dynamicx = hash1->hash_info->dynamicx;
if (dynamicx)
{
dynamicx_buf = (unsigned char *) (dynamicx->dynamicx_buf);
dynamicx_len = dynamicx->dynamicx_len;
dynamicx_buf[dynamicx_len] = 0;
}
u8 *tmp_buf = potfile_ctx->tmp_buf;
tmp_buf[0] = 0;
@ -811,6 +827,25 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
}
}
// dynamicx
unsigned char *dynamicx_buf = NULL;
u32 dynamicx_len = 0;
if (hash->hash_info != NULL)
{
dynamicx_t *dynamicx = hash->hash_info->dynamicx;
if (dynamicx)
{
dynamicx_buf = (unsigned char *) (dynamicx->dynamicx_buf);
dynamicx_len = dynamicx->dynamicx_len;
dynamicx_buf[dynamicx_len] = 0;
}
}
u8 *tmp_buf = potfile_ctx->tmp_buf;
tmp_buf[0] = 0;
@ -957,6 +992,22 @@ int potfile_handle_left (hashcat_ctx_t *hashcat_ctx)
username[user_len] = 0;
}
// dynamic-x
unsigned char *dynamicx_buf = NULL;
u32 dynamicx_len = 0;
dynamicx_t *dynamicx = hash1->hash_info->dynamicx;
if (dynamicx)
{
dynamicx_buf = (unsigned char *) (dynamicx->dynamicx_buf);
dynamicx_len = dynamicx->dynamicx_len;
dynamicx_buf[dynamicx_len] = 0;
}
u8 *tmp_buf = potfile_ctx->tmp_buf;
tmp_buf[0] = 0;
@ -1042,6 +1093,25 @@ int potfile_handle_left (hashcat_ctx_t *hashcat_ctx)
}
}
// dynamicx
unsigned char *dynamicx_buf = NULL;
u32 dynamicx_len = 0;
if (hash->hash_info != NULL)
{
dynamicx_t *dynamicx = hash->hash_info->dynamicx;
if (dynamicx)
{
dynamicx_buf = (unsigned char *) (dynamicx->dynamicx_buf);
dynamicx_len = dynamicx->dynamicx_len;
dynamicx_buf[dynamicx_len] = 0;
}
}
const bool print_eol = (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE) == 0;
u8 *tmp_buf = potfile_ctx->tmp_buf;

@ -1490,7 +1490,7 @@ int extract_dynamicx_hash (const u8 *input_buf, const int input_len, u8 **output
if (sscanf ((char *) input_buf, "$dynamic_%d$", &hash_mode) != 1) return -1;
*output_buf = (u8 *) index ((char *) input_buf + 10, '$');
*output_buf = (u8 *) strchr ((char *) input_buf + 10, '$');
if (*output_buf == NULL) return -1;

@ -1052,9 +1052,9 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
}
}
if ((user_options->show == true) && (user_options->username == true))
if ((user_options->show == true) && ((user_options->username == true) || (user_options->dynamic_x == true)))
{
event_log_error (hashcat_ctx, "Mixing --show with --username can cause exponential delay in output.");
event_log_error (hashcat_ctx, "Mixing --show with --username or --dynamic-x can cause exponential delay in output.");
return 0;
}

@ -263,6 +263,43 @@ GeForce_RTX_4090 ALIAS_nv_sm50_or_higher
## Unmapped GPU
##
Radeon_RX_460 ALIAS_AMD_GCN4
Radeon_RX_470 ALIAS_AMD_GCN4
Radeon_RX_480 ALIAS_AMD_GCN4
Radeon_RX_550 ALIAS_AMD_GCN4
Radeon_RX_560 ALIAS_AMD_GCN4
Radeon_RX_570 ALIAS_AMD_GCN4
Radeon_RX_580 ALIAS_AMD_GCN4
Radeon_RX_590 ALIAS_AMD_GCN4
Radeon_RX_590_GME ALIAS_AMD_GCN4
Radeon_RX_5500 ALIAS_AMD_RDNA
Radeon_RX_5500_XT ALIAS_AMD_RDNA
Radeon_RX_5600 ALIAS_AMD_RDNA
Radeon_RX_5600_XT ALIAS_AMD_RDNA
Radeon_RX_5700 ALIAS_AMD_RDNA
Radeon_RX_5700_XT ALIAS_AMD_RDNA
Radeon_RX_6500_XT ALIAS_AMD_RDNA2
Radeon_RX_6600 ALIAS_AMD_RDNA2
Radeon_RX_6600_XT ALIAS_AMD_RDNA2
Radeon_RX_6650_XT ALIAS_AMD_RDNA2
Radeon_RX_6700 ALIAS_AMD_RDNA2
Radeon_RX_6700_XT ALIAS_AMD_RDNA2
Radeon_RX_6750_GRE ALIAS_AMD_RDNA2
Radeon_RX_6750_XT ALIAS_AMD_RDNA2
Radeon_RX_6800 ALIAS_AMD_RDNA2
Radeon_RX_6800_XT ALIAS_AMD_RDNA2
Radeon_RX_6900_XT ALIAS_AMD_RDNA2
Radeon_RX_6950_XT ALIAS_AMD_RDNA2
Radeon_RX_7600 ALIAS_AMD_RDNA3
Radeon_RX_7700_XT ALIAS_AMD_RDNA3
Radeon_RX_7800_XT ALIAS_AMD_RDNA3
Radeon_RX_7900_XT ALIAS_AMD_RDNA3
Radeon_RX_7900_XTX ALIAS_AMD_RDNA3
Radeon_RX_7900_GRE ALIAS_AMD_RDNA3
Radeon_(TM)_RX_480_Graphics ALIAS_AMD_RX480
gfx900 ALIAS_AMD_Vega64

Loading…
Cancel
Save