mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 16:18:09 +00:00
Fix cp_sys type def and add ?H charset
This commit is contained in:
parent
5f11231238
commit
ca0bc3fc19
@ -1518,7 +1518,7 @@ typedef struct mask_ctx
|
||||
{
|
||||
bool enabled;
|
||||
|
||||
cs_t mp_sys[6];
|
||||
cs_t mp_sys[8];
|
||||
cs_t mp_usr[4];
|
||||
|
||||
u64 bfs_cnt;
|
||||
|
11
src/mpsp.c
11
src/mpsp.c
@ -250,6 +250,8 @@ static int mp_expand (hashcat_ctx_t *hashcat_ctx, char *in_buf, size_t in_len, c
|
||||
break;
|
||||
case 'h': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[6].cs_buf, mp_sys[6].cs_len, mp_usr, mp_usr_offset);
|
||||
break;
|
||||
case 'H': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[7].cs_buf, mp_sys[7].cs_len, mp_usr, mp_usr_offset);
|
||||
break;
|
||||
case '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 1 is undefined"); return -1; }
|
||||
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, mp_usr, mp_usr_offset);
|
||||
break;
|
||||
@ -354,6 +356,8 @@ static int mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask_l
|
||||
break;
|
||||
case 'h': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[6].cs_buf, mp_sys[6].cs_len, css_buf, css_pos);
|
||||
break;
|
||||
case 'H': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[7].cs_buf, mp_sys[7].cs_len, css_buf, css_pos);
|
||||
break;
|
||||
case '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 1 is undefined"); return -1; }
|
||||
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, css_buf, css_pos);
|
||||
break;
|
||||
@ -522,6 +526,13 @@ static void mp_setup_sys (cs_t *mp_sys)
|
||||
for (chr = 'a'; chr <= 'f'; chr++) { donec[chr] = 1;
|
||||
mp_sys[6].cs_buf[pos++] = chr;
|
||||
mp_sys[6].cs_len = pos; }
|
||||
|
||||
for (pos = 0, chr = '0'; chr <= '9'; chr++) { donec[chr] = 1;
|
||||
mp_sys[7].cs_buf[pos++] = chr;
|
||||
mp_sys[7].cs_len = pos; }
|
||||
for (chr = 'A'; chr <= 'F'; chr++) { donec[chr] = 1;
|
||||
mp_sys[7].cs_buf[pos++] = chr;
|
||||
mp_sys[7].cs_len = pos; }
|
||||
}
|
||||
|
||||
static int mp_setup_usr (hashcat_ctx_t *hashcat_ctx, cs_t *mp_sys, cs_t *mp_usr, char *buf, u32 index)
|
||||
|
@ -375,6 +375,7 @@ static const char *USAGE_BIG[] =
|
||||
" u | ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||
" d | 0123456789",
|
||||
" h | 0123456789abcdef",
|
||||
" H | 0123456789ABCDEF",
|
||||
" s | !\"#$%%&'()*+,-./:;<=>?@[\\]^_`{|}~",
|
||||
" a | ?l?u?d?s",
|
||||
" b | 0x00 - 0xff",
|
||||
|
Loading…
Reference in New Issue
Block a user