The following parser functions have been rewritten to make use of input_tokenizer():

sha224_parse_hash
sha256_parse_hash
sha256s_parse_hash
sha384_parse_hash
sha512_parse_hash
sha512s_parse_hash
ripemd160_parse_hash
whirlpool_parse_hash
hmacmd5_parse_hash
hmacsha1_parse_hash
hmacsha256_parse_hash
hmacsha512_parse_hash
mysql323_parse_hash
This commit is contained in:
jsteube
2018-07-01 10:49:30 +02:00
parent c6eb269784
commit 87be2e8cce
2 changed files with 236 additions and 386 deletions
-58
View File
@@ -1020,62 +1020,14 @@ typedef struct hccapx hccapx_t;
typedef enum display_len
{
DISPLAY_LEN_MIN_50 = 32 + 1 + 0,
DISPLAY_LEN_MAX_50 = 32 + 1 + SALT_MAX,
DISPLAY_LEN_MIN_50H = 32 + 1 + 0,
DISPLAY_LEN_MAX_50H = 32 + 1 + (SALT_MAX * 2),
DISPLAY_LEN_MIN_150 = 40 + 1 + 0,
DISPLAY_LEN_MAX_150 = 40 + 1 + SALT_MAX,
DISPLAY_LEN_MIN_150H = 40 + 1 + 0,
DISPLAY_LEN_MAX_150H = 40 + 1 + (SALT_MAX * 2),
DISPLAY_LEN_MIN_200 = 16,
DISPLAY_LEN_MAX_200 = 16,
DISPLAY_LEN_MIN_300 = 40,
DISPLAY_LEN_MAX_300 = 40,
DISPLAY_LEN_MIN_501 = 104,
DISPLAY_LEN_MAX_501 = 104,
DISPLAY_LEN_MIN_600 = 8 + 128,
DISPLAY_LEN_MAX_600 = 8 + 128,
DISPLAY_LEN_MIN_1000 = 32,
DISPLAY_LEN_MAX_1000 = 32,
DISPLAY_LEN_MIN_1300 = 56,
DISPLAY_LEN_MAX_1300 = 56,
DISPLAY_LEN_MIN_1400 = 64,
DISPLAY_LEN_MAX_1400 = 64,
DISPLAY_LEN_MIN_1410 = 64 + 1 + 0,
DISPLAY_LEN_MAX_1410 = 64 + 1 + SALT_MAX,
DISPLAY_LEN_MIN_1410H = 64 + 1 + 0,
DISPLAY_LEN_MAX_1410H = 64 + 1 + (SALT_MAX * 2),
DISPLAY_LEN_MIN_1450 = 64 + 1 + 0,
DISPLAY_LEN_MAX_1450 = 64 + 1 + SALT_MAX,
DISPLAY_LEN_MIN_1450H = 64 + 1 + 0,
DISPLAY_LEN_MAX_1450H = 64 + 1 + (SALT_MAX * 2),
DISPLAY_LEN_MIN_1700 = 128,
DISPLAY_LEN_MAX_1700 = 128,
DISPLAY_LEN_MIN_1710 = 128 + 1 + 0,
DISPLAY_LEN_MAX_1710 = 128 + 1 + SALT_MAX,
DISPLAY_LEN_MIN_1710H = 128 + 1 + 0,
DISPLAY_LEN_MAX_1710H = 128 + 1 + (SALT_MAX * 2),
DISPLAY_LEN_MIN_1730 = 128 + 1 + 0,
DISPLAY_LEN_MAX_1730 = 128 + 1 + SALT_MAX,
DISPLAY_LEN_MIN_1740 = 128 + 1 + 0,
DISPLAY_LEN_MAX_1740 = 128 + 1 + (SALT_MAX * 2),
DISPLAY_LEN_MIN_1750 = 128 + 1 + 0,
DISPLAY_LEN_MAX_1750 = 128 + 1 + SALT_MAX,
DISPLAY_LEN_MIN_1750H = 128 + 1 + 0,
DISPLAY_LEN_MAX_1750H = 128 + 1 + (SALT_MAX * 2),
DISPLAY_LEN_MIN_1800 = 90 + 0,
DISPLAY_LEN_MAX_1800 = 90 + 16,
DISPLAY_LEN_MIN_2600 = 32,
DISPLAY_LEN_MAX_2600 = 32,
DISPLAY_LEN_MIN_3000 = 16,
DISPLAY_LEN_MAX_3000 = 16,
DISPLAY_LEN_MIN_3100 = 16 + 1 + 0,
DISPLAY_LEN_MAX_3100 = 16 + 1 + 30,
DISPLAY_LEN_MIN_4300 = 32,
DISPLAY_LEN_MAX_4300 = 32,
DISPLAY_LEN_MIN_4500 = 40,
DISPLAY_LEN_MAX_4500 = 40,
DISPLAY_LEN_MIN_4800 = 32 + 1 + 32 + 1 + 2,
DISPLAY_LEN_MAX_4800 = 32 + 1 + 32 + 1 + 2,
DISPLAY_LEN_MIN_5000 = 16,
@@ -1090,10 +1042,6 @@ typedef enum display_len
DISPLAY_LEN_MAX_5700 = 43,
DISPLAY_LEN_MIN_5800 = 40 + 1 + 1,
DISPLAY_LEN_MAX_5800 = 40 + 1 + 16,
DISPLAY_LEN_MIN_6000 = 40,
DISPLAY_LEN_MAX_6000 = 40,
DISPLAY_LEN_MIN_6100 = 128,
DISPLAY_LEN_MAX_6100 = 128,
DISPLAY_LEN_MIN_6300 = 6 + 1 + 8 + 22,
DISPLAY_LEN_MAX_6300 = 6 + 1 + 48 + 22,
DISPLAY_LEN_MIN_6400 = 9 + 2 + 1 + 16 + 1 + 43,
@@ -1188,8 +1136,6 @@ typedef enum display_len
DISPLAY_LEN_MAX_10600 = 5 + 1 + 1 + 1 + 1 + 3 + 1 + 5 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 1000,
DISPLAY_LEN_MIN_10700 = 5 + 1 + 1 + 1 + 1 + 3 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 1,
DISPLAY_LEN_MAX_10700 = 5 + 1 + 1 + 1 + 1 + 3 + 1 + 5 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 1000,
DISPLAY_LEN_MIN_10800 = 96,
DISPLAY_LEN_MAX_10800 = 96,
DISPLAY_LEN_MIN_10900 = 7 + 1 + 1 + 0 + 1 + 24,
DISPLAY_LEN_MAX_10900 = 7 + 6 + 1 + 64 + 1 + 88,
DISPLAY_LEN_MIN_11000 = 32 + 1 + 56,
@@ -1720,10 +1666,6 @@ int sha512macos_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_bu
int episerver4_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int sha512grub_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int sha512b64s_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int hmacsha1_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int hmacsha256_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int hmacsha512_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int hmacmd5_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int krb5pa_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int krb5tgs_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
int sapb_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);