mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-18 20:58:25 +00:00
Add hex charset (?h) to mpsp
This commit is contained in:
parent
779662ea23
commit
5f11231238
11
src/mpsp.c
11
src/mpsp.c
@ -248,6 +248,8 @@ static int mp_expand (hashcat_ctx_t *hashcat_ctx, char *in_buf, size_t in_len, c
|
|||||||
break;
|
break;
|
||||||
case 'b': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[5].cs_buf, mp_sys[5].cs_len, mp_usr, mp_usr_offset);
|
case 'b': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[5].cs_buf, mp_sys[5].cs_len, mp_usr, mp_usr_offset);
|
||||||
break;
|
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 '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 1 is undefined"); return -1; }
|
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);
|
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, mp_usr, mp_usr_offset);
|
||||||
break;
|
break;
|
||||||
@ -350,6 +352,8 @@ static int mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask_l
|
|||||||
break;
|
break;
|
||||||
case 'b': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[5].cs_buf, mp_sys[5].cs_len, css_buf, css_pos);
|
case 'b': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[5].cs_buf, mp_sys[5].cs_len, css_buf, css_pos);
|
||||||
break;
|
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 '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 1 is undefined"); return -1; }
|
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);
|
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, css_buf, css_pos);
|
||||||
break;
|
break;
|
||||||
@ -511,6 +515,13 @@ static void mp_setup_sys (cs_t *mp_sys)
|
|||||||
|
|
||||||
for (pos = 0, chr = 0x00; chr <= 0xff; chr++) { mp_sys[5].cs_buf[pos++] = chr;
|
for (pos = 0, chr = 0x00; chr <= 0xff; chr++) { mp_sys[5].cs_buf[pos++] = chr;
|
||||||
mp_sys[5].cs_len = pos; }
|
mp_sys[5].cs_len = pos; }
|
||||||
|
|
||||||
|
for (pos = 0, chr = '0'; chr <= '9'; chr++) { donec[chr] = 1;
|
||||||
|
mp_sys[6].cs_buf[pos++] = chr;
|
||||||
|
mp_sys[6].cs_len = pos; }
|
||||||
|
for (chr = 'a'; chr <= 'f'; chr++) { donec[chr] = 1;
|
||||||
|
mp_sys[6].cs_buf[pos++] = chr;
|
||||||
|
mp_sys[6].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)
|
static int mp_setup_usr (hashcat_ctx_t *hashcat_ctx, cs_t *mp_sys, cs_t *mp_usr, char *buf, u32 index)
|
||||||
|
@ -374,6 +374,7 @@ static const char *USAGE_BIG[] =
|
|||||||
" l | abcdefghijklmnopqrstuvwxyz",
|
" l | abcdefghijklmnopqrstuvwxyz",
|
||||||
" u | ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
" u | ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||||
" d | 0123456789",
|
" d | 0123456789",
|
||||||
|
" h | 0123456789abcdef",
|
||||||
" s | !\"#$%%&'()*+,-./:;<=>?@[\\]^_`{|}~",
|
" s | !\"#$%%&'()*+,-./:;<=>?@[\\]^_`{|}~",
|
||||||
" a | ?l?u?d?s",
|
" a | ?l?u?d?s",
|
||||||
" b | 0x00 - 0xff",
|
" b | 0x00 - 0xff",
|
||||||
|
Loading…
Reference in New Issue
Block a user