diff --git a/docs/changes.txt b/docs/changes.txt index 448e026ac..8ecbdf236 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -45,6 +45,7 @@ - Skip chained generated rules that exceed the maximum number of function calls - Fixed incorrect plaintext check for 25400 and 26610. Increased plaintext check to 32 bytes to prevent false positives. - Fixed bug in --stdout that caused certain rules to malfunction +- Fixed bug in input_tokenizer when TOKEN_ATTR_FIXED_LENGTH is used and refactor modules ## ## Technical diff --git a/src/modules/module_00000.c b/src/modules/module_00000.c index 8c4190264..127d95c16 100644 --- a/src/modules/module_00000.c +++ b/src/modules/module_00000.c @@ -55,11 +55,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00010.c b/src/modules/module_00010.c index 4fadfe1d5..57197205e 100644 --- a/src/modules/module_00010.c +++ b/src/modules/module_00010.c @@ -55,12 +55,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00011.c b/src/modules/module_00011.c index 6d30965e1..e762f70d7 100644 --- a/src/modules/module_00011.c +++ b/src/modules/module_00011.c @@ -55,17 +55,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; if (hashconfig->opts_type & OPTS_TYPE_ST_HEX) { diff --git a/src/modules/module_00012.c b/src/modules/module_00012.c index d9fa59a78..f0236e151 100644 --- a/src/modules/module_00012.c +++ b/src/modules/module_00012.c @@ -55,12 +55,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = 0; diff --git a/src/modules/module_00020.c b/src/modules/module_00020.c index 134e22708..505f648e4 100644 --- a/src/modules/module_00020.c +++ b/src/modules/module_00020.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00021.c b/src/modules/module_00021.c index 7223cad97..7ad9d9acf 100644 --- a/src/modules/module_00021.c +++ b/src/modules/module_00021.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[1] = 2; diff --git a/src/modules/module_00022.c b/src/modules/module_00022.c index 83ea25c18..986ddc37e 100644 --- a/src/modules/module_00022.c +++ b/src/modules/module_00022.c @@ -56,12 +56,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 30; - token.len_max[0] = 30; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 30; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00023.c b/src/modules/module_00023.c index 81c35d48e..1cbce89a2 100644 --- a/src/modules/module_00023.c +++ b/src/modules/module_00023.c @@ -56,12 +56,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00024.c b/src/modules/module_00024.c index 3f0652298..fedd77c37 100644 --- a/src/modules/module_00024.c +++ b/src/modules/module_00024.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[1] = 2; diff --git a/src/modules/module_00030.c b/src/modules/module_00030.c index e1306c98e..50c5ca511 100644 --- a/src/modules/module_00030.c +++ b/src/modules/module_00030.c @@ -56,12 +56,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00040.c b/src/modules/module_00040.c index 1bdf420bc..2d0186982 100644 --- a/src/modules/module_00040.c +++ b/src/modules/module_00040.c @@ -55,12 +55,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00050.c b/src/modules/module_00050.c index 7b7ad4c68..7e4eeaa4d 100644 --- a/src/modules/module_00050.c +++ b/src/modules/module_00050.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00060.c b/src/modules/module_00060.c index a91a7e38f..7a3e0757d 100644 --- a/src/modules/module_00060.c +++ b/src/modules/module_00060.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00070.c b/src/modules/module_00070.c index 04cb1a020..d503dd5fe 100644 --- a/src/modules/module_00070.c +++ b/src/modules/module_00070.c @@ -56,11 +56,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00100.c b/src/modules/module_00100.c index ea725c5b2..3d6bb223d 100644 --- a/src/modules/module_00100.c +++ b/src/modules/module_00100.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00101.c b/src/modules/module_00101.c index fd7a1181c..7482896e2 100644 --- a/src/modules/module_00101.c +++ b/src/modules/module_00101.c @@ -54,6 +54,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; @@ -63,9 +65,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 28; - token.len_max[1] = 28; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 28; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00110.c b/src/modules/module_00110.c index f9b384301..30ce167af 100644 --- a/src/modules/module_00110.c +++ b/src/modules/module_00110.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00111.c b/src/modules/module_00111.c index 10e8c9c23..499c9a67c 100644 --- a/src/modules/module_00111.c +++ b/src/modules/module_00111.c @@ -57,6 +57,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 2; diff --git a/src/modules/module_00112.c b/src/modules/module_00112.c index 370adaf82..152f2314a 100644 --- a/src/modules/module_00112.c +++ b/src/modules/module_00112.c @@ -62,17 +62,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 20; - token.len_max[1] = 20; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 20; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00120.c b/src/modules/module_00120.c index 6a1f0f089..2ecb1aa79 100644 --- a/src/modules/module_00120.c +++ b/src/modules/module_00120.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00121.c b/src/modules/module_00121.c index 497fa2167..e988a45a6 100644 --- a/src/modules/module_00121.c +++ b/src/modules/module_00121.c @@ -55,12 +55,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00122.c b/src/modules/module_00122.c index 5ab58b391..c806a2055 100644 --- a/src/modules/module_00122.c +++ b/src/modules/module_00122.c @@ -55,6 +55,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.len[0] = 8; diff --git a/src/modules/module_00124.c b/src/modules/module_00124.c index 1c08c6f87..ccdfe4e63 100644 --- a/src/modules/module_00124.c +++ b/src/modules/module_00124.c @@ -56,6 +56,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_00125.c b/src/modules/module_00125.c index 396194aed..b865e087a 100644 --- a/src/modules/module_00125.c +++ b/src/modules/module_00125.c @@ -55,6 +55,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.len[0] = 10; diff --git a/src/modules/module_00130.c b/src/modules/module_00130.c index 713ff747f..d071fdc94 100644 --- a/src/modules/module_00130.c +++ b/src/modules/module_00130.c @@ -55,12 +55,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00131.c b/src/modules/module_00131.c index 3b3bbcffe..26eae96f9 100644 --- a/src/modules/module_00131.c +++ b/src/modules/module_00131.c @@ -59,6 +59,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; diff --git a/src/modules/module_00132.c b/src/modules/module_00132.c index 33257e486..ab05701cb 100644 --- a/src/modules/module_00132.c +++ b/src/modules/module_00132.c @@ -58,6 +58,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_00133.c b/src/modules/module_00133.c index f10d1966b..ecef6b61f 100644 --- a/src/modules/module_00133.c +++ b/src/modules/module_00133.c @@ -55,11 +55,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 28; - token.len_max[0] = 28; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 28; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00140.c b/src/modules/module_00140.c index 42227e7b7..bfded211a 100644 --- a/src/modules/module_00140.c +++ b/src/modules/module_00140.c @@ -55,12 +55,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00141.c b/src/modules/module_00141.c index 2bed1ea03..6a356562f 100644 --- a/src/modules/module_00141.c +++ b/src/modules/module_00141.c @@ -58,32 +58,32 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_EPISERVER; - token.len_min[0] = 11; - token.len_max[0] = 11; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 11; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '*'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = '*'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = '*'; token.len_min[2] = ((SALT_MIN * 8) / 6) + 0; token.len_max[2] = ((SALT_MAX * 8) / 6) + 3; - token.sep[2] = '*'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; - token.len_min[3] = 27; - token.len_max[3] = 27; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 27; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00150.c b/src/modules/module_00150.c index d770c6898..9df2e605c 100644 --- a/src/modules/module_00150.c +++ b/src/modules/module_00150.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00160.c b/src/modules/module_00160.c index 35249b7e4..ab82bed03 100644 --- a/src/modules/module_00160.c +++ b/src/modules/module_00160.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_00170.c b/src/modules/module_00170.c index 4856f3379..ae08beca6 100644 --- a/src/modules/module_00170.c +++ b/src/modules/module_00170.c @@ -55,11 +55,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00200.c b/src/modules/module_00200.c index eb4905525..e2bd7c8f4 100644 --- a/src/modules/module_00200.c +++ b/src/modules/module_00200.c @@ -47,11 +47,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00300.c b/src/modules/module_00300.c index 1a318dc20..db4731a85 100644 --- a/src/modules/module_00300.c +++ b/src/modules/module_00300.c @@ -53,11 +53,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_00400.c b/src/modules/module_00400.c index 9fff7051d..3105bc546 100644 --- a/src/modules/module_00400.c +++ b/src/modules/module_00400.c @@ -172,6 +172,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 2; diff --git a/src/modules/module_00500.c b/src/modules/module_00500.c index e86de7a19..e2e6bba93 100644 --- a/src/modules/module_00500.c +++ b/src/modules/module_00500.c @@ -172,6 +172,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -181,9 +183,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '$'; token.len_min[1] = 0; token.len_max[1] = 8; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_OPTIONAL_ROUNDS; diff --git a/src/modules/module_00501.c b/src/modules/module_00501.c index b22c8f80d..885951b59 100644 --- a/src/modules/module_00501.c +++ b/src/modules/module_00501.c @@ -251,11 +251,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 104; - token.len_max[0] = 104; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 104; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); @@ -281,10 +282,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token2.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token2.len_min[1] = 8; - token2.len_max[1] = 8; token2.sep[1] = '$'; - token2.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token2.len[1] = 8; + token2.attr[1] = TOKEN_ATTR_FIXED_LENGTH; token2.len[2] = 22; token2.attr[2] = TOKEN_ATTR_FIXED_LENGTH diff --git a/src/modules/module_00600.c b/src/modules/module_00600.c index ec36cb376..9165bb744 100644 --- a/src/modules/module_00600.c +++ b/src/modules/module_00600.c @@ -51,6 +51,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_00610.c b/src/modules/module_00610.c index 8242494d1..05f5074dc 100644 --- a/src/modules/module_00610.c +++ b/src/modules/module_00610.c @@ -52,6 +52,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; // signature @@ -64,9 +66,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // hash token.sep[1] = hashconfig->separator; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // salt diff --git a/src/modules/module_00620.c b/src/modules/module_00620.c index fab49c066..fc56fadb6 100644 --- a/src/modules/module_00620.c +++ b/src/modules/module_00620.c @@ -52,6 +52,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; // signature @@ -64,9 +66,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // hash token.sep[1] = hashconfig->separator; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // salt diff --git a/src/modules/module_00900.c b/src/modules/module_00900.c index 4200b54aa..8e007962a 100644 --- a/src/modules/module_00900.c +++ b/src/modules/module_00900.c @@ -55,11 +55,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01000.c b/src/modules/module_01000.c index 8a1a35536..7662af81b 100644 --- a/src/modules/module_01000.c +++ b/src/modules/module_01000.c @@ -58,11 +58,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01100.c b/src/modules/module_01100.c index 1e1c9b9f8..d514c311e 100644 --- a/src/modules/module_01100.c +++ b/src/modules/module_01100.c @@ -56,12 +56,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01300.c b/src/modules/module_01300.c index d4f3b5f21..149fd39ad 100644 --- a/src/modules/module_01300.c +++ b/src/modules/module_01300.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 56; - token.len_max[0] = 56; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 56; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01400.c b/src/modules/module_01400.c index dfa7c0136..ab002efbe 100644 --- a/src/modules/module_01400.c +++ b/src/modules/module_01400.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01410.c b/src/modules/module_01410.c index a54104a02..f2f763bfe 100644 --- a/src/modules/module_01410.c +++ b/src/modules/module_01410.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01411.c b/src/modules/module_01411.c index 6584decc0..63d8bde69 100644 --- a/src/modules/module_01411.c +++ b/src/modules/module_01411.c @@ -56,6 +56,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_01420.c b/src/modules/module_01420.c index a0e9c6764..795bd254f 100644 --- a/src/modules/module_01420.c +++ b/src/modules/module_01420.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01421.c b/src/modules/module_01421.c index 6bfe2dd75..22cda42c1 100644 --- a/src/modules/module_01421.c +++ b/src/modules/module_01421.c @@ -54,14 +54,15 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.len[0] = 6; token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[1] = 64; - token.len_max[1] = 64; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 64; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01430.c b/src/modules/module_01430.c index c3931e087..650a7ec92 100644 --- a/src/modules/module_01430.c +++ b/src/modules/module_01430.c @@ -55,12 +55,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01440.c b/src/modules/module_01440.c index 9aca7a0de..4dd8fb3c6 100644 --- a/src/modules/module_01440.c +++ b/src/modules/module_01440.c @@ -55,12 +55,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01441.c b/src/modules/module_01441.c index 63c7d2c96..89ff454d6 100644 --- a/src/modules/module_01441.c +++ b/src/modules/module_01441.c @@ -58,32 +58,32 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_EPISERVER; - token.len_min[0] = 11; - token.len_max[0] = 11; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 11; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '*'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = '*'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = '*'; token.len_min[2] = ((SALT_MIN * 8) / 6) + 0; token.len_max[2] = ((SALT_MAX * 8) / 6) + 3; - token.sep[2] = '*'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; - token.len_min[3] = 43; - token.len_max[3] = 43; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 43; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01450.c b/src/modules/module_01450.c index bbf13ff02..b909b0b70 100644 --- a/src/modules/module_01450.c +++ b/src/modules/module_01450.c @@ -49,12 +49,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01460.c b/src/modules/module_01460.c index f04ff77c2..08937aeb2 100644 --- a/src/modules/module_01460.c +++ b/src/modules/module_01460.c @@ -81,12 +81,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01470.c b/src/modules/module_01470.c index 735351a67..07d3b5bee 100644 --- a/src/modules/module_01470.c +++ b/src/modules/module_01470.c @@ -55,11 +55,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01500.c b/src/modules/module_01500.c index b939b0a10..1956999dd 100644 --- a/src/modules/module_01500.c +++ b/src/modules/module_01500.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.len[0] = 2; diff --git a/src/modules/module_01600.c b/src/modules/module_01600.c index 5c62252b1..fd2698d9d 100644 --- a/src/modules/module_01600.c +++ b/src/modules/module_01600.c @@ -172,6 +172,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -181,9 +183,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '$'; token.len_min[1] = 0; token.len_max[1] = 8; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_OPTIONAL_ROUNDS; diff --git a/src/modules/module_01700.c b/src/modules/module_01700.c index f6c8b839f..66398ad54 100644 --- a/src/modules/module_01700.c +++ b/src/modules/module_01700.c @@ -86,11 +86,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01710.c b/src/modules/module_01710.c index a302a1957..870bc22ef 100644 --- a/src/modules/module_01710.c +++ b/src/modules/module_01710.c @@ -86,12 +86,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01711.c b/src/modules/module_01711.c index 8c92539d4..7d5f1b112 100644 --- a/src/modules/module_01711.c +++ b/src/modules/module_01711.c @@ -88,6 +88,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_01720.c b/src/modules/module_01720.c index 7c1c0aaaa..01b2571ee 100644 --- a/src/modules/module_01720.c +++ b/src/modules/module_01720.c @@ -86,12 +86,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01722.c b/src/modules/module_01722.c index 69c2aac70..9da97c101 100644 --- a/src/modules/module_01722.c +++ b/src/modules/module_01722.c @@ -87,6 +87,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.len[0] = 8; diff --git a/src/modules/module_01730.c b/src/modules/module_01730.c index bb1280a97..0f9d1632b 100644 --- a/src/modules/module_01730.c +++ b/src/modules/module_01730.c @@ -87,12 +87,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01731.c b/src/modules/module_01731.c index 26dc8b9fd..a150b407d 100644 --- a/src/modules/module_01731.c +++ b/src/modules/module_01731.c @@ -90,6 +90,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_01740.c b/src/modules/module_01740.c index 19289d9ad..c45cb2cdf 100644 --- a/src/modules/module_01740.c +++ b/src/modules/module_01740.c @@ -87,12 +87,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01750.c b/src/modules/module_01750.c index 93f162be1..e2eaa5382 100644 --- a/src/modules/module_01750.c +++ b/src/modules/module_01750.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01760.c b/src/modules/module_01760.c index 1311f89be..b2bff2f12 100644 --- a/src/modules/module_01760.c +++ b/src/modules/module_01760.c @@ -51,12 +51,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_01770.c b/src/modules/module_01770.c index a0e0cac4f..799f0d71f 100644 --- a/src/modules/module_01770.c +++ b/src/modules/module_01770.c @@ -70,11 +70,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_01800.c b/src/modules/module_01800.c index a983cda0a..eeea0a484 100644 --- a/src/modules/module_01800.c +++ b/src/modules/module_01800.c @@ -494,6 +494,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -503,9 +505,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '$'; token.len_min[1] = 0; token.len_max[1] = 16; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_OPTIONAL_ROUNDS; diff --git a/src/modules/module_02100.c b/src/modules/module_02100.c index 154b9d789..a304c003f 100644 --- a/src/modules/module_02100.c +++ b/src/modules/module_02100.c @@ -78,6 +78,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -87,21 +89,20 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '#'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = '#'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = '#'; token.len_min[2] = SALT_MIN; token.len_max[2] = SALT_MAX; - token.sep[2] = '#'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_SEPARATOR_FARTHEST; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_02400.c b/src/modules/module_02400.c index 09e8f3396..064a0986d 100644 --- a/src/modules/module_02400.c +++ b/src/modules/module_02400.c @@ -51,12 +51,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.sep[0] = ':'; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64B; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_02410.c b/src/modules/module_02410.c index 47e4f46d4..a12eb50c8 100644 --- a/src/modules/module_02410.c +++ b/src/modules/module_02410.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64B; token.len_min[1] = 1; diff --git a/src/modules/module_02600.c b/src/modules/module_02600.c index 02bbeeb03..a784dcb79 100644 --- a/src/modules/module_02600.c +++ b/src/modules/module_02600.c @@ -52,11 +52,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_02611.c b/src/modules/module_02611.c index cb3902db9..096fb3cd8 100644 --- a/src/modules/module_02611.c +++ b/src/modules/module_02611.c @@ -52,12 +52,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_02612.c b/src/modules/module_02612.c index 8ca360b7d..56edc1de8 100644 --- a/src/modules/module_02612.c +++ b/src/modules/module_02612.c @@ -55,6 +55,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -70,9 +72,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_02711.c b/src/modules/module_02711.c index 242d95c76..e9943538f 100644 --- a/src/modules/module_02711.c +++ b/src/modules/module_02711.c @@ -52,12 +52,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_02811.c b/src/modules/module_02811.c index eb587a4c6..7f9c5fb3a 100644 --- a/src/modules/module_02811.c +++ b/src/modules/module_02811.c @@ -80,12 +80,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_03000.c b/src/modules/module_03000.c index 741ef1f91..2fe4cf17b 100644 --- a/src/modules/module_03000.c +++ b/src/modules/module_03000.c @@ -162,12 +162,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.sep[0] = hashconfig->separator; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_03100.c b/src/modules/module_03100.c index b42bb584a..af0f98840 100644 --- a/src/modules/module_03100.c +++ b/src/modules/module_03100.c @@ -75,12 +75,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = 0; diff --git a/src/modules/module_03200.c b/src/modules/module_03200.c index 98ff740e1..8f0ad91aa 100644 --- a/src/modules/module_03200.c +++ b/src/modules/module_03200.c @@ -178,6 +178,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 4; @@ -190,10 +192,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.len[2] = 22; diff --git a/src/modules/module_03500.c b/src/modules/module_03500.c index b4f2fec4e..cdca0d157 100644 --- a/src/modules/module_03500.c +++ b/src/modules/module_03500.c @@ -52,11 +52,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_03710.c b/src/modules/module_03710.c index a92e7c405..787473468 100644 --- a/src/modules/module_03710.c +++ b/src/modules/module_03710.c @@ -51,12 +51,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_03711.c b/src/modules/module_03711.c index 85d5e4bdf..ad7fd3a9a 100644 --- a/src/modules/module_03711.c +++ b/src/modules/module_03711.c @@ -53,6 +53,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -67,9 +69,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.len_max[1] = SALT_MAX; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_03730.c b/src/modules/module_03730.c index 336fa32d4..eb37c234f 100644 --- a/src/modules/module_03730.c +++ b/src/modules/module_03730.c @@ -71,12 +71,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = hashconfig->separator; diff --git a/src/modules/module_03800.c b/src/modules/module_03800.c index 860ea5e85..a863b7ec0 100644 --- a/src/modules/module_03800.c +++ b/src/modules/module_03800.c @@ -52,12 +52,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_03910.c b/src/modules/module_03910.c index 8f643fc1a..4aebe37c3 100644 --- a/src/modules/module_03910.c +++ b/src/modules/module_03910.c @@ -82,12 +82,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_04010.c b/src/modules/module_04010.c index 49198d6ee..0e7e2063e 100644 --- a/src/modules/module_04010.c +++ b/src/modules/module_04010.c @@ -51,12 +51,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_04110.c b/src/modules/module_04110.c index 1d81ed647..396238751 100644 --- a/src/modules/module_04110.c +++ b/src/modules/module_04110.c @@ -49,12 +49,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_04300.c b/src/modules/module_04300.c index f8bd08a39..85d999530 100644 --- a/src/modules/module_04300.c +++ b/src/modules/module_04300.c @@ -52,11 +52,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_04400.c b/src/modules/module_04400.c index 0ec255375..6c86306d1 100644 --- a/src/modules/module_04400.c +++ b/src/modules/module_04400.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_04410.c b/src/modules/module_04410.c index 8c824bb15..4a763340a 100644 --- a/src/modules/module_04410.c +++ b/src/modules/module_04410.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_04500.c b/src/modules/module_04500.c index 22596eeb6..ad98eb05d 100644 --- a/src/modules/module_04500.c +++ b/src/modules/module_04500.c @@ -52,11 +52,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_04510.c b/src/modules/module_04510.c index fad21b425..51d0a686a 100644 --- a/src/modules/module_04510.c +++ b/src/modules/module_04510.c @@ -64,12 +64,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_04520.c b/src/modules/module_04520.c index 723e78990..3c0ff2eb5 100644 --- a/src/modules/module_04520.c +++ b/src/modules/module_04520.c @@ -52,12 +52,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_04521.c b/src/modules/module_04521.c index 5fb91e8e6..3e0f8abe8 100644 --- a/src/modules/module_04521.c +++ b/src/modules/module_04521.c @@ -52,17 +52,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_04522.c b/src/modules/module_04522.c index 06c1681cf..5423f86cc 100644 --- a/src/modules/module_04522.c +++ b/src/modules/module_04522.c @@ -52,17 +52,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 12; - token.len_max[1] = 12; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 12; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_04700.c b/src/modules/module_04700.c index 58d7c969f..90b1f0f18 100644 --- a/src/modules/module_04700.c +++ b/src/modules/module_04700.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_04710.c b/src/modules/module_04710.c index 91794b21c..48d0e0a9b 100644 --- a/src/modules/module_04710.c +++ b/src/modules/module_04710.c @@ -64,12 +64,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_04711.c b/src/modules/module_04711.c index 956d517a3..5020a5d18 100644 --- a/src/modules/module_04711.c +++ b/src/modules/module_04711.c @@ -67,22 +67,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 8; - token.len_max[1] = 8; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 8; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; if (hashconfig->opts_type & OPTS_TYPE_ST_HEX) { - token.len_min[1] *= 2; - token.len_max[1] *= 2; + token.len[1] *= 2; token.attr[1] |= TOKEN_ATTR_VERIFY_HEX; } diff --git a/src/modules/module_04800.c b/src/modules/module_04800.c index f856c8ce6..d65124938 100644 --- a/src/modules/module_04800.c +++ b/src/modules/module_04800.c @@ -53,23 +53,22 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.sep[0] = ':'; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = ':'; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[2] = 2; - token.len_max[2] = 2; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_04900.c b/src/modules/module_04900.c index ad661e4c1..02c7a2ca7 100644 --- a/src/modules/module_04900.c +++ b/src/modules/module_04900.c @@ -49,12 +49,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_05000.c b/src/modules/module_05000.c index 72ce7de91..85c5c9e87 100644 --- a/src/modules/module_05000.c +++ b/src/modules/module_05000.c @@ -49,12 +49,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_05100.c b/src/modules/module_05100.c index 3753fbb50..d16ae19d6 100644 --- a/src/modules/module_05100.c +++ b/src/modules/module_05100.c @@ -50,11 +50,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_05300.c b/src/modules/module_05300.c index 16895447c..ea10850b2 100644 --- a/src/modules/module_05300.c +++ b/src/modules/module_05300.c @@ -74,6 +74,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.sep[0] = ':'; @@ -125,9 +127,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[8] = ':'; - token.len_min[8] = 32; - token.len_max[8] = 32; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 32; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_05400.c b/src/modules/module_05400.c index 276422103..f6470f0c0 100644 --- a/src/modules/module_05400.c +++ b/src/modules/module_05400.c @@ -74,6 +74,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.sep[0] = ':'; @@ -125,9 +127,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[8] = ':'; - token.len_min[8] = 40; - token.len_max[8] = 40; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 40; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_05500.c b/src/modules/module_05500.c index e02b828a3..ec6771bd9 100644 --- a/src/modules/module_05500.c +++ b/src/modules/module_05500.c @@ -114,45 +114,44 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; // username + token.sep[0] = ':'; token.len_min[0] = 0; token.len_max[0] = 60; - token.sep[0] = ':'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; // unused - token.len_min[1] = 0; - token.len_max[1] = 0; token.sep[1] = ':'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 0; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; // domain + token.sep[2] = ':'; token.len_min[2] = 0; token.len_max[2] = 45; - token.sep[2] = ':'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; // lm response + token.sep[3] = ':'; token.len_min[3] = 0; token.len_max[3] = 48; - token.sep[3] = ':'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // ntlm response - token.len_min[4] = 48; - token.len_max[4] = 48; token.sep[4] = ':'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 48; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // challenge - token.len_min[5] = 16; - token.len_max[5] = 16; token.sep[5] = ':'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 16; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_05600.c b/src/modules/module_05600.c index 9ce22c4b3..9870369fe 100644 --- a/src/modules/module_05600.c +++ b/src/modules/module_05600.c @@ -73,19 +73,20 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; // username + token.sep[0] = ':'; token.len_min[0] = 0; token.len_max[0] = 60; - token.sep[0] = ':'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; // unused - token.len_min[1] = 0; - token.len_max[1] = 0; token.sep[1] = ':'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 0; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; // domain token.len_min[2] = 0; @@ -94,23 +95,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; // lm response - token.len_min[3] = 16; - token.len_max[3] = 16; token.sep[3] = ':'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // ntlm response - token.len_min[4] = 32; - token.len_max[4] = 32; token.sep[4] = ':'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // challenge + token.sep[5] = ':'; token.len_min[5] = 2; token.len_max[5] = 1024; - token.sep[5] = ':'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_05700.c b/src/modules/module_05700.c index 396f7ce3f..dab3dc8c5 100644 --- a/src/modules/module_05700.c +++ b/src/modules/module_05700.c @@ -54,6 +54,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 43; diff --git a/src/modules/module_05800.c b/src/modules/module_05800.c index 23c97f03b..b646d0f89 100644 --- a/src/modules/module_05800.c +++ b/src/modules/module_05800.c @@ -77,12 +77,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = 1; diff --git a/src/modules/module_06000.c b/src/modules/module_06000.c index 204617b2f..6c7b5ffec 100644 --- a/src/modules/module_06000.c +++ b/src/modules/module_06000.c @@ -48,11 +48,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_06050.c b/src/modules/module_06050.c index 7d1fec6c0..7cb55504c 100644 --- a/src/modules/module_06050.c +++ b/src/modules/module_06050.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_06060.c b/src/modules/module_06060.c index 0d0e59e8a..5407e642e 100644 --- a/src/modules/module_06060.c +++ b/src/modules/module_06060.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_06100.c b/src/modules/module_06100.c index a5243cd96..c583db693 100644 --- a/src/modules/module_06100.c +++ b/src/modules/module_06100.c @@ -48,11 +48,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_06300.c b/src/modules/module_06300.c index 02fc4d051..0f6ed5bc0 100644 --- a/src/modules/module_06300.c +++ b/src/modules/module_06300.c @@ -172,6 +172,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -181,9 +183,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '$'; token.len_min[1] = 0; token.len_max[1] = 8; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_OPTIONAL_ROUNDS; diff --git a/src/modules/module_06400.c b/src/modules/module_06400.c index 39d6c8628..79e825509 100644 --- a/src/modules/module_06400.c +++ b/src/modules/module_06400.c @@ -261,6 +261,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -270,14 +272,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; + token.sep[2] = '$'; token.len_min[2] = 16; token.len_max[2] = 48; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; token.len[3] = 43; diff --git a/src/modules/module_06500.c b/src/modules/module_06500.c index 05cc564d5..bfaa5e243 100644 --- a/src/modules/module_06500.c +++ b/src/modules/module_06500.c @@ -445,6 +445,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -454,14 +456,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; + token.sep[2] = '$'; token.len_min[2] = 16; token.len_max[2] = 48; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; token.len[3] = 86; diff --git a/src/modules/module_06600.c b/src/modules/module_06600.c index 58972c082..f7bea8cdd 100644 --- a/src/modules/module_06600.c +++ b/src/modules/module_06600.c @@ -90,23 +90,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; + token.sep[0] = ':'; token.len_min[0] = 1; token.len_max[0] = 6; - token.sep[0] = ':'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[1] = 16; - token.len_max[1] = 16; token.sep[1] = ':'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[2] = 2080; - token.len_max[2] = 2080; token.sep[2] = ':'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2080; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_06700.c b/src/modules/module_06700.c index bbc36fe8d..3305f1502 100644 --- a/src/modules/module_06700.c +++ b/src/modules/module_06700.c @@ -196,6 +196,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -205,14 +207,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; + token.sep[2] = '$'; token.len_min[2] = 16; token.len_max[2] = 48; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; token.len[3] = 27; diff --git a/src/modules/module_06800.c b/src/modules/module_06800.c index 8f189fc45..35eebf6b4 100644 --- a/src/modules/module_06800.c +++ b/src/modules/module_06800.c @@ -118,28 +118,29 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; + token.sep[0] = ':'; token.len_min[0] = 32; token.len_max[0] = 64; - token.sep[0] = ':'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[1] = ':'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = ':'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.sep[2] = ':'; token.len_min[2] = 0; token.len_max[2] = 32; - token.sep[2] = ':'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[3] = 32; - token.len_max[3] = 32; token.sep[3] = ':'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_06900.c b/src/modules/module_06900.c index 3e659d629..eff993986 100644 --- a/src/modules/module_06900.c +++ b/src/modules/module_06900.c @@ -64,11 +64,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_07000.c b/src/modules/module_07000.c index f97d8a4d8..99fb188cc 100644 --- a/src/modules/module_07000.c +++ b/src/modules/module_07000.c @@ -65,6 +65,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_07100.c b/src/modules/module_07100.c index 1d7b764ef..22adc6a98 100644 --- a/src/modules/module_07100.c +++ b/src/modules/module_07100.c @@ -119,6 +119,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE { hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -128,16 +130,15 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '$'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 64; - token.len_max[2] = 64; token.sep[2] = '$'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[3] = 128; @@ -206,6 +207,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE { hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; diff --git a/src/modules/module_07200.c b/src/modules/module_07200.c index 785c2538e..7f2852234 100644 --- a/src/modules/module_07200.c +++ b/src/modules/module_07200.c @@ -104,6 +104,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -113,21 +115,20 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '.'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = '.'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = '.'; token.len_min[2] = SALT_MIN; token.len_max[2] = SALT_MAX; - token.sep[2] = '.'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[3] = 128; - token.len_max[3] = 128; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 128; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_07300.c b/src/modules/module_07300.c index 905be677d..77a07db2d 100644 --- a/src/modules/module_07300.c +++ b/src/modules/module_07300.c @@ -66,17 +66,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; + token.sep[0] = hashconfig->separator; token.len_min[0] = 64; token.len_max[0] = 512; - token.sep[0] = hashconfig->separator; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 40; - token.len_max[1] = 40; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 40; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_07350.c b/src/modules/module_07350.c index 7c9dcb67c..fd79d31d1 100644 --- a/src/modules/module_07350.c +++ b/src/modules/module_07350.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = RAKP_HEX_SALT_MIN; diff --git a/src/modules/module_07400.c b/src/modules/module_07400.c index c1b57fdef..b4f82ed16 100644 --- a/src/modules/module_07400.c +++ b/src/modules/module_07400.c @@ -287,6 +287,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -296,9 +298,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '$'; token.len_min[1] = 0; token.len_max[1] = 20; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_OPTIONAL_ROUNDS; diff --git a/src/modules/module_07401.c b/src/modules/module_07401.c index eb5143e97..9584781a4 100644 --- a/src/modules/module_07401.c +++ b/src/modules/module_07401.c @@ -288,6 +288,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -297,27 +299,24 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; + token.sep[2] = '*'; token.len_min[2] = 3; token.len_max[2] = 4; - token.sep[2] = '*'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 40; - token.len_max[3] = 40; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 40; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[4] = 86; - token.len_max[4] = 86; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 86; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_07500.c b/src/modules/module_07500.c index 96a358ba0..f119402cd 100644 --- a/src/modules/module_07500.c +++ b/src/modules/module_07500.c @@ -104,6 +104,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -113,19 +115,19 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '$'; token.len_min[1] = 0; token.len_max[1] = 64; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.sep[2] = '$'; token.len_min[2] = 0; token.len_max[2] = 64; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.sep[3] = '$'; token.len_min[3] = 0; token.len_max[3] = 128; - token.sep[3] = '$'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; token.len[4] = 72; diff --git a/src/modules/module_07700.c b/src/modules/module_07700.c index 490c7ec4b..af5dd78d6 100644 --- a/src/modules/module_07700.c +++ b/src/modules/module_07700.c @@ -59,16 +59,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; + token.sep[0] = '$'; token.len_min[0] = 1; token.len_max[0] = 40; - token.sep[0] = '$'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[1] = 16; - token.len_max[1] = 16; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_07701.c b/src/modules/module_07701.c index cd7a0c211..8ca22e4c3 100644 --- a/src/modules/module_07701.c +++ b/src/modules/module_07701.c @@ -51,16 +51,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; + token.sep[0] = '$'; token.len_min[0] = 1; token.len_max[0] = 40; - token.sep[0] = '$'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[1] = 16; - token.len_max[1] = 16; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_07800.c b/src/modules/module_07800.c index 03c607845..080a26252 100644 --- a/src/modules/module_07800.c +++ b/src/modules/module_07800.c @@ -60,16 +60,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; + token.sep[0] = '$'; token.len_min[0] = 1; token.len_max[0] = 40; - token.sep[0] = '$'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[1] = 40; - token.len_max[1] = 40; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 40; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_07801.c b/src/modules/module_07801.c index 21ce106d9..0e390d259 100644 --- a/src/modules/module_07801.c +++ b/src/modules/module_07801.c @@ -60,16 +60,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; + token.sep[0] = '$'; token.len_min[0] = 1; token.len_max[0] = 40; - token.sep[0] = '$'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[1] = 40; - token.len_max[1] = 40; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 40; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_07900.c b/src/modules/module_07900.c index a1cfb0e91..bebfb6aab 100644 --- a/src/modules/module_07900.c +++ b/src/modules/module_07900.c @@ -334,6 +334,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; diff --git a/src/modules/module_08000.c b/src/modules/module_08000.c index 238f4d613..0c774b5a6 100644 --- a/src/modules/module_08000.c +++ b/src/modules/module_08000.c @@ -82,6 +82,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_08100.c b/src/modules/module_08100.c index 8bbf03c06..14459192a 100644 --- a/src/modules/module_08100.c +++ b/src/modules/module_08100.c @@ -54,6 +54,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_08200.c b/src/modules/module_08200.c index 2d148936d..4098df8c8 100644 --- a/src/modules/module_08200.c +++ b/src/modules/module_08200.c @@ -122,18 +122,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = ':'; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = ':'; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = ':'; diff --git a/src/modules/module_08300.c b/src/modules/module_08300.c index 233812261..88975f396 100644 --- a/src/modules/module_08300.c +++ b/src/modules/module_08300.c @@ -49,12 +49,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = ':'; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; token.sep[1] = ':'; token.len_min[1] = 0; diff --git a/src/modules/module_08400.c b/src/modules/module_08400.c index 60cb06c68..199177f2c 100644 --- a/src/modules/module_08400.c +++ b/src/modules/module_08400.c @@ -51,17 +51,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 40; - token.len_max[1] = 40; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 40; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_08500.c b/src/modules/module_08500.c index c3cd866ca..30984cb2e 100644 --- a/src/modules/module_08500.c +++ b/src/modules/module_08500.c @@ -103,25 +103,26 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_RACF; - token.len_min[0] = 6; - token.len_max[0] = 6; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '*'; token.len_min[1] = 0; token.len_max[1] = 8; - token.sep[1] = '*'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.sep[2] = '$'; token.len_min[2] = 2; token.len_max[2] = 16; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_08600.c b/src/modules/module_08600.c index 4feea6537..498e3f378 100644 --- a/src/modules/module_08600.c +++ b/src/modules/module_08600.c @@ -57,11 +57,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_08700.c b/src/modules/module_08700.c index 6cf0ab3ac..6b3b2970e 100644 --- a/src/modules/module_08700.c +++ b/src/modules/module_08700.c @@ -81,6 +81,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.len[0] = 1; diff --git a/src/modules/module_08800.c b/src/modules/module_08800.c index a47feaa36..7de1ecf2c 100644 --- a/src/modules/module_08800.c +++ b/src/modules/module_08800.c @@ -93,6 +93,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -102,32 +104,27 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[2] = 32; - token.len_max[2] = 32; token.sep[2] = '$'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[3] = 2; - token.len_max[3] = 2; token.sep[3] = '$'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[3] = 2; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[4] = 32; - token.len_max[4] = 32; token.sep[4] = '$'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[5] = 3072; - token.len_max[5] = 3072; token.sep[5] = '$'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 3072; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_08900.c b/src/modules/module_08900.c index c5b1014d8..d7b7a9a62 100644 --- a/src/modules/module_08900.c +++ b/src/modules/module_08900.c @@ -271,41 +271,42 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SCRYPT; - token.len_min[0] = 6; - token.len_max[0] = 6; token.sep[0] = ':'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = ':'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = ':'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.sep[2] = ':'; token.len_min[2] = 1; token.len_max[2] = 6; - token.sep[2] = ':'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.sep[3] = ':'; token.len_min[3] = 1; token.len_max[3] = 6; - token.sep[3] = ':'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; + token.sep[4] = ':'; token.len_min[4] = 0; token.len_max[4] = 45; - token.sep[4] = ':'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; + token.sep[5] = ':'; token.len_min[5] = 44; token.len_max[5] = 88; - token.sep[5] = ':'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; diff --git a/src/modules/module_09100.c b/src/modules/module_09100.c index 45cbd94ad..b0378756a 100644 --- a/src/modules/module_09100.c +++ b/src/modules/module_09100.c @@ -72,6 +72,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.len[0] = 1; diff --git a/src/modules/module_09200.c b/src/modules/module_09200.c index 60526214d..bfc3aac69 100644 --- a/src/modules/module_09200.c +++ b/src/modules/module_09200.c @@ -95,6 +95,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -104,10 +106,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 14; - token.len_max[1] = 14; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 14; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; token.len[2] = 43; token.attr[2] = TOKEN_ATTR_FIXED_LENGTH diff --git a/src/modules/module_09300.c b/src/modules/module_09300.c index 1c1137021..e60d47b36 100644 --- a/src/modules/module_09300.c +++ b/src/modules/module_09300.c @@ -271,6 +271,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -280,10 +282,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 14; - token.len_max[1] = 14; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 14; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; token.len[2] = 43; token.attr[2] = TOKEN_ATTR_FIXED_LENGTH diff --git a/src/modules/module_09400.c b/src/modules/module_09400.c index 4f9c7a5e3..a5961f4fb 100644 --- a/src/modules/module_09400.c +++ b/src/modules/module_09400.c @@ -92,57 +92,51 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_OFFICE2007; - token.len_min[0] = 8; - token.len_max[0] = 8; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 4; - token.len_max[1] = 4; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 4; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 2; - token.len_max[2] = 2; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 2; - token.len_max[4] = 2; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[5] = 32; - token.len_max[5] = 32; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 32; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 32; - token.len_max[6] = 32; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[7] = 40; - token.len_max[7] = 40; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 40; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09500.c b/src/modules/module_09500.c index e6b6f9c5b..a9b179889 100644 --- a/src/modules/module_09500.c +++ b/src/modules/module_09500.c @@ -95,57 +95,51 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_OFFICE2010; - token.len_min[0] = 8; - token.len_max[0] = 8; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 4; - token.len_max[1] = 4; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 4; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 6; - token.len_max[2] = 6; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 6; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 2; - token.len_max[4] = 2; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[5] = 32; - token.len_max[5] = 32; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 32; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 32; - token.len_max[6] = 32; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[7] = 64; - token.len_max[7] = 64; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 64; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09600.c b/src/modules/module_09600.c index 8458d0490..10b55cd3e 100644 --- a/src/modules/module_09600.c +++ b/src/modules/module_09600.c @@ -129,57 +129,51 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_OFFICE2013; - token.len_min[0] = 8; - token.len_max[0] = 8; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 4; - token.len_max[1] = 4; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 4; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 6; - token.len_max[2] = 6; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 6; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 2; - token.len_max[4] = 2; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[5] = 32; - token.len_max[5] = 32; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 32; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 32; - token.len_max[6] = 32; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[7] = 64; - token.len_max[7] = 64; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 64; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09700.c b/src/modules/module_09700.c index 4e1850b91..a50e380b7 100644 --- a/src/modules/module_09700.c +++ b/src/modules/module_09700.c @@ -115,6 +115,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 2; @@ -125,27 +127,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 32; - token.len_max[2] = 32; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[3] = 32; - token.len_max[3] = 32; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[4] = 32; - token.len_max[4] = 32; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09710.c b/src/modules/module_09710.c index 588c9d4ad..10ca46814 100644 --- a/src/modules/module_09710.c +++ b/src/modules/module_09710.c @@ -135,6 +135,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 2; @@ -145,27 +147,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 32; - token.len_max[2] = 32; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[3] = 32; - token.len_max[3] = 32; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[4] = 32; - token.len_max[4] = 32; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09720.c b/src/modules/module_09720.c index 68583435d..ee1b6c6e8 100644 --- a/src/modules/module_09720.c +++ b/src/modules/module_09720.c @@ -117,6 +117,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 2; @@ -127,33 +129,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 32; - token.len_max[2] = 32; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[3] = 32; - token.len_max[3] = 32; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[4] = 32; - token.len_max[4] = 32; token.sep[4] = ':'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[5] = 10; - token.len_max[5] = 10; token.sep[5] = ':'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 10; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09800.c b/src/modules/module_09800.c index e4e1f31e1..899b852e7 100644 --- a/src/modules/module_09800.c +++ b/src/modules/module_09800.c @@ -117,6 +117,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 2; @@ -127,27 +129,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 32; - token.len_max[2] = 32; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[3] = 32; - token.len_max[3] = 32; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[4] = 40; - token.len_max[4] = 40; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 40; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); @@ -158,10 +156,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE { token.token_cnt = 6; - token.len_min[5] = 64; - token.len_max[5] = 64; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09810.c b/src/modules/module_09810.c index 7e210f91a..b689304ea 100644 --- a/src/modules/module_09810.c +++ b/src/modules/module_09810.c @@ -136,6 +136,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 2; @@ -146,27 +148,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 32; - token.len_max[2] = 32; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[3] = 32; - token.len_max[3] = 32; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[4] = 40; - token.len_max[4] = 40; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 40; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); @@ -177,10 +175,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE { token.token_cnt = 6; - token.len_min[5] = 64; - token.len_max[5] = 64; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09820.c b/src/modules/module_09820.c index eaccd0bee..7508f8fff 100644 --- a/src/modules/module_09820.c +++ b/src/modules/module_09820.c @@ -119,6 +119,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -128,32 +130,27 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 32; - token.len_max[2] = 32; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH; - token.len_min[3] = 32; - token.len_max[3] = 32; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[4] = 40; - token.len_max[4] = 40; token.sep[4] = ':'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 40; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[5] = 10; - token.len_max[5] = 10; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 10; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); @@ -166,15 +163,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.sep[4] = '*'; - token.len_min[5] = 64; - token.len_max[5] = 64; token.sep[5] = ':'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 10; - token.len_max[6] = 10; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 10; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_09900.c b/src/modules/module_09900.c index d2bb6eef8..3d845f55a 100644 --- a/src/modules/module_09900.c +++ b/src/modules/module_09900.c @@ -60,11 +60,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_10000.c b/src/modules/module_10000.c index a111fea93..ce6518d3d 100644 --- a/src/modules/module_10000.c +++ b/src/modules/module_10000.c @@ -92,15 +92,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_DJANGOPBKDF2; token.sep[0] = '$'; - token.len_min[0] = 13; - token.len_max[0] = 13; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 13; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; @@ -115,9 +116,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[3] = '$'; - token.len_min[3] = 44; - token.len_max[3] = 44; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 44; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_10100.c b/src/modules/module_10100.c index 333fb5104..096b8eba2 100644 --- a/src/modules/module_10100.c +++ b/src/modules/module_10100.c @@ -50,24 +50,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = ':'; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = ':'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = ':'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.len[3] = 32; diff --git a/src/modules/module_10200.c b/src/modules/module_10200.c index 3ef6b4fcb..b236e573a 100644 --- a/src/modules/module_10200.c +++ b/src/modules/module_10200.c @@ -68,6 +68,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_10300.c b/src/modules/module_10300.c index cf3998d78..0768b6029 100644 --- a/src/modules/module_10300.c +++ b/src/modules/module_10300.c @@ -69,6 +69,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_10400.c b/src/modules/module_10400.c index 05bd67c95..396209e13 100644 --- a/src/modules/module_10400.c +++ b/src/modules/module_10400.c @@ -122,6 +122,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 12; token.signatures_cnt = 1; @@ -131,69 +133,59 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 2; - token.len_max[3] = 2; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 2; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '*'; token.len_min[4] = 1; token.len_max[4] = 11; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[6] = 2; - token.len_max[6] = 2; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 2; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[7] = 32; - token.len_max[7] = 32; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 32; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[8] = 2; - token.len_max[8] = 2; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 2; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 64; - token.len_max[9] = 64; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 64; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[10] = 2; - token.len_max[10] = 2; - token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.sep[10] = '*'; + token.len[10] = 2; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[11] = 64; - token.len_max[11] = 64; token.sep[11] = '*'; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH + token.len[11] = 64; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_10410.c b/src/modules/module_10410.c index cdf598787..b371d69d8 100644 --- a/src/modules/module_10410.c +++ b/src/modules/module_10410.c @@ -143,6 +143,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 12; token.signatures_cnt = 1; @@ -152,70 +154,60 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 2; - token.len_max[3] = 2; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 2; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '*'; token.len_min[4] = 1; token.len_max[4] = 11; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[6] = 2; - token.len_max[6] = 2; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 2; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[7] = 32; - token.len_max[7] = 32; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 32; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[8] = 2; - token.len_max[8] = 2; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 2; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 64; - token.len_max[9] = 64; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 64; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[10] = 2; - token.len_max[10] = 2; - token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.sep[10] = '*'; + token.len[10] = 2; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[11] = 64; - token.len_max[11] = 64; - token.sep[11] = '*'; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.sep[11] = '*'; + token.len[11] = 64; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_10420.c b/src/modules/module_10420.c index 908021b3b..e7ca2a804 100644 --- a/src/modules/module_10420.c +++ b/src/modules/module_10420.c @@ -123,6 +123,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 13; token.signatures_cnt = 1; @@ -132,76 +134,65 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 2; - token.len_max[3] = 2; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 2; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '*'; token.len_min[4] = 1; token.len_max[4] = 11; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[6] = 2; - token.len_max[6] = 2; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 2; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[7] = 32; - token.len_max[7] = 32; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 32; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[8] = 2; - token.len_max[8] = 2; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 2; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 64; - token.len_max[9] = 64; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 64; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[10] = 2; - token.len_max[10] = 2; - token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.sep[10] = '*'; + token.len[10] = 2; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[11] = 64; - token.len_max[11] = 64; - token.sep[11] = ':'; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.sep[11] = ':'; + token.len[11] = 64; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; - token.len_min[12] = 10; - token.len_max[12] = 10; - token.sep[12] = '*'; - token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.sep[12] = '*'; + token.len[12] = 10; + token.attr[12] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_10500.c b/src/modules/module_10500.c index c253847cd..1020b5143 100644 --- a/src/modules/module_10500.c +++ b/src/modules/module_10500.c @@ -153,6 +153,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 12; token.signatures_cnt = 1; @@ -162,70 +164,61 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '*'; token.len_min[4] = 1; token.len_max[4] = 11; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[6] = 2; - token.len_max[6] = 2; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 2; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[7] = '*'; token.len_min[7] = 32; token.len_max[7] = 64; - token.sep[7] = '*'; token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[8] = 2; - token.len_max[8] = 2; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 2; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 64; - token.len_max[9] = 64; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 64; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[10] = 2; - token.len_max[10] = 2; - token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.sep[10] = '*'; + token.len[10] = 2; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[11] = 64; - token.len_max[11] = 64; - token.sep[11] = '*'; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.sep[11] = '*'; + token.len[11] = 64; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_10600.c b/src/modules/module_10600.c index 4218bc019..7f511971e 100644 --- a/src/modules/module_10600.c +++ b/src/modules/module_10600.c @@ -99,6 +99,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 16; token.signatures_cnt = 1; @@ -108,92 +110,88 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '*'; token.len_min[4] = 1; token.len_max[4] = 11; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[6] = '*'; token.len_min[6] = 1; token.len_max[6] = 4; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[7] = '*'; token.len_min[7] = 0; token.len_max[7] = 1024; - token.sep[7] = '*'; token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[8] = '*'; token.len_min[8] = 1; token.len_max[8] = 4; - token.sep[8] = '*'; token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[9] = '*'; token.len_min[9] = 0; token.len_max[9] = 1024; - token.sep[9] = '*'; token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[10] = '*'; token.len_min[10] = 1; token.len_max[10] = 4; - token.sep[10] = '*'; token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[11] = '*'; token.len_min[11] = 0; token.len_max[11] = 1024; - token.sep[11] = '*'; token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[12] = '*'; token.len_min[12] = 1; token.len_max[12] = 4; - token.sep[12] = '*'; token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[13] = '*'; token.len_min[13] = 0; token.len_max[13] = 1024; - token.sep[13] = '*'; token.attr[13] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[14] = '*'; token.len_min[14] = 1; token.len_max[14] = 4; - token.sep[14] = '*'; token.attr[14] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[15] = '*'; token.len_min[15] = 0; token.len_max[15] = 1024; - token.sep[15] = '*'; token.attr[15] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_10700.c b/src/modules/module_10700.c index 3f1e78b89..3001ba745 100644 --- a/src/modules/module_10700.c +++ b/src/modules/module_10700.c @@ -170,6 +170,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 16; token.signatures_cnt = 1; @@ -179,92 +181,88 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '*'; token.len_min[4] = 1; token.len_max[4] = 11; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[6] = '*'; token.len_min[6] = 1; token.len_max[6] = 4; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[7] = '*'; token.len_min[7] = 0; token.len_max[7] = 1024; - token.sep[7] = '*'; token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[8] = '*'; token.len_min[8] = 1; token.len_max[8] = 4; - token.sep[8] = '*'; token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[9] = '*'; token.len_min[9] = 0; token.len_max[9] = 1024; - token.sep[9] = '*'; token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[10] = '*'; token.len_min[10] = 1; token.len_max[10] = 4; - token.sep[10] = '*'; token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[11] = '*'; token.len_min[11] = 0; token.len_max[11] = 1024; - token.sep[11] = '*'; token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[12] = '*'; token.len_min[12] = 1; token.len_max[12] = 4; - token.sep[12] = '*'; token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[13] = '*'; token.len_min[13] = 0; token.len_max[13] = 1024; - token.sep[13] = '*'; token.attr[13] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[14] = '*'; token.len_min[14] = 1; token.len_max[14] = 4; - token.sep[14] = '*'; token.attr[14] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[15] = '*'; token.len_min[15] = 0; token.len_max[15] = 1024; - token.sep[15] = '*'; token.attr[15] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_10800.c b/src/modules/module_10800.c index 7bce90227..d121df35b 100644 --- a/src/modules/module_10800.c +++ b/src/modules/module_10800.c @@ -100,11 +100,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 96; - token.len_max[0] = 96; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 96; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_10810.c b/src/modules/module_10810.c index eca1e2c89..a21fcdb56 100644 --- a/src/modules/module_10810.c +++ b/src/modules/module_10810.c @@ -86,12 +86,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 96; - token.len_max[0] = 96; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 96; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_10820.c b/src/modules/module_10820.c index f3c5de9e6..97dd5b775 100644 --- a/src/modules/module_10820.c +++ b/src/modules/module_10820.c @@ -86,12 +86,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 96; - token.len_max[0] = 96; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 96; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_10830.c b/src/modules/module_10830.c index a37e13146..6e3831d78 100644 --- a/src/modules/module_10830.c +++ b/src/modules/module_10830.c @@ -87,12 +87,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 96; - token.len_max[0] = 96; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 96; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_10840.c b/src/modules/module_10840.c index 9dc69e059..77e070dc0 100644 --- a/src/modules/module_10840.c +++ b/src/modules/module_10840.c @@ -87,12 +87,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 96; - token.len_max[0] = 96; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 96; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_10870.c b/src/modules/module_10870.c index 735ae8d87..3e2e4bfdd 100644 --- a/src/modules/module_10870.c +++ b/src/modules/module_10870.c @@ -87,11 +87,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 96; - token.len_max[0] = 96; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 96; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_10900.c b/src/modules/module_10900.c index 81393a8e6..75385f023 100644 --- a/src/modules/module_10900.c +++ b/src/modules/module_10900.c @@ -125,15 +125,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_PBKDF2_SHA256; token.sep[0] = ':'; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = ':'; diff --git a/src/modules/module_10901.c b/src/modules/module_10901.c index ed7f7448a..ed95f467d 100644 --- a/src/modules/module_10901.c +++ b/src/modules/module_10901.c @@ -94,6 +94,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; @@ -105,9 +107,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; //length of base64 encoded hash - token.len_min[1] = 432; - token.len_max[1] = 432; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 432; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_11000.c b/src/modules/module_11000.c index 7615ac640..60ab88df0 100644 --- a/src/modules/module_11000.c +++ b/src/modules/module_11000.c @@ -65,17 +65,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 56; - token.len_max[1] = 56; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 56; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_11100.c b/src/modules/module_11100.c index fbf53a92f..c95bd6893 100644 --- a/src/modules/module_11100.c +++ b/src/modules/module_11100.c @@ -52,6 +52,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -67,15 +69,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[2] = '*'; - token.len_min[2] = 8; - token.len_max[2] = 8; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 8; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_11200.c b/src/modules/module_11200.c index 5296043f7..938b179b1 100644 --- a/src/modules/module_11200.c +++ b/src/modules/module_11200.c @@ -52,6 +52,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -62,15 +64,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 40; - token.len_max[1] = 40; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 40; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; - token.len_min[2] = 40; - token.len_max[2] = 40; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 40; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_11300.c b/src/modules/module_11300.c index 00035b60c..7b81b3d26 100644 --- a/src/modules/module_11300.c +++ b/src/modules/module_11300.c @@ -134,6 +134,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 10; token.signatures_cnt = 1; @@ -156,9 +158,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; - token.len_min[3] = 2; - token.len_max[3] = 2; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 2; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '$'; diff --git a/src/modules/module_11400.c b/src/modules/module_11400.c index fc167c209..f6f656629 100644 --- a/src/modules/module_11400.c +++ b/src/modules/module_11400.c @@ -87,15 +87,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 15; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SIP_AUTH; token.sep[0] = '*'; - token.len_min[0] = 5; - token.len_max[0] = 5; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; @@ -159,14 +160,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[13] = '*'; - token.len_min[13] = 3; - token.len_max[13] = 3; - token.attr[13] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[13] = 3; + token.attr[13] = TOKEN_ATTR_FIXED_LENGTH; token.sep[14] = '*'; - token.len_min[14] = 32; - token.len_max[14] = 32; - token.attr[14] = TOKEN_ATTR_VERIFY_LENGTH + token.len[14] = 32; + token.attr[14] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_11500.c b/src/modules/module_11500.c index 9cdad89a1..fa691a2e2 100644 --- a/src/modules/module_11500.c +++ b/src/modules/module_11500.c @@ -48,18 +48,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 8; - token.len_max[0] = 8; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = hashconfig->separator; - token.len_min[1] = 8; - token.len_max[1] = 8; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 8; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_11600.c b/src/modules/module_11600.c index d105aed32..9f1d37992 100644 --- a/src/modules/module_11600.c +++ b/src/modules/module_11600.c @@ -438,6 +438,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 11; token.signatures_cnt = 1; @@ -448,9 +450,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; @@ -460,9 +461,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 1; - token.len_max[3] = 1; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 1; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '$'; @@ -477,9 +477,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '$'; - token.len_min[6] = 32; - token.len_max[6] = 32; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '$'; diff --git a/src/modules/module_11700.c b/src/modules/module_11700.c index 9e5308405..55b1bd13b 100644 --- a/src/modules/module_11700.c +++ b/src/modules/module_11700.c @@ -71,6 +71,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 64; diff --git a/src/modules/module_11750.c b/src/modules/module_11750.c index e575c0f9a..bf49d3f9e 100644 --- a/src/modules/module_11750.c +++ b/src/modules/module_11750.c @@ -71,12 +71,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_11760.c b/src/modules/module_11760.c index 96153191c..b9d0c19a2 100644 --- a/src/modules/module_11760.c +++ b/src/modules/module_11760.c @@ -71,12 +71,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_11800.c b/src/modules/module_11800.c index 2daaf0c83..36fa205ce 100644 --- a/src/modules/module_11800.c +++ b/src/modules/module_11800.c @@ -71,6 +71,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 128; diff --git a/src/modules/module_11850.c b/src/modules/module_11850.c index 73d4c8fd4..4e952013a 100644 --- a/src/modules/module_11850.c +++ b/src/modules/module_11850.c @@ -71,12 +71,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_11860.c b/src/modules/module_11860.c index bd9879085..3147c7a8c 100644 --- a/src/modules/module_11860.c +++ b/src/modules/module_11860.c @@ -71,12 +71,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_11900.c b/src/modules/module_11900.c index ee74a44e2..6e85beb0d 100644 --- a/src/modules/module_11900.c +++ b/src/modules/module_11900.c @@ -94,15 +94,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_PBKDF2_MD5; token.sep[0] = ':'; - token.len_min[0] = 3; - token.len_max[0] = 3; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 3; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = ':'; diff --git a/src/modules/module_12000.c b/src/modules/module_12000.c index f36f8f0d0..733f161b6 100644 --- a/src/modules/module_12000.c +++ b/src/modules/module_12000.c @@ -94,15 +94,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_PBKDF2_SHA1; token.sep[0] = ':'; - token.len_min[0] = 4; - token.len_max[0] = 4; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 4; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = ':'; diff --git a/src/modules/module_12001.c b/src/modules/module_12001.c index 264509ae2..e2be237fe 100644 --- a/src/modules/module_12001.c +++ b/src/modules/module_12001.c @@ -94,6 +94,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; @@ -103,9 +105,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 64; - token.len_max[1] = 64; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 64; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_12100.c b/src/modules/module_12100.c index 71a00d7a3..556476236 100644 --- a/src/modules/module_12100.c +++ b/src/modules/module_12100.c @@ -95,15 +95,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_PBKDF2_SHA512; token.sep[0] = ':'; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = ':'; diff --git a/src/modules/module_12200.c b/src/modules/module_12200.c index ab4a4d8c5..c731fc89f 100644 --- a/src/modules/module_12200.c +++ b/src/modules/module_12200.c @@ -106,6 +106,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -116,27 +118,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 16; - token.len_max[3] = 16; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; - token.len_min[4] = 16; - token.len_max[4] = 16; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 16; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_12300.c b/src/modules/module_12300.c index 75bc6fd5d..1352e956d 100644 --- a/src/modules/module_12300.c +++ b/src/modules/module_12300.c @@ -89,6 +89,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.len[0] = 128; diff --git a/src/modules/module_12400.c b/src/modules/module_12400.c index c57efa59b..e84420685 100644 --- a/src/modules/module_12400.c +++ b/src/modules/module_12400.c @@ -93,6 +93,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; diff --git a/src/modules/module_12500.c b/src/modules/module_12500.c index c8f014b7b..ada4ac4d8 100644 --- a/src/modules/module_12500.c +++ b/src/modules/module_12500.c @@ -116,33 +116,31 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_RAR3; token.sep[0] = '*'; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; - token.len_min[2] = 16; - token.len_max[2] = 16; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 16; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_12600.c b/src/modules/module_12600.c index 3fb0c60db..27606ceeb 100644 --- a/src/modules/module_12600.c +++ b/src/modules/module_12600.c @@ -66,17 +66,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 64; - token.len_max[1] = 64; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 64; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_12700.c b/src/modules/module_12700.c index 7100a6b87..f7af4f4d1 100644 --- a/src/modules/module_12700.c +++ b/src/modules/module_12700.c @@ -79,6 +79,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -88,15 +90,15 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '$'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = '$'; token.len_min[2] = 144; token.len_max[2] = 65536; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_12800.c b/src/modules/module_12800.c index f962cfb7b..066ed8a1d 100644 --- a/src/modules/module_12800.c +++ b/src/modules/module_12800.c @@ -108,32 +108,31 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_MS_DRSR; - token.len_min[0] = 11; - token.len_max[0] = 11; token.sep[0] = ','; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 11; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 20; - token.len_max[1] = 20; token.sep[1] = ','; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 20; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; + token.sep[2] = ','; token.len_min[2] = 1; token.len_max[2] = 6; - token.sep[2] = ','; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 64; - token.len_max[3] = 64; token.sep[3] = ','; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_12900.c b/src/modules/module_12900.c index a3be18b9c..2a09a0652 100644 --- a/src/modules/module_12900.c +++ b/src/modules/module_12900.c @@ -108,6 +108,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.len[0] = 64; diff --git a/src/modules/module_13000.c b/src/modules/module_13000.c index 55c74af28..2bb211b7d 100644 --- a/src/modules/module_13000.c +++ b/src/modules/module_13000.c @@ -123,6 +123,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -133,39 +135,33 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 2; - token.len_max[1] = 2; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; - token.len_min[3] = 2; - token.len_max[3] = 2; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 2; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '$'; - token.len_min[4] = 32; - token.len_max[4] = 32; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; - token.len_min[5] = 1; - token.len_max[5] = 1; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '$'; - token.len_min[6] = 16; - token.len_max[6] = 16; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 16; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_13100.c b/src/modules/module_13100.c index 1be89316a..23e0ee1f0 100644 --- a/src/modules/module_13100.c +++ b/src/modules/module_13100.c @@ -105,6 +105,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KRB5TGS; @@ -146,9 +148,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // etype token.sep[1] = '$'; - token.len_min[1] = 2; - token.len_max[1] = 2; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // user$realm$spn @@ -159,9 +160,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // checksum token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // edata2 @@ -179,17 +179,15 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // etype token.sep[1] = '$'; - token.len_min[1] = 2; - token.len_max[1] = 2; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // checksum token.sep[2] = '$'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // edata2 @@ -215,9 +213,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // checksum token.sep[2] = '$'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // edata2 diff --git a/src/modules/module_13200.c b/src/modules/module_13200.c index 54ddbba29..22d201208 100644 --- a/src/modules/module_13200.c +++ b/src/modules/module_13200.c @@ -74,21 +74,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_AXCRYPT; token.sep[0] = '*'; - token.len_min[0] = 9; - token.len_max[0] = 9; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -98,15 +98,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 48; - token.len_max[4] = 48; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 48; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_13300.c b/src/modules/module_13300.c index 5da86224e..daef383d7 100644 --- a/src/modules/module_13300.c +++ b/src/modules/module_13300.c @@ -55,6 +55,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_13400.c b/src/modules/module_13400.c index d559115e1..7187f5815 100644 --- a/src/modules/module_13400.c +++ b/src/modules/module_13400.c @@ -112,19 +112,19 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KEEPASS; token.sep[0] = '*'; - token.len_min[0] = 9; - token.len_max[0] = 9; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -148,33 +148,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 11; token.sep[4] = '*'; - token.len_min[4] = 32; - token.len_max[4] = 32; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 64; - token.len_max[5] = 64; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[6] = '*'; - token.len_min[6] = 32; - token.len_max[6] = 32; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '*'; - token.len_min[7] = 64; - token.len_max[7] = 64; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 64; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[8] = '*'; - token.len_min[8] = 1; - token.len_max[8] = 1; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 1; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[9] = '*'; @@ -194,21 +189,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 14; token.sep[11] = '*'; - token.len_min[11] = 1; - token.len_max[11] = 1; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH + token.len[11] = 1; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[12] = '*'; - token.len_min[12] = 2; - token.len_max[12] = 2; - token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH + token.len[12] = 2; + token.attr[12] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[13] = '*'; - token.len_min[13] = 64; - token.len_max[13] = 64; - token.attr[13] = TOKEN_ATTR_VERIFY_LENGTH + token.len[13] = 64; + token.attr[13] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; } } @@ -217,33 +209,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 9; token.sep[4] = '*'; - token.len_min[4] = 64; - token.len_max[4] = 64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 64; - token.len_max[5] = 64; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[6] = '*'; - token.len_min[6] = 32; - token.len_max[6] = 32; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '*'; - token.len_min[7] = 64; - token.len_max[7] = 64; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 64; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[8] = '*'; - token.len_min[8] = 64; - token.len_max[8] = 64; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 64; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; if (is_keyfile_present == true) @@ -251,21 +238,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 12; token.sep[9] = '*'; - token.len_min[9] = 1; - token.len_max[9] = 1; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 1; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[10] = '*'; - token.len_min[10] = 2; - token.len_max[10] = 2; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.len[10] = 2; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[11] = '*'; - token.len_min[11] = 64; - token.len_max[11] = 64; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH + token.len[11] = 64; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; } } diff --git a/src/modules/module_13500.c b/src/modules/module_13500.c index 42829d9f8..8aa803f3e 100644 --- a/src/modules/module_13500.c +++ b/src/modules/module_13500.c @@ -73,12 +73,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = 32; diff --git a/src/modules/module_13600.c b/src/modules/module_13600.c index 60988c4d6..6ab9db77f 100644 --- a/src/modules/module_13600.c +++ b/src/modules/module_13600.c @@ -119,70 +119,66 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 10; token.signatures_cnt = 2; token.signatures_buf[0] = SIGNATURE_ZIP2_START; token.signatures_buf[1] = SIGNATURE_ZIP2_STOP; - token.len_min[0] = 6; - token.len_max[0] = 6; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 1; - token.len_max[3] = 1; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 1; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '*'; token.len_min[4] = 16; token.len_max[4] = 32; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[5] = '*'; token.len_min[5] = 1; token.len_max[5] = 6; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[6] = '*'; token.len_min[6] = 1; token.len_max[6] = 6; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[7] = '*'; token.len_min[7] = 0; token.len_max[7] = 0x200000 * 4 * 2; - token.sep[7] = '*'; token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[8] = 20; - token.len_max[8] = 20; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 20; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[9] = 7; - token.len_max[9] = 7; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 7; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_13800.c b/src/modules/module_13800.c index 8bae1d163..af1b68946 100644 --- a/src/modules/module_13800.c +++ b/src/modules/module_13800.c @@ -86,18 +86,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; - token.len_min[0] = 64; - token.len_max[0] = 64; token.sep[0] = hashconfig->separator; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 256; - token.len_max[1] = 256; token.sep[1] = hashconfig->separator; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 256; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_13900.c b/src/modules/module_13900.c index b5eadb8c7..ed573ec79 100644 --- a/src/modules/module_13900.c +++ b/src/modules/module_13900.c @@ -51,17 +51,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 9; - token.len_max[1] = 9; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 9; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_14000.c b/src/modules/module_14000.c index 28b07df76..80d1fd79f 100644 --- a/src/modules/module_14000.c +++ b/src/modules/module_14000.c @@ -163,17 +163,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 16; - token.len_max[1] = 16; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_14100.c b/src/modules/module_14100.c index 2c93b2d53..bece404ad 100644 --- a/src/modules/module_14100.c +++ b/src/modules/module_14100.c @@ -114,17 +114,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 16; - token.len_max[1] = 16; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_14400.c b/src/modules/module_14400.c index a45d818e7..7c10075a6 100644 --- a/src/modules/module_14400.c +++ b/src/modules/module_14400.c @@ -63,17 +63,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 20; - token.len_max[1] = 20; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 20; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_14500.c b/src/modules/module_14500.c index 23ff627be..8033ed481 100644 --- a/src/modules/module_14500.c +++ b/src/modules/module_14500.c @@ -144,6 +144,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -160,27 +162,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 16 * 2; - token.len_max[3] = 16 * 2; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16 * 2; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; - token.len_min[4] = 16 * 2; - token.len_max[4] = 16 * 2; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 16 * 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; - token.len_min[5] = 16 * 2; - token.len_max[5] = 16 * 2; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 16 * 2; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_14700.c b/src/modules/module_14700.c index 5bdfe431c..601e07063 100644 --- a/src/modules/module_14700.c +++ b/src/modules/module_14700.c @@ -94,50 +94,49 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_ITUNES_BACKUP; - token.len_min[0] = 15; - token.len_max[0] = 15; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 15; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '*'; token.len_min[1] = 1; token.len_max[1] = 2; - token.sep[1] = '*'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 80; - token.len_max[2] = 80; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 80; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[3] = '*'; token.len_min[3] = 1; token.len_max[3] = 6; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 40; - token.len_max[4] = 40; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 40; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[5] = '*'; token.len_min[5] = 0; token.len_max[5] = 10; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[6] = '*'; token.len_min[6] = 0; token.len_max[6] = 40; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_14800.c b/src/modules/module_14800.c index 9e88690e4..2825b93ce 100644 --- a/src/modules/module_14800.c +++ b/src/modules/module_14800.c @@ -110,50 +110,49 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_ITUNES_BACKUP; - token.len_min[0] = 15; - token.len_max[0] = 15; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 15; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = '*'; token.len_min[1] = 1; token.len_max[1] = 2; - token.sep[1] = '*'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 80; - token.len_max[2] = 80; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 80; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[3] = '*'; token.len_min[3] = 1; token.len_max[3] = 6; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 40; - token.len_max[4] = 40; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 40; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[5] = '*'; token.len_min[5] = 0; token.len_max[5] = 10; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[6] = '*'; token.len_min[6] = 0; token.len_max[6] = 40; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_14900.c b/src/modules/module_14900.c index 33614cc1d..2bedb5553 100644 --- a/src/modules/module_14900.c +++ b/src/modules/module_14900.c @@ -67,18 +67,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; - token.len_min[0] = 8; - token.len_max[0] = 8; token.sep[0] = hashconfig->separator; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 8; - token.len_max[1] = 8; token.sep[1] = hashconfig->separator; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 8; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_15000.c b/src/modules/module_15000.c index 8a4fe3b6c..b41d51d35 100644 --- a/src/modules/module_15000.c +++ b/src/modules/module_15000.c @@ -97,17 +97,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 64; - token.len_max[1] = 64; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 64; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_15100.c b/src/modules/module_15100.c index 670aa3754..e1c27067c 100644 --- a/src/modules/module_15100.c +++ b/src/modules/module_15100.c @@ -200,6 +200,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -216,14 +218,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 8; - token.len_max[2] = 8; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[2] = 8; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH; token.sep[3] = '$'; - token.len_min[3] = 28; - token.len_max[3] = 28; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 28; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64B; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_15200.c b/src/modules/module_15200.c index 0f1ef64ef..91c25f0c3 100644 --- a/src/modules/module_15200.c +++ b/src/modules/module_15200.c @@ -77,6 +77,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; diff --git a/src/modules/module_15300.c b/src/modules/module_15300.c index 661ad20c9..8f1782dee 100644 --- a/src/modules/module_15300.c +++ b/src/modules/module_15300.c @@ -105,6 +105,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 10; token.signatures_cnt = 1; @@ -116,55 +118,52 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // version - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // context - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // sid + token.sep[3] = '*'; token.len_min[3] = 10; token.len_max[3] = 60; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; // cipher + token.sep[4] = '*'; token.len_min[4] = 4; token.len_max[4] = 6; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; // hash + token.sep[5] = '*'; token.len_min[5] = 4; token.len_max[5] = 6; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH; // iterations + token.sep[6] = '*'; token.len_min[6] = 1; token.len_max[6] = 6; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iv - token.len_min[7] = 32; - token.len_max[7] = 32; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 32; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // content len + token.sep[8] = '*'; token.len_min[8] = 1; token.len_max[8] = 6; - token.sep[8] = '*'; token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; diff --git a/src/modules/module_15310.c b/src/modules/module_15310.c index 85ebc3860..51128f356 100644 --- a/src/modules/module_15310.c +++ b/src/modules/module_15310.c @@ -121,6 +121,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 10; token.signatures_cnt = 1; @@ -132,55 +134,52 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // version - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // context - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // sid + token.sep[3] = '*'; token.len_min[3] = 10; token.len_max[3] = 60; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; // cipher + token.sep[4] = '*'; token.len_min[4] = 4; token.len_max[4] = 6; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; // hash + token.sep[5] = '*'; token.len_min[5] = 4; token.len_max[5] = 6; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH; // iterations + token.sep[6] = '*'; token.len_min[6] = 1; token.len_max[6] = 6; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iv - token.len_min[7] = 32; - token.len_max[7] = 32; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 32; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // content len + token.sep[8] = '*'; token.len_min[8] = 1; token.len_max[8] = 6; - token.sep[8] = '*'; token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; diff --git a/src/modules/module_15400.c b/src/modules/module_15400.c index ffca28876..a42b7ba67 100644 --- a/src/modules/module_15400.c +++ b/src/modules/module_15400.c @@ -90,21 +90,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_CHACHA20; token.sep[0] = '*'; - token.len_min[0] = 10; - token.len_max[0] = 10; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 10; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 16; - token.len_max[1] = 16; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; @@ -113,21 +113,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[3] = '*'; - token.len_min[3] = 16; - token.len_max[3] = 16; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 16; - token.len_max[4] = 16; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 16; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 16; - token.len_max[5] = 16; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 16; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_15500.c b/src/modules/module_15500.c index a352777a8..2d190f1dd 100644 --- a/src/modules/module_15500.c +++ b/src/modules/module_15500.c @@ -89,27 +89,26 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_JKS_SHA1; token.sep[0] = '*'; - token.len_min[0] = 10; - token.len_max[0] = 10; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 10; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 40; - token.len_max[1] = 40; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 40; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; - token.len_min[2] = 40; - token.len_max[2] = 40; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 40; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; @@ -119,15 +118,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 2; - token.len_max[4] = 2; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 28; - token.len_max[5] = 28; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 28; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[6] = '*'; diff --git a/src/modules/module_15600.c b/src/modules/module_15600.c index 76766b004..a9605061f 100644 --- a/src/modules/module_15600.c +++ b/src/modules/module_15600.c @@ -126,15 +126,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_ETHEREUM_PBKDF2; token.sep[0] = '*'; - token.len_min[0] = 11; - token.len_max[0] = 11; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 11; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; @@ -150,15 +151,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 64; - token.len_max[4] = 64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_15700.c b/src/modules/module_15700.c index 5743dea70..baf0c72c1 100644 --- a/src/modules/module_15700.c +++ b/src/modules/module_15700.c @@ -287,15 +287,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_ETHEREUM_SCRYPT; token.sep[0] = '*'; - token.len_min[0] = 11; - token.len_max[0] = 11; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 11; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; @@ -317,21 +318,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '*'; - token.len_min[4] = 64; - token.len_max[4] = 64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 64; - token.len_max[5] = 64; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[6] = '*'; - token.len_min[6] = 64; - token.len_max[6] = 64; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 64; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_15900.c b/src/modules/module_15900.c index 0f4af0d5c..f8c15a99d 100644 --- a/src/modules/module_15900.c +++ b/src/modules/module_15900.c @@ -117,6 +117,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 10; token.signatures_cnt = 1; @@ -128,41 +130,39 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // version - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // context - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // sid + token.sep[3] = '*'; token.len_min[3] = 10; token.len_max[3] = 60; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; // cipher + token.sep[4] = '*'; token.len_min[4] = 4; token.len_max[4] = 6; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; // hash + token.sep[5] = '*'; token.len_min[5] = 4; token.len_max[5] = 6; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH; // iterations + token.sep[6] = '*'; token.len_min[6] = 1; token.len_max[6] = 6; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; @@ -174,9 +174,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; // content len + token.sep[8] = '*'; token.len_min[8] = 1; token.len_max[8] = 6; - token.sep[8] = '*'; token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; diff --git a/src/modules/module_15910.c b/src/modules/module_15910.c index 5b85bb2b6..9a1c59be9 100644 --- a/src/modules/module_15910.c +++ b/src/modules/module_15910.c @@ -127,6 +127,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 10; token.signatures_cnt = 1; @@ -138,55 +140,52 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // version - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // context - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // sid + token.sep[3] = '*'; token.len_min[3] = 10; token.len_max[3] = 60; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; // cipher + token.sep[4] = '*'; token.len_min[4] = 4; token.len_max[4] = 6; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; // hash + token.sep[5] = '*'; token.len_min[5] = 4; token.len_max[5] = 6; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH; // iterations + token.sep[6] = '*'; token.len_min[6] = 1; token.len_max[6] = 6; - token.sep[6] = '*'; token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iv - token.len_min[7] = 32; - token.len_max[7] = 32; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 32; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // content len + token.sep[8] = '*'; token.len_min[8] = 1; token.len_max[8] = 6; - token.sep[8] = '*'; token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; diff --git a/src/modules/module_16000.c b/src/modules/module_16000.c index f5b533c67..0d9536f73 100644 --- a/src/modules/module_16000.c +++ b/src/modules/module_16000.c @@ -55,6 +55,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 10; diff --git a/src/modules/module_16100.c b/src/modules/module_16100.c index 15418a7b7..edcf33e8b 100644 --- a/src/modules/module_16100.c +++ b/src/modules/module_16100.c @@ -72,6 +72,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -82,9 +84,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 8; - token.len_max[1] = 8; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 8; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; @@ -94,9 +95,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; - token.len_min[3] = 4; - token.len_max[3] = 4; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 4; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_16200.c b/src/modules/module_16200.c index e846b875b..36e14358e 100644 --- a/src/modules/module_16200.c +++ b/src/modules/module_16200.c @@ -116,15 +116,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_APPLE_SECURE_NOTES; token.sep[0] = '*'; - token.len_min[0] = 5; - token.len_max[0] = 5; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; @@ -140,15 +141,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 48; - token.len_max[4] = 48; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 48; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_16300.c b/src/modules/module_16300.c index 9ac1c7cf0..1efe11c73 100644 --- a/src/modules/module_16300.c +++ b/src/modules/module_16300.c @@ -128,15 +128,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_ETHEREUM_PRESALE; token.sep[0] = '*'; - token.len_min[0] = 11; - token.len_max[0] = 11; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 11; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; @@ -146,15 +147,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; - token.len_min[2] = 40; - token.len_max[2] = 40; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 40; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_16400.c b/src/modules/module_16400.c index e2c1c9abf..009d82ad2 100644 --- a/src/modules/module_16400.c +++ b/src/modules/module_16400.c @@ -64,6 +64,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_16500.c b/src/modules/module_16500.c index 6bd19f712..d4add2cf9 100644 --- a/src/modules/module_16500.c +++ b/src/modules/module_16500.c @@ -123,6 +123,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.sep[0] = '.'; diff --git a/src/modules/module_16600.c b/src/modules/module_16600.c index cde2db041..0571028f7 100644 --- a/src/modules/module_16600.c +++ b/src/modules/module_16600.c @@ -70,6 +70,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -80,21 +82,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_16700.c b/src/modules/module_16700.c index e683a5356..50314c20d 100644 --- a/src/modules/module_16700.c +++ b/src/modules/module_16700.c @@ -85,6 +85,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -107,9 +109,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; @@ -119,9 +120,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[5] = '$'; - token.len_min[5] = 48; - token.len_max[5] = 48; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 48; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_16800.c b/src/modules/module_16800.c index bff43cdfd..f01ac61ee 100644 --- a/src/modules/module_16800.c +++ b/src/modules/module_16800.c @@ -333,24 +333,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = sep; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = sep; - token.len_min[1] = 12; - token.len_max[1] = 12; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 12; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = sep; - token.len_min[2] = 12; - token.len_max[2] = 12; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 12; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = sep; diff --git a/src/modules/module_16801.c b/src/modules/module_16801.c index 82fe33bb1..43886ed82 100644 --- a/src/modules/module_16801.c +++ b/src/modules/module_16801.c @@ -355,26 +355,25 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + // real 16801 pmkid hash-lines token.token_cnt = 3; token.sep[0] = sep; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = sep; - token.len_min[1] = 12; - token.len_max[1] = 12; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 12; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = sep; - token.len_min[2] = 12; - token.len_max[2] = 12; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 12; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); @@ -386,21 +385,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 4; token.sep[0] = sep; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = sep; - token.len_min[1] = 12; - token.len_max[1] = 12; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 12; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = sep; - token.len_min[2] = 12; - token.len_max[2] = 12; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 12; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = sep; diff --git a/src/modules/module_16900.c b/src/modules/module_16900.c index 9ab655617..213b5940e 100644 --- a/src/modules/module_16900.c +++ b/src/modules/module_16900.c @@ -127,6 +127,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -137,21 +139,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '*'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; @@ -161,9 +160,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 64; - token.len_max[5] = 64; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_17010.c b/src/modules/module_17010.c index ede464576..865a6f8eb 100644 --- a/src/modules/module_17010.c +++ b/src/modules/module_17010.c @@ -137,6 +137,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 13; // signature $gpg$ @@ -144,93 +146,84 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.signatures_buf[0] = SIGNATURE_GPG; // signature $gpg$ - token.len_min[0] = 5; - token.len_max[0] = 5; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; // "1" -- unknown option - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of the encrypted data in bytes + token.sep[2] = '*'; token.len_min[2] = 3; token.len_max[2] = 4; - token.sep[2] = '*'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of the key: 1024, 2048, 4096, etc. + token.sep[3] = '*'; token.len_min[3] = 3; token.len_max[3] = 4; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // encrypted key -- twice the amount of byte because its interpreted as characters + token.sep[4] = '*'; token.len_min[4] = 256; token.len_max[4] = 3072; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // "3" - String2Key parameter - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // "254" - String2Key parameters - token.len_min[6] = 3; - token.len_max[6] = 3; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 3; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // "2" - String2Key parameters - token.len_min[7] = 1; - token.len_max[7] = 1; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 1; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // cipher mode: 7 or 9 - token.len_min[8] = 1; - token.len_max[8] = 1; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 1; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of initial vector in bytes: 16 - token.len_min[9] = 2; - token.len_max[9] = 2; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 2; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // initial vector - twice the amount of bytes because its interpreted as characters - token.len_min[10] = 32; - token.len_max[10] = 32; token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.len[10] = 32; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // iteration count + token.sep[11] = '*'; token.len_min[11] = 1; token.len_max[11] = 8; - token.sep[11] = '*'; token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // salt - 8 bytes / 16 characters - token.len_min[12] = 16; - token.len_max[12] = 16; - token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH + token.len[12] = 16; + token.attr[12] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_17020.c b/src/modules/module_17020.c index 4ce8e21ea..c4c9c7bef 100644 --- a/src/modules/module_17020.c +++ b/src/modules/module_17020.c @@ -141,6 +141,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 13; // signature $gpg$ @@ -148,93 +150,84 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.signatures_buf[0] = SIGNATURE_GPG; // signature $gpg$ - token.len_min[0] = 5; - token.len_max[0] = 5; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; // "1" -- unknown option - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of the encrypted data in bytes + token.sep[2] = '*'; token.len_min[2] = 3; token.len_max[2] = 4; - token.sep[2] = '*'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of the key: 1024, 2048, 4096, etc. + token.sep[3] = '*'; token.len_min[3] = 3; token.len_max[3] = 4; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // encrypted key -- twice the amount of byte because its interpreted as characters + token.sep[4] = '*'; token.len_min[4] = 256; token.len_max[4] = 3072; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // "3" - String2Key parameter - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // "254" - String2Key parameters - token.len_min[6] = 3; - token.len_max[6] = 3; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 3; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // "10" - String2Key parameters - token.len_min[7] = 2; - token.len_max[7] = 2; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 2; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // cipher mode: 7 or 9 - token.len_min[8] = 1; - token.len_max[8] = 1; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 1; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of initial vector in bytes: 16 - token.len_min[9] = 2; - token.len_max[9] = 2; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 2; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // initial vector - twice the amount of bytes because its interpreted as characters - token.len_min[10] = 32; - token.len_max[10] = 32; token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.len[10] = 32; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // iteration count + token.sep[11] = '*'; token.len_min[11] = 1; token.len_max[11] = 8; - token.sep[11] = '*'; token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // salt - 8 bytes / 16 characters - token.len_min[12] = 16; - token.len_max[12] = 16; - token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH + token.len[12] = 16; + token.attr[12] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_17030.c b/src/modules/module_17030.c index 5b06d694e..05867755c 100644 --- a/src/modules/module_17030.c +++ b/src/modules/module_17030.c @@ -137,6 +137,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 13; // signature $gpg$ @@ -144,93 +146,84 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.signatures_buf[0] = SIGNATURE_GPG; // signature $gpg$ - token.len_min[0] = 5; - token.len_max[0] = 5; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; // "1" -- unknown option - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of the encrypted data in bytes + token.sep[2] = '*'; token.len_min[2] = 3; token.len_max[2] = 4; - token.sep[2] = '*'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of the key: 1024, 2048, 4096, etc. + token.sep[3] = '*'; token.len_min[3] = 3; token.len_max[3] = 4; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // encrypted key -- twice the amount of byte because its interpreted as characters + token.sep[4] = '*'; token.len_min[4] = 256; token.len_max[4] = 3072; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // "3" - String2Key parameter - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // "254" - String2Key parameters - token.len_min[6] = 3; - token.len_max[6] = 3; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 3; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // "10" - String2Key parameters - token.len_min[7] = 1; - token.len_max[7] = 1; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 1; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // cipher mode: 7 or 9 - token.len_min[8] = 1; - token.len_max[8] = 1; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 1; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // size of initial vector in bytes: 16 - token.len_min[9] = 2; - token.len_max[9] = 2; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 2; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // initial vector - twice the amount of bytes because its interpreted as characters - token.len_min[10] = 32; - token.len_max[10] = 32; token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.len[10] = 32; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // iteration count + token.sep[11] = '*'; token.len_min[11] = 1; token.len_max[11] = 8; - token.sep[11] = '*'; token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // salt - 8 bytes / 16 characters - token.len_min[12] = 16; - token.len_max[12] = 16; - token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH + token.len[12] = 16; + token.attr[12] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_17300.c b/src/modules/module_17300.c index 69b2d9a71..139bf7181 100644 --- a/src/modules/module_17300.c +++ b/src/modules/module_17300.c @@ -50,6 +50,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 56; diff --git a/src/modules/module_17400.c b/src/modules/module_17400.c index 8960f81b0..74a7b2275 100644 --- a/src/modules/module_17400.c +++ b/src/modules/module_17400.c @@ -50,6 +50,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 64; diff --git a/src/modules/module_17500.c b/src/modules/module_17500.c index 21f36b68c..2bd2448e4 100644 --- a/src/modules/module_17500.c +++ b/src/modules/module_17500.c @@ -50,6 +50,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 96; diff --git a/src/modules/module_17600.c b/src/modules/module_17600.c index be05ad43d..b6760541b 100644 --- a/src/modules/module_17600.c +++ b/src/modules/module_17600.c @@ -50,6 +50,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 128; diff --git a/src/modules/module_17700.c b/src/modules/module_17700.c index f0ac2fe15..803bed8c5 100644 --- a/src/modules/module_17700.c +++ b/src/modules/module_17700.c @@ -50,6 +50,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 56; diff --git a/src/modules/module_17800.c b/src/modules/module_17800.c index aa0c1d710..ae6abb885 100644 --- a/src/modules/module_17800.c +++ b/src/modules/module_17800.c @@ -50,6 +50,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 64; diff --git a/src/modules/module_17900.c b/src/modules/module_17900.c index 95bc5f611..3db6a9496 100644 --- a/src/modules/module_17900.c +++ b/src/modules/module_17900.c @@ -50,6 +50,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 96; diff --git a/src/modules/module_18000.c b/src/modules/module_18000.c index 1d99d0a4e..5f3209c5b 100644 --- a/src/modules/module_18000.c +++ b/src/modules/module_18000.c @@ -50,6 +50,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 128; diff --git a/src/modules/module_18100.c b/src/modules/module_18100.c index d2d3eaee3..d7b1f62a9 100644 --- a/src/modules/module_18100.c +++ b/src/modules/module_18100.c @@ -57,12 +57,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_18200.c b/src/modules/module_18200.c index b7c4aab11..c8a82937f 100644 --- a/src/modules/module_18200.c +++ b/src/modules/module_18200.c @@ -104,6 +104,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KRB5ASREP; @@ -131,7 +133,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE krb5asrep->format = 1; - parse_off += 2; + parse_off += 3; } else { @@ -145,8 +147,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE if (account_info_stop == NULL) return (PARSER_SEPARATOR_UNMATCHED); - account_info_stop++; // we want the : char included - const int account_info_len = account_info_stop - account_info_start; token.token_cnt = 4; @@ -171,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // checksum token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // edata2 @@ -195,9 +194,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // checksum token.sep[2] = '$'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // edata2 diff --git a/src/modules/module_18300.c b/src/modules/module_18300.c index 0bd20be83..6a3750718 100644 --- a/src/modules/module_18300.c +++ b/src/modules/module_18300.c @@ -116,6 +116,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -138,9 +140,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; @@ -150,9 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[5] = '$'; - token.len_min[5] = 80; - token.len_max[5] = 80; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 80; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_18400.c b/src/modules/module_18400.c index 7f681910b..cb6741ad1 100644 --- a/src/modules/module_18400.c +++ b/src/modules/module_18400.c @@ -96,75 +96,67 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 12; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_ODF; - token.len_min[0] = 5; - token.len_max[0] = 5; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[3] = '*'; token.len_min[3] = 4; token.len_max[3] = 6; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 2; - token.len_max[4] = 2; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[5] = 64; - token.len_max[5] = 64; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 2; - token.len_max[6] = 2; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 2; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[7] = 32; - token.len_max[7] = 32; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 32; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[8] = 2; - token.len_max[8] = 2; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 2; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 32; - token.len_max[9] = 32; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 32; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[10] = 1; - token.len_max[10] = 1; token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.len[10] = 1; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.len_min[11] = 16; diff --git a/src/modules/module_18500.c b/src/modules/module_18500.c index 920a624de..f4e0e3cdc 100644 --- a/src/modules/module_18500.c +++ b/src/modules/module_18500.c @@ -68,11 +68,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_18600.c b/src/modules/module_18600.c index 38ce745cd..ec7e5cbef 100644 --- a/src/modules/module_18600.c +++ b/src/modules/module_18600.c @@ -191,80 +191,72 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 12; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_ODF; - token.len_min[0] = 5; - token.len_max[0] = 5; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[3] = '*'; token.len_min[3] = 4; token.len_max[3] = 6; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 2; - token.len_max[4] = 2; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[5] = 40; - token.len_max[5] = 40; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 40; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 1; - token.len_max[6] = 1; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 1; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[7] = 16; - token.len_max[7] = 16; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 16; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[8] = 2; - token.len_max[8] = 2; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 2; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 32; - token.len_max[9] = 32; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 32; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[10] = 1; - token.len_max[10] = 1; token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.len[10] = 1; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[11] = '*'; token.len_min[11] = 16; token.len_max[11] = 2048; - token.sep[11] = '*'; token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_18700.c b/src/modules/module_18700.c index f1d6823af..57c7bdc1e 100644 --- a/src/modules/module_18700.c +++ b/src/modules/module_18700.c @@ -48,11 +48,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 8; - token.len_max[0] = 8; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_18800.c b/src/modules/module_18800.c index 342f2ecfc..45e30f6b6 100644 --- a/src/modules/module_18800.c +++ b/src/modules/module_18800.c @@ -125,11 +125,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 80; - token.len_max[0] = 80; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 80; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_18900.c b/src/modules/module_18900.c index b23b81467..2141796f2 100644 --- a/src/modules/module_18900.c +++ b/src/modules/module_18900.c @@ -96,6 +96,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; @@ -107,52 +109,46 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // version - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // cipher - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter + token.sep[3] = '*'; token.len_min[3] = 1; token.len_max[3] = 6; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // user_salt - token.len_min[4] = 128; - token.len_max[4] = 128; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 128; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // ck_salt - token.len_min[5] = 128; - token.len_max[5] = 128; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 128; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // user_iv - token.len_min[6] = 32; - token.len_max[6] = 32; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // masterkey_blob - token.len_min[7] = 192; - token.len_max[7] = 192; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 192; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_19000.c b/src/modules/module_19000.c index d0d23c2b4..7179bac0c 100644 --- a/src/modules/module_19000.c +++ b/src/modules/module_19000.c @@ -72,12 +72,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = '@'; - token.len_min[0] = 0; - token.len_max[0] = 0; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 0; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; token.sep[1] = '@'; token.len_min[1] = 1; diff --git a/src/modules/module_19100.c b/src/modules/module_19100.c index 44538ca08..af94f1c9b 100644 --- a/src/modules/module_19100.c +++ b/src/modules/module_19100.c @@ -64,12 +64,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = '@'; - token.len_min[0] = 0; - token.len_max[0] = 0; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 0; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; token.sep[1] = '@'; token.len_min[1] = 1; diff --git a/src/modules/module_19200.c b/src/modules/module_19200.c index 657e132ea..9def88b03 100644 --- a/src/modules/module_19200.c +++ b/src/modules/module_19200.c @@ -67,12 +67,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = '@'; - token.len_min[0] = 0; - token.len_max[0] = 0; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 0; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; token.sep[1] = '@'; token.len_min[1] = 1; diff --git a/src/modules/module_19300.c b/src/modules/module_19300.c index c78e03727..2e9bb17d9 100644 --- a/src/modules/module_19300.c +++ b/src/modules/module_19300.c @@ -90,12 +90,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = hashconfig->separator; diff --git a/src/modules/module_19500.c b/src/modules/module_19500.c index 130a3bea6..3e6748efa 100644 --- a/src/modules/module_19500.c +++ b/src/modules/module_19500.c @@ -82,12 +82,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = hashconfig->separator; diff --git a/src/modules/module_19600.c b/src/modules/module_19600.c index 19a327f75..cbe9a58d3 100644 --- a/src/modules/module_19600.c +++ b/src/modules/module_19600.c @@ -89,6 +89,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KRB5TGS; @@ -125,16 +127,15 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.sep[3] = '$'; // hmac-sha1 stripped to 12bytes - token.len_min[3] = 24; - token.len_max[3] = 24; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.len[3] = 24; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; token.len_min[4] = 64; token.len_max[4] = 40960; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + | TOKEN_ATTR_VERIFY_HEX; } // assume $krb5tgs$17$user$realm$*spn*$checksum$edata2 else @@ -164,16 +165,15 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[3] = TOKEN_ATTR_FIXED_LENGTH; token.sep[4] = '$'; - token.len_min[4] = 24; - token.len_max[4] = 24; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.len[4] = 24; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; token.len_min[5] = 64; token.len_max[5] = 40960; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + | TOKEN_ATTR_VERIFY_HEX; is_spn_provided = 1; } diff --git a/src/modules/module_19700.c b/src/modules/module_19700.c index 4ccaefea1..e2f296076 100644 --- a/src/modules/module_19700.c +++ b/src/modules/module_19700.c @@ -89,6 +89,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KRB5TGS; @@ -125,10 +127,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.sep[3] = '$'; // hmac-sha1 stripped to 12bytes - token.len_min[3] = 24; - token.len_max[3] = 24; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.len[3] = 24; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; token.len_min[4] = 64; @@ -164,16 +165,15 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[3] = TOKEN_ATTR_FIXED_LENGTH; token.sep[4] = '$'; - token.len_min[4] = 24; - token.len_max[4] = 24; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.len[4] = 24; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; token.len_min[5] = 64; token.len_max[5] = 40960; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + | TOKEN_ATTR_VERIFY_HEX; is_spn_provided = 1; } diff --git a/src/modules/module_19800.c b/src/modules/module_19800.c index 9c5957fe5..4f28ab31a 100644 --- a/src/modules/module_19800.c +++ b/src/modules/module_19800.c @@ -89,6 +89,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KRB5PA; diff --git a/src/modules/module_19900.c b/src/modules/module_19900.c index 7a0fb6e04..af380c9c6 100644 --- a/src/modules/module_19900.c +++ b/src/modules/module_19900.c @@ -89,6 +89,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KRB5PA; diff --git a/src/modules/module_20011.c b/src/modules/module_20011.c index 8e3892521..c01b548bb 100644 --- a/src/modules/module_20011.c +++ b/src/modules/module_20011.c @@ -104,6 +104,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -113,10 +115,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[2] = 4096; diff --git a/src/modules/module_20012.c b/src/modules/module_20012.c index 76f6f8b6a..627765d09 100644 --- a/src/modules/module_20012.c +++ b/src/modules/module_20012.c @@ -104,6 +104,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -113,10 +115,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[2] = 4096; diff --git a/src/modules/module_20013.c b/src/modules/module_20013.c index d0e6a8958..b8cfbf9b7 100644 --- a/src/modules/module_20013.c +++ b/src/modules/module_20013.c @@ -104,6 +104,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -113,10 +115,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[2] = 4096; diff --git a/src/modules/module_20200.c b/src/modules/module_20200.c index d775cc986..5be8bdc89 100644 --- a/src/modules/module_20200.c +++ b/src/modules/module_20200.c @@ -93,6 +93,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -100,14 +102,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // the hash starts with a $ token.sep[0] = '$'; - token.len_min[0] = 0; - token.len_max[0] = 0; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 0; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; token.sep[1] = '$'; - token.len_min[1] = 13; - token.len_max[1] = 13; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 13; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; // iterations in decimal representation @@ -126,9 +126,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // payload in alternate base64 representanion token.sep[4] = '$'; - token.len_min[4] = HASH_LEN_B64; - token.len_max[4] = HASH_LEN_B64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = HASH_LEN_B64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64B; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_20300.c b/src/modules/module_20300.c index 792243334..2ccbb5c08 100644 --- a/src/modules/module_20300.c +++ b/src/modules/module_20300.c @@ -92,6 +92,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -99,14 +101,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // the hash starts with a $ token.sep[0] = '$'; - token.len_min[0] = 0; - token.len_max[0] = 0; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 0; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; token.sep[1] = '$'; - token.len_min[1] = 13; - token.len_max[1] = 13; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 13; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; // iterations in decimal representation @@ -125,9 +125,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // payload in alternate base64 representanion token.sep[4] = '$'; - token.len_min[4] = HASH_LEN_B64; - token.len_max[4] = HASH_LEN_B64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = HASH_LEN_B64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64B; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_20400.c b/src/modules/module_20400.c index be36d1fb9..80c4f56f4 100644 --- a/src/modules/module_20400.c +++ b/src/modules/module_20400.c @@ -92,6 +92,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -99,14 +101,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // the hash starts with a $ token.sep[0] = '$'; - token.len_min[0] = 0; - token.len_max[0] = 0; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 0; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; token.sep[1] = '$'; - token.len_min[1] = 6; - token.len_max[1] = 6; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 6; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; // iterations in decimal representation @@ -125,9 +125,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // payload in alternate base64 representanion token.sep[4] = '$'; - token.len_min[4] = HASH_LEN_B64; - token.len_max[4] = HASH_LEN_B64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = HASH_LEN_B64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64B; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_20500.c b/src/modules/module_20500.c index 7b05986a1..3a001c93e 100644 --- a/src/modules/module_20500.c +++ b/src/modules/module_20500.c @@ -105,11 +105,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 24; - token.len_max[0] = 24; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 24; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_20510.c b/src/modules/module_20510.c index 04fef62f8..e89e8dfc2 100644 --- a/src/modules/module_20510.c +++ b/src/modules/module_20510.c @@ -146,11 +146,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 24; - token.len_max[0] = 24; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 24; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_20600.c b/src/modules/module_20600.c index d957e6f76..dc35c6081 100644 --- a/src/modules/module_20600.c +++ b/src/modules/module_20600.c @@ -99,6 +99,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE { hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -107,9 +109,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // sig token.sep[0] = ':'; - token.len_min[0] = 10; - token.len_max[0] = 10; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 10; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; // iter diff --git a/src/modules/module_20710.c b/src/modules/module_20710.c index 9a7cfbed0..49705221e 100644 --- a/src/modules/module_20710.c +++ b/src/modules/module_20710.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_20711.c b/src/modules/module_20711.c index 44e8c9976..1103ddf7b 100644 --- a/src/modules/module_20711.c +++ b/src/modules/module_20711.c @@ -70,6 +70,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -80,14 +82,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 16; - token.len_max[1] = 16; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; token.sep[2] = '$'; - token.len_min[2] = 64; - token.len_max[2] = 64; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_20720.c b/src/modules/module_20720.c index 1eab75d78..3dc89ef5e 100644 --- a/src/modules/module_20720.c +++ b/src/modules/module_20720.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_20800.c b/src/modules/module_20800.c index 5aa0103d9..54a1b02d5 100644 --- a/src/modules/module_20800.c +++ b/src/modules/module_20800.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_20900.c b/src/modules/module_20900.c index 41022fb54..8a0dd5c60 100644 --- a/src/modules/module_20900.c +++ b/src/modules/module_20900.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_21000.c b/src/modules/module_21000.c index 32355f409..f8fadf552 100644 --- a/src/modules/module_21000.c +++ b/src/modules/module_21000.c @@ -67,11 +67,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 128; - token.len_max[0] = 128; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 128; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_21100.c b/src/modules/module_21100.c index 6198d0916..b722be594 100644 --- a/src/modules/module_21100.c +++ b/src/modules/module_21100.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_21200.c b/src/modules/module_21200.c index af03a0feb..f51d214a6 100644 --- a/src/modules/module_21200.c +++ b/src/modules/module_21200.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_21300.c b/src/modules/module_21300.c index 7dfc04005..1825bef35 100644 --- a/src/modules/module_21300.c +++ b/src/modules/module_21300.c @@ -53,12 +53,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_21400.c b/src/modules/module_21400.c index dc57927f6..2959a503f 100644 --- a/src/modules/module_21400.c +++ b/src/modules/module_21400.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_21420.c b/src/modules/module_21420.c index 6df334958..e55c031ab 100644 --- a/src/modules/module_21420.c +++ b/src/modules/module_21420.c @@ -54,12 +54,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_21500.c b/src/modules/module_21500.c index 314eda447..837c942bb 100644 --- a/src/modules/module_21500.c +++ b/src/modules/module_21500.c @@ -95,6 +95,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -110,9 +112,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[2] = '$'; - token.len_min[2] = 88; - token.len_max[2] = 88; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 88; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_21501.c b/src/modules/module_21501.c index abccc527c..a36517053 100644 --- a/src/modules/module_21501.c +++ b/src/modules/module_21501.c @@ -109,6 +109,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -119,15 +121,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 24; - token.len_max[1] = 24; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 24; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[2] = '$'; - token.len_min[2] = 88; - token.len_max[2] = 88; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 88; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_21600.c b/src/modules/module_21600.c index 7120445ea..1342e697c 100644 --- a/src/modules/module_21600.c +++ b/src/modules/module_21600.c @@ -90,6 +90,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 2; @@ -97,9 +99,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.signatures_buf[1] = SIGNATURE_WEB2PY_STOP; token.sep[0] = '('; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = ','; @@ -109,9 +110,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 10; - token.len_max[2] = 10; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 10; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[3] = '$'; @@ -119,9 +119,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.len_max[3] = SALT_MAX; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[4] = 40; - token.len_max[4] = 40; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 40; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_21700.c b/src/modules/module_21700.c index 96c12c811..8ca3f4ca6 100644 --- a/src/modules/module_21700.c +++ b/src/modules/module_21700.c @@ -125,6 +125,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -135,9 +137,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 66; - token.len_max[1] = 66; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 66; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; @@ -147,9 +148,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_21800.c b/src/modules/module_21800.c index 13fd8523c..752f3451c 100644 --- a/src/modules/module_21800.c +++ b/src/modules/module_21800.c @@ -116,6 +116,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -126,21 +128,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 66; - token.len_max[1] = 66; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 66; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; - token.len_min[2] = 2048; - token.len_max[2] = 2048; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2048; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_22000.c b/src/modules/module_22000.c index 79238c32f..5c20d6c7d 100644 --- a/src/modules/module_22000.c +++ b/src/modules/module_22000.c @@ -717,24 +717,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = sep; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = sep; - token.len_min[1] = 12; - token.len_max[1] = 12; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 12; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = sep; - token.len_min[2] = 12; - token.len_max[2] = 12; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 12; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = sep; @@ -759,39 +758,36 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.signatures_cnt = 1; token.signatures_buf[0] = "WPA"; token.sep[0] = '*'; - token.len_min[0] = 3; - token.len_max[0] = 3; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 3; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 2; - token.len_max[1] = 2; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 12; - token.len_max[3] = 12; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 12; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 12; - token.len_max[4] = 12; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 12; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; diff --git a/src/modules/module_22001.c b/src/modules/module_22001.c index 6bd49698d..8bd35cd2b 100644 --- a/src/modules/module_22001.c +++ b/src/modules/module_22001.c @@ -719,24 +719,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.sep[0] = sep; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = sep; - token.len_min[1] = 12; - token.len_max[1] = 12; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 12; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = sep; - token.len_min[2] = 12; - token.len_max[2] = 12; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 12; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = sep; @@ -760,39 +759,36 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.signatures_cnt = 1; token.signatures_buf[0] = "WPA"; token.sep[0] = '*'; - token.len_min[0] = 3; - token.len_max[0] = 3; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 3; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 2; - token.len_max[1] = 2; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 12; - token.len_max[3] = 12; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 12; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 12; - token.len_max[4] = 12; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 12; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; diff --git a/src/modules/module_22100.c b/src/modules/module_22100.c index 67b67ddbe..833eb4a63 100644 --- a/src/modules/module_22100.c +++ b/src/modules/module_22100.c @@ -159,6 +159,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.signatures_cnt = 1; @@ -169,51 +171,43 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 2; - token.len_max[2] = 2; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; - token.len_min[4] = 7; - token.len_max[4] = 7; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 7; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[5] = '$'; - token.len_min[5] = 2; - token.len_max[5] = 2; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 2; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '$'; - token.len_min[6] = 24; - token.len_max[6] = 24; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 24; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '$'; - token.len_min[7] = 2; - token.len_max[7] = 2; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 2; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[8] = '$'; - token.len_min[8] = 120; - token.len_max[8] = 120; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 120; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_22200.c b/src/modules/module_22200.c index 8f1937ab7..6e9141ba8 100644 --- a/src/modules/module_22200.c +++ b/src/modules/module_22200.c @@ -91,6 +91,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; diff --git a/src/modules/module_22300.c b/src/modules/module_22300.c index eced4ebd8..64f33ad4f 100644 --- a/src/modules/module_22300.c +++ b/src/modules/module_22300.c @@ -51,12 +51,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_22301.c b/src/modules/module_22301.c index a22d7e6c7..f75c196dc 100644 --- a/src/modules/module_22301.c +++ b/src/modules/module_22301.c @@ -53,6 +53,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -62,21 +64,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 64; - token.len_max[2] = 64; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_22400.c b/src/modules/module_22400.c index 29efc0a3a..cd373a75d 100644 --- a/src/modules/module_22400.c +++ b/src/modules/module_22400.c @@ -134,6 +134,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -144,33 +146,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 64; - token.len_max[4] = 64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 64; - token.len_max[5] = 64; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_22500.c b/src/modules/module_22500.c index 3dd33067e..534539b4e 100644 --- a/src/modules/module_22500.c +++ b/src/modules/module_22500.c @@ -63,6 +63,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -73,21 +75,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; - token.len_min[2] = 16; - token.len_max[2] = 16; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 16; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_22600.c b/src/modules/module_22600.c index 1178c3e91..236ba6453 100644 --- a/src/modules/module_22600.c +++ b/src/modules/module_22600.c @@ -94,6 +94,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; diff --git a/src/modules/module_22700.c b/src/modules/module_22700.c index 4409ddb29..009b4a280 100644 --- a/src/modules/module_22700.c +++ b/src/modules/module_22700.c @@ -271,6 +271,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -280,22 +282,19 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 32; - token.len_max[2] = 32; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[3] = 32; - token.len_max[3] = 32; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[4] = 32; diff --git a/src/modules/module_22911.c b/src/modules/module_22911.c index 0f76a3793..8beeca76b 100644 --- a/src/modules/module_22911.c +++ b/src/modules/module_22911.c @@ -68,6 +68,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -78,21 +80,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 16; - token.len_max[3] = 16; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; diff --git a/src/modules/module_22921.c b/src/modules/module_22921.c index 54f13a4ee..182c1c6f3 100644 --- a/src/modules/module_22921.c +++ b/src/modules/module_22921.c @@ -69,6 +69,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -79,21 +81,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 16; - token.len_max[3] = 16; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; diff --git a/src/modules/module_22931.c b/src/modules/module_22931.c index d9309918a..5296c58fc 100644 --- a/src/modules/module_22931.c +++ b/src/modules/module_22931.c @@ -68,6 +68,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -78,21 +80,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 2; - token.len_max[2] = 2; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; diff --git a/src/modules/module_22941.c b/src/modules/module_22941.c index ff219aa56..e2b2e8116 100644 --- a/src/modules/module_22941.c +++ b/src/modules/module_22941.c @@ -68,6 +68,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -78,21 +80,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 2; - token.len_max[2] = 2; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; diff --git a/src/modules/module_22951.c b/src/modules/module_22951.c index 84b474740..ad0d95659 100644 --- a/src/modules/module_22951.c +++ b/src/modules/module_22951.c @@ -68,6 +68,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -78,21 +80,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 2; - token.len_max[2] = 2; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; diff --git a/src/modules/module_23001.c b/src/modules/module_23001.c index 18a5e482b..02e4bd62b 100644 --- a/src/modules/module_23001.c +++ b/src/modules/module_23001.c @@ -72,69 +72,62 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 11; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SECUREZIP; - token.len_min[0] = 6; - token.len_max[0] = 6; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 1; - token.len_max[4] = 1; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 1; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[5] = '*'; token.len_min[5] = 0; token.len_max[5] = 32; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 288; - token.len_max[6] = 288; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 288; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[7] = 1; - token.len_max[7] = 1; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 1; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[8] = 1; - token.len_max[8] = 1; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 1; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 1; - token.len_max[9] = 1; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 1; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.len_min[10] = 0; diff --git a/src/modules/module_23002.c b/src/modules/module_23002.c index 1adf4be72..223096535 100644 --- a/src/modules/module_23002.c +++ b/src/modules/module_23002.c @@ -72,74 +72,67 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 11; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SECUREZIP; - token.len_min[0] = 6; - token.len_max[0] = 6; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 1; - token.len_max[4] = 1; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 1; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[5] = '*'; token.len_min[5] = 0; token.len_max[5] = 32; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 288; - token.len_max[6] = 288; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 288; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[7] = 1; - token.len_max[7] = 1; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 1; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[8] = 1; - token.len_max[8] = 1; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 1; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 1; - token.len_max[9] = 1; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 1; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[10] = '*'; token.len_min[10] = 0; token.len_max[10] = 64; - token.sep[10] = '*'; token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_23003.c b/src/modules/module_23003.c index 95542b881..3e1dd0428 100644 --- a/src/modules/module_23003.c +++ b/src/modules/module_23003.c @@ -73,74 +73,67 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 11; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SECUREZIP; - token.len_min[0] = 6; - token.len_max[0] = 6; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 1; - token.len_max[4] = 1; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 1; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[5] = '*'; token.len_min[5] = 0; token.len_max[5] = 32; - token.sep[5] = '*'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 288; - token.len_max[6] = 288; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 288; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[7] = 1; - token.len_max[7] = 1; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 1; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[8] = 1; - token.len_max[8] = 1; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 1; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 1; - token.len_max[9] = 1; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 1; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[10] = '*'; token.len_min[10] = 0; token.len_max[10] = 64; - token.sep[10] = '*'; token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_23100.c b/src/modules/module_23100.c index 4d626f31b..f3057c803 100644 --- a/src/modules/module_23100.c +++ b/src/modules/module_23100.c @@ -95,27 +95,26 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KEYCHAIN; token.sep[0] = '*'; - token.len_min[0] = 10; - token.len_max[0] = 10; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 10; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 40; - token.len_max[1] = 40; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 40; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; - token.len_min[2] = 16; - token.len_max[2] = 16; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 16; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[3] = 96; diff --git a/src/modules/module_23200.c b/src/modules/module_23200.c index d7639d994..bcea54bce 100644 --- a/src/modules/module_23200.c +++ b/src/modules/module_23200.c @@ -77,26 +77,25 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_XMPP; token.sep[0] = '$'; - token.len_min[0] = 0; - token.len_max[0] = 0; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 0; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; token.sep[1] = '$'; - token.len_min[1] = 10; - token.len_max[1] = 10; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 10; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; @@ -118,9 +117,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[6] = '$'; - token.len_min[6] = 40; - token.len_max[6] = 40; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 40; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_23300.c b/src/modules/module_23300.c index ccf052c88..21d03e82c 100644 --- a/src/modules/module_23300.c +++ b/src/modules/module_23300.c @@ -95,6 +95,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; @@ -104,40 +106,36 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '$'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 1; - token.len_max[3] = 1; token.sep[3] = '$'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 1; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '$'; token.len_min[4] = 4; token.len_max[4] = 6; - token.sep[4] = '$'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[5] = '$'; token.len_min[5] = 16; token.len_max[5] = 32; - token.sep[5] = '$'; token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[6] = 32; - token.len_max[6] = 32; token.sep[6] = '$'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[7] = 128; diff --git a/src/modules/module_23400.c b/src/modules/module_23400.c index 6112bb03d..7a0e5fb95 100644 --- a/src/modules/module_23400.c +++ b/src/modules/module_23400.c @@ -110,6 +110,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -120,9 +122,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -143,9 +144,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[5] = '*'; - token.len_min[5] = 44; - token.len_max[5] = 44; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 44; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_23500.c b/src/modules/module_23500.c index e3c9f53bb..4e4220296 100644 --- a/src/modules/module_23500.c +++ b/src/modules/module_23500.c @@ -111,21 +111,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_AXCRYPT2; token.sep[0] = '*'; - token.len_min[0] = 9; - token.len_max[0] = 9; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -135,15 +135,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '*'; - token.len_min[3] = 128; - token.len_max[3] = 128; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 128; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 288; - token.len_max[4] = 288; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 288; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; diff --git a/src/modules/module_23600.c b/src/modules/module_23600.c index 6d67ece13..b94c2530a 100644 --- a/src/modules/module_23600.c +++ b/src/modules/module_23600.c @@ -111,21 +111,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_AXCRYPT2; token.sep[0] = '*'; - token.len_min[0] = 9; - token.len_max[0] = 9; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -135,15 +135,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '*'; - token.len_min[3] = 128; - token.len_max[3] = 128; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 128; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 288; - token.len_max[4] = 288; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 288; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; diff --git a/src/modules/module_23700.c b/src/modules/module_23700.c index 59f3364d0..e8296c575 100644 --- a/src/modules/module_23700.c +++ b/src/modules/module_23700.c @@ -135,33 +135,31 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_RAR3; token.sep[0] = '*'; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; - token.len_min[2] = 16; - token.len_max[2] = 16; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 16; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 8; - token.len_max[3] = 8; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 8; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; @@ -177,9 +175,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '*'; - token.len_min[6] = 1; - token.len_max[6] = 1; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 1; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[7] = '*'; diff --git a/src/modules/module_23800.c b/src/modules/module_23800.c index 9305db990..5f164b084 100644 --- a/src/modules/module_23800.c +++ b/src/modules/module_23800.c @@ -420,33 +420,31 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_RAR3; token.sep[0] = '*'; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; - token.len_min[2] = 16; - token.len_max[2] = 16; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 16; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 8; - token.len_max[3] = 8; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 8; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; @@ -462,9 +460,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '*'; - token.len_min[6] = 1; - token.len_max[6] = 1; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 1; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[7] = '*'; diff --git a/src/modules/module_23900.c b/src/modules/module_23900.c index 15eda1a91..ffc1f2b39 100644 --- a/src/modules/module_23900.c +++ b/src/modules/module_23900.c @@ -89,6 +89,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -98,22 +100,19 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 2; - token.len_max[2] = 2; token.sep[2] = '$'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 2; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[3] = 16; - token.len_max[3] = 16; token.sep[3] = '$'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[4] = 192; diff --git a/src/modules/module_24100.c b/src/modules/module_24100.c index 53bf5e9f0..699fbf7b5 100644 --- a/src/modules/module_24100.c +++ b/src/modules/module_24100.c @@ -96,21 +96,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_MONGODB_SHA1; token.sep[0] = '*'; - token.len_min[0] = 15; - token.len_max[0] = 15; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 15; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -126,9 +126,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '*'; - token.len_min[4] = 24; - token.len_max[4] = 24; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 24; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.len[5] = 28; diff --git a/src/modules/module_24200.c b/src/modules/module_24200.c index 86a6334b4..9457eb4a7 100644 --- a/src/modules/module_24200.c +++ b/src/modules/module_24200.c @@ -127,21 +127,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_MONGODB_SHA256; token.sep[0] = '*'; - token.len_min[0] = 15; - token.len_max[0] = 15; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 15; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -157,9 +157,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '*'; - token.len_min[4] = 40; - token.len_max[4] = 40; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 40; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.len[5] = 44; diff --git a/src/modules/module_24300.c b/src/modules/module_24300.c index c1e66d458..cad17a5b4 100644 --- a/src/modules/module_24300.c +++ b/src/modules/module_24300.c @@ -50,12 +50,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_24410.c b/src/modules/module_24410.c index 4b8ab978f..6e59fd160 100644 --- a/src/modules/module_24410.c +++ b/src/modules/module_24410.c @@ -122,6 +122,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; @@ -132,15 +134,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; diff --git a/src/modules/module_24420.c b/src/modules/module_24420.c index c0aea4c28..90f00ffa0 100644 --- a/src/modules/module_24420.c +++ b/src/modules/module_24420.c @@ -122,6 +122,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; @@ -132,15 +134,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; diff --git a/src/modules/module_24500.c b/src/modules/module_24500.c index a4d60ed31..f95cdbef5 100644 --- a/src/modules/module_24500.c +++ b/src/modules/module_24500.c @@ -96,6 +96,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -106,9 +108,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -118,15 +119,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '*'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = DATA_LEN_TELEGRAM * 2; - token.len_max[4] = DATA_LEN_TELEGRAM * 2; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = DATA_LEN_TELEGRAM * 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_24600.c b/src/modules/module_24600.c index 66d3e6e20..0194cb05e 100644 --- a/src/modules/module_24600.c +++ b/src/modules/module_24600.c @@ -151,21 +151,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SQLCIPHER; token.sep[0] = '*'; - token.len_min[0] = 9; - token.len_max[0] = 9; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -175,21 +175,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 32; - token.len_max[4] = 32; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 32; - token.len_max[5] = 32; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 32; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_24700.c b/src/modules/module_24700.c index 30edc76cd..24b41cf61 100644 --- a/src/modules/module_24700.c +++ b/src/modules/module_24700.c @@ -51,6 +51,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 10; diff --git a/src/modules/module_24800.c b/src/modules/module_24800.c index e25e7841e..fff6a347b 100644 --- a/src/modules/module_24800.c +++ b/src/modules/module_24800.c @@ -49,11 +49,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 28; - token.len_max[0] = 28; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 28; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_24900.c b/src/modules/module_24900.c index ec4c2113c..d3e419861 100644 --- a/src/modules/module_24900.c +++ b/src/modules/module_24900.c @@ -93,11 +93,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 8; - token.len_max[0] = 8; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_25000.c b/src/modules/module_25000.c index 144aef509..69857dac7 100644 --- a/src/modules/module_25000.c +++ b/src/modules/module_25000.c @@ -120,6 +120,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SNMPV3; diff --git a/src/modules/module_25100.c b/src/modules/module_25100.c index be0d0d852..20a97afdc 100644 --- a/src/modules/module_25100.c +++ b/src/modules/module_25100.c @@ -116,6 +116,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SNMPV3; diff --git a/src/modules/module_25200.c b/src/modules/module_25200.c index 1ed4630a4..5f790669d 100644 --- a/src/modules/module_25200.c +++ b/src/modules/module_25200.c @@ -116,6 +116,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SNMPV3; @@ -125,28 +127,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // packet number + token.sep[1] = '$'; token.len_min[1] = 1; token.len_max[1] = 8; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // salt + token.sep[2] = '$'; token.len_min[2] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.len_max[2] = SNMPV3_SALT_MAX * 2; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // engineid + token.sep[3] = '$'; token.len_min[3] = 26; token.len_max[3] = SNMPV3_ENGINEID_MAX; - token.sep[3] = '$'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // digest - token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.sep[4] = '$'; + token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_25300.c b/src/modules/module_25300.c index 801f548f6..d2d56bbd4 100644 --- a/src/modules/module_25300.c +++ b/src/modules/module_25300.c @@ -120,6 +120,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -130,21 +132,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 6; - token.len_max[1] = 6; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 6; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 24; - token.len_max[2] = 24; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 24; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[3] = '$'; - token.len_min[3] = 88; - token.len_max[3] = 88; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 88; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_25400.c b/src/modules/module_25400.c index baad6e6fd..cb5e0db99 100644 --- a/src/modules/module_25400.c +++ b/src/modules/module_25400.c @@ -163,6 +163,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 12; token.signatures_cnt = 1; @@ -172,70 +174,61 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[4] = '*'; token.len_min[4] = 1; token.len_max[4] = 11; - token.sep[4] = '*'; token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[5] = 1; - token.len_max[5] = 1; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[6] = 2; - token.len_max[6] = 2; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 2; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[7] = '*'; token.len_min[7] = 32; token.len_max[7] = 64; - token.sep[7] = '*'; token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[8] = 2; - token.len_max[8] = 2; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 2; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[9] = 64; - token.len_max[9] = 64; token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 64; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[10] = 2; - token.len_max[10] = 2; - token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.sep[10] = '*'; + token.len[10] = 2; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[11] = 64; - token.len_max[11] = 64; - token.sep[11] = '*'; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.sep[11] = '*'; + token.len[11] = 64; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); // was a const, now no longer, as we need it again for the new hashformat @@ -251,83 +244,74 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE input_len = tmp_len; } - token.token_cnt = 13; + token.token_cnt = 13; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_PDF; - token.len[0] = 5; - token.attr[0] = TOKEN_ATTR_FIXED_LENGTH - | TOKEN_ATTR_VERIFY_SIGNATURE; + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[1] = '*'; + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = '*'; + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[3] = 3; - token.len_max[3] = 3; - token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[3] = '*'; + token.len[3] = 3; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 1; - token.len_max[4] = 6; - token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; + token.sep[4] = '*'; + token.len_min[4] = 1; + token.len_max[4] = 6; + token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; - token.len_min[5] = 1; - token.len_max[5] = 1; - token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[5] = '*'; + token.len[5] = 1; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[6] = 2; - token.len_max[6] = 2; - token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[6] = '*'; + token.len[6] = 2; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[7] = 32; - token.len_max[7] = 64; - token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; - - token.len_min[8] = 2; - token.len_max[8] = 2; - token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_DIGIT; - - token.len_min[9] = 64; - token.len_max[9] = 64; - token.sep[9] = '*'; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; - - token.len_min[10] = 2; - token.len_max[10] = 2; - token.sep[10] = '*'; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_DIGIT; - - token.len_min[11] = 64; - token.len_max[11] = 64; - token.sep[11] = '*'; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH + token.sep[7] = '*'; + token.len_min[7] = 32; + token.len_max[7] = 64; + token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; + token.sep[8] = '*'; + token.len[8] = 2; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[9] = '*'; + token.len[9] = 64; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[10] = '*'; + token.len[10] = 2; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[11] = '*'; + token.len[11] = 64; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[12] = '*'; token.len_min[12] = 0; token.len_max[12] = 32; // "truncate the password string to exactly 32 bytes." see "Algorithm 3.2 computing an encryption key" - token.sep[12] = '*'; token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH; rc_tokenizer = input_tokenizer ((const u8 *) input_buf, input_len, &token); diff --git a/src/modules/module_25500.c b/src/modules/module_25500.c index 47355ff26..7d68a8648 100644 --- a/src/modules/module_25500.c +++ b/src/modules/module_25500.c @@ -122,6 +122,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -132,21 +134,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 24; - token.len_max[1] = 24; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 24; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[2] = '$'; - token.len_min[2] = 16; - token.len_max[2] = 16; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 16; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[3] = '$'; - token.len_min[3] = 96; - token.len_max[3] = 96; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 96; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_25600.c b/src/modules/module_25600.c index dde892210..e39224b54 100644 --- a/src/modules/module_25600.c +++ b/src/modules/module_25600.c @@ -171,6 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 4; @@ -183,10 +185,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.len[2] = 22; diff --git a/src/modules/module_25700.c b/src/modules/module_25700.c index 62960a2ff..c6a805dcc 100644 --- a/src/modules/module_25700.c +++ b/src/modules/module_25700.c @@ -62,18 +62,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; - token.len_min[0] = 8; - token.len_max[0] = 8; token.sep[0] = hashconfig->separator; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 8; - token.len_max[1] = 8; token.sep[1] = hashconfig->separator; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 8; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_25800.c b/src/modules/module_25800.c index 6f6023657..9c3189f21 100644 --- a/src/modules/module_25800.c +++ b/src/modules/module_25800.c @@ -171,6 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 4; @@ -183,10 +185,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.len[2] = 22; diff --git a/src/modules/module_25900.c b/src/modules/module_25900.c index ca6f8bc91..b8ce7a24a 100644 --- a/src/modules/module_25900.c +++ b/src/modules/module_25900.c @@ -132,6 +132,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -139,31 +141,27 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // Signature token.sep[0] = '*'; - token.len_min[0] = 42; - token.len_max[0] = 42; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 42; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; // Secure Session Identifier (from SESSION_RESPONSE) token.sep[1] = '*'; - token.len_min[1] = 4; - token.len_max[1] = 4; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 4; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // XOR of Client Public Value X (from SESSION_REQUEST) // and Server Public Value Y (from SESSION_RESPONSE) token.sep[2] = '*'; - token.len_min[2] = 64; - token.len_max[2] = 64; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // Message Authentication Code (from SESSION_RESPONSE) token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_26000.c b/src/modules/module_26000.c index 6a1deccb4..2d7ea5f7b 100644 --- a/src/modules/module_26000.c +++ b/src/modules/module_26000.c @@ -77,6 +77,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 2; @@ -84,33 +86,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.signatures_buf[1] = SIGNATURE_MOZILLA_3DES; token.sep[0] = '*'; - token.len_min[0] = 9; - token.len_max[0] = 9; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 4; - token.len_max[1] = 4; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 4; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[2] = '*'; - token.len_min[2] = 40; - token.len_max[2] = 40; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 40; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 40; - token.len_max[3] = 40; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 40; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; - token.len_min[4] = 32; - token.len_max[4] = 32; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_26100.c b/src/modules/module_26100.c index f7e2dac5a..91a170b44 100644 --- a/src/modules/module_26100.c +++ b/src/modules/module_26100.c @@ -94,6 +94,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 2; @@ -101,27 +103,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.signatures_buf[1] = SIGNATURE_MOZILLA_AES; token.sep[0] = '*'; - token.len_min[0] = 9; - token.len_max[0] = 9; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 3; - token.len_max[1] = 3; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 3; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[2] = '*'; - token.len_min[2] = 40; - token.len_max[2] = 40; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 40; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '*'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '*'; @@ -131,15 +129,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[5] = '*'; - token.len_min[5] = 32; - token.len_max[5] = 32; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 32; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[6] = '*'; - token.len_min[6] = 32; - token.len_max[6] = 32; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_26200.c b/src/modules/module_26200.c index d47e63729..c3696d5fc 100644 --- a/src/modules/module_26200.c +++ b/src/modules/module_26200.c @@ -81,11 +81,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_26300.c b/src/modules/module_26300.c index 2a18f7f4e..0a219af8a 100644 --- a/src/modules/module_26300.c +++ b/src/modules/module_26300.c @@ -54,6 +54,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_26401.c b/src/modules/module_26401.c index d0b4dade8..108fb1697 100644 --- a/src/modules/module_26401.c +++ b/src/modules/module_26401.c @@ -56,17 +56,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_26402.c b/src/modules/module_26402.c index b660feca4..f720ea3e7 100644 --- a/src/modules/module_26402.c +++ b/src/modules/module_26402.c @@ -56,17 +56,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_26403.c b/src/modules/module_26403.c index 4337a46da..7248f4a74 100644 --- a/src/modules/module_26403.c +++ b/src/modules/module_26403.c @@ -56,17 +56,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_26500.c b/src/modules/module_26500.c index 849f94b34..7e766f036 100644 --- a/src/modules/module_26500.c +++ b/src/modules/module_26500.c @@ -94,6 +94,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -104,15 +106,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 40; - token.len_max[2] = 40; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 40; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; @@ -122,9 +122,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '$'; - token.len_min[4] = 80; - token.len_max[4] = 80; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 80; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_26600.c b/src/modules/module_26600.c index 929c37a76..b818d6b8b 100644 --- a/src/modules/module_26600.c +++ b/src/modules/module_26600.c @@ -132,6 +132,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -142,15 +144,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 44; - token.len_max[1] = 44; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 44; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[2] = '$'; - token.len_min[2] = 24; - token.len_max[2] = 24; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 24; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[3] = '$'; diff --git a/src/modules/module_26610.c b/src/modules/module_26610.c index 96ec0a12c..6192bc7e0 100644 --- a/src/modules/module_26610.c +++ b/src/modules/module_26610.c @@ -139,6 +139,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -149,15 +151,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 44; - token.len_max[1] = 44; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 44; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[2] = '$'; - token.len_min[2] = 24; - token.len_max[2] = 24; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 24; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[3] = '$'; diff --git a/src/modules/module_26700.c b/src/modules/module_26700.c index 45a0652eb..050eb196a 100644 --- a/src/modules/module_26700.c +++ b/src/modules/module_26700.c @@ -123,6 +123,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SNMPV3; @@ -132,28 +134,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // packet number + token.sep[1] = '$'; token.len_min[1] = 1; token.len_max[1] = 8; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // salt + token.sep[2] = '$'; token.len_min[2] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.len_max[2] = SNMPV3_SALT_MAX * 2; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // engineid + token.sep[3] = '$'; token.len_min[3] = 26; token.len_max[3] = SNMPV3_ENGINEID_MAX; - token.sep[3] = '$'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // digest - token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.sep[4] = '$'; + token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_26800.c b/src/modules/module_26800.c index 0dc5e25fe..fc43bf17a 100644 --- a/src/modules/module_26800.c +++ b/src/modules/module_26800.c @@ -123,6 +123,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SNMPV3; @@ -132,28 +134,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // packet number + token.sep[1] = '$'; token.len_min[1] = 1; token.len_max[1] = 8; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // salt + token.sep[2] = '$'; token.len_min[2] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.len_max[2] = SNMPV3_SALT_MAX * 2; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // engineid + token.sep[3] = '$'; token.len_min[3] = 26; token.len_max[3] = SNMPV3_ENGINEID_MAX; - token.sep[3] = '$'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // digest - token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.sep[4] = '$'; + token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_26900.c b/src/modules/module_26900.c index 2d724b509..c980a51c1 100644 --- a/src/modules/module_26900.c +++ b/src/modules/module_26900.c @@ -163,6 +163,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SNMPV3; @@ -172,28 +174,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // packet number + token.sep[1] = '$'; token.len_min[1] = 1; token.len_max[1] = 8; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // salt + token.sep[2] = '$'; token.len_min[2] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.len_max[2] = SNMPV3_SALT_MAX * 2; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // engineid + token.sep[3] = '$'; token.len_min[3] = 26; token.len_max[3] = SNMPV3_ENGINEID_MAX; - token.sep[3] = '$'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // digest - token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.sep[4] = '$'; + token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_27000.c b/src/modules/module_27000.c index 0cfb69bcb..c9cca63b4 100644 --- a/src/modules/module_27000.c +++ b/src/modules/module_27000.c @@ -129,45 +129,44 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; // username + token.sep[0] = ':'; token.len_min[0] = 0; token.len_max[0] = 60; - token.sep[0] = ':'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; // unused - token.len_min[1] = 0; - token.len_max[1] = 0; + token.len[1] = 0; token.sep[1] = ':'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; // domain + token.sep[2] = ':'; token.len_min[2] = 0; token.len_max[2] = 45; - token.sep[2] = ':'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; // lm response + token.sep[3] = ':'; token.len_min[3] = 0; token.len_max[3] = 48; - token.sep[3] = ':'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // ntlm response - token.len_min[4] = 48; - token.len_max[4] = 48; token.sep[4] = ':'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 48; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // challenge - token.len_min[5] = 16; - token.len_max[5] = 16; token.sep[5] = ':'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 16; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_27100.c b/src/modules/module_27100.c index d096f903d..84aaa66d8 100644 --- a/src/modules/module_27100.c +++ b/src/modules/module_27100.c @@ -89,38 +89,37 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; // username + token.sep[0] = ':'; token.len_min[0] = 0; token.len_max[0] = 60; - token.sep[0] = ':'; token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; // unused - token.len_min[1] = 0; - token.len_max[1] = 0; token.sep[1] = ':'; + token.len[1] = 0; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; // domain + token.sep[2] = ':'; token.len_min[2] = 0; token.len_max[2] = 45; - token.sep[2] = ':'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; // lm response - token.len_min[3] = 16; - token.len_max[3] = 16; token.sep[3] = ':'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // ntlm response - token.len_min[4] = 32; - token.len_max[4] = 32; token.sep[4] = ':'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // challenge diff --git a/src/modules/module_27200.c b/src/modules/module_27200.c index 6f165a58b..ffa2c6c8b 100644 --- a/src/modules/module_27200.c +++ b/src/modules/module_27200.c @@ -80,17 +80,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 40; - token.len_max[1] = 40; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 40; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_27300.c b/src/modules/module_27300.c index 376082ff1..1512bbbb4 100644 --- a/src/modules/module_27300.c +++ b/src/modules/module_27300.c @@ -163,6 +163,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_SNMPV3; @@ -172,28 +174,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // packet number + token.sep[1] = '$'; token.len_min[1] = 1; token.len_max[1] = 8; - token.sep[1] = '$'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // salt + token.sep[2] = '$'; token.len_min[2] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.len_max[2] = SNMPV3_SALT_MAX * 2; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // engineid + token.sep[3] = '$'; token.len_min[3] = 26; token.len_max[3] = SNMPV3_ENGINEID_MAX; - token.sep[3] = '$'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; // digest - token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.sep[4] = '$'; + token.len[4] = SNMPV3_MSG_AUTH_PARAMS_LEN * 2; token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; diff --git a/src/modules/module_27400.c b/src/modules/module_27400.c index 31183701c..3bd35cff5 100644 --- a/src/modules/module_27400.c +++ b/src/modules/module_27400.c @@ -95,12 +95,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_VMWARE_VMX; - token.sep[0] = '$'; token.len[0] = 7; token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; @@ -112,15 +113,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_27500.c b/src/modules/module_27500.c index 0c5c1e6fa..12d576bff 100644 --- a/src/modules/module_27500.c +++ b/src/modules/module_27500.c @@ -114,12 +114,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_VBOX; - token.sep[0] = '$'; token.len[0] = 8; token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; @@ -131,9 +132,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 64; - token.len_max[2] = 64; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; @@ -143,9 +143,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '$'; - token.len_min[4] = 64; - token.len_max[4] = 64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; @@ -155,15 +154,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '$'; - token.len_min[6] = 64; - token.len_max[6] = 64; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 64; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '$'; - token.len_min[7] = 64; - token.len_max[7] = 64; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 64; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_27600.c b/src/modules/module_27600.c index 971556193..d458cbd8a 100644 --- a/src/modules/module_27600.c +++ b/src/modules/module_27600.c @@ -114,12 +114,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_VBOX; - token.sep[0] = '$'; token.len[0] = 8; token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; @@ -131,9 +132,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 64; - token.len_max[2] = 64; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; @@ -143,9 +143,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[4] = '$'; - token.len_min[4] = 128; - token.len_max[4] = 128; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 128; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; @@ -155,15 +154,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '$'; - token.len_min[6] = 64; - token.len_max[6] = 64; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 64; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '$'; - token.len_min[7] = 64; - token.len_max[7] = 64; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 64; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_27700.c b/src/modules/module_27700.c index da1516233..10ecefe70 100644 --- a/src/modules/module_27700.c +++ b/src/modules/module_27700.c @@ -271,6 +271,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -280,34 +282,31 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = '*'; token.len_min[2] = 1; token.len_max[2] = 10; - token.sep[2] = '*'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[3] = '*'; token.len_min[3] = 1; token.len_max[3] = 2; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 1; - token.len_max[4] = 1; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 1; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[5] = 16; - token.len_max[5] = 16; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 16; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[6] = 64; diff --git a/src/modules/module_27800.c b/src/modules/module_27800.c index 8f69f60ed..4aefff85a 100644 --- a/src/modules/module_27800.c +++ b/src/modules/module_27800.c @@ -62,18 +62,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; - token.len_min[0] = 8; - token.len_max[0] = 8; token.sep[0] = hashconfig->separator; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; - token.len_min[1] = 8; - token.len_max[1] = 8; token.sep[1] = hashconfig->separator; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 8; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_27900.c b/src/modules/module_27900.c index 2e76feace..ea06e0f2c 100644 --- a/src/modules/module_27900.c +++ b/src/modules/module_27900.c @@ -48,18 +48,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 8; - token.len_max[0] = 8; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 8; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = hashconfig->separator; - token.len_min[1] = 8; - token.len_max[1] = 8; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 8; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_28000.c b/src/modules/module_28000.c index c73cb7f6f..653e6dddf 100644 --- a/src/modules/module_28000.c +++ b/src/modules/module_28000.c @@ -64,18 +64,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 16; - token.len_max[0] = 16; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 16; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = hashconfig->separator; - token.len_min[1] = 16; - token.len_max[1] = 16; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_28100.c b/src/modules/module_28100.c index b75dafce0..c315a2c97 100644 --- a/src/modules/module_28100.c +++ b/src/modules/module_28100.c @@ -108,69 +108,62 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_WINHELLO; - token.len_min[0] = 10; - token.len_max[0] = 10; token.sep[0] = '*'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 10; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 6; // fixed SHA512 - token.len_max[1] = 6; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 6; // fixed SHA512 + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; // pbkdf2 iter - token.len_min[2] = 5; // fixed 10000 - token.len_max[2] = 5; token.sep[2] = '*'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 5; // fixed 10000 + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // pbdfk2 salt - token.len_min[3] = 8; - token.len_max[3] = 8; token.sep[3] = '*'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 8; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // sign (hash) - token.len_min[4] = 128; - token.len_max[4] = 128; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 128; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // mk - token.len_min[5] = 128; - token.len_max[5] = 128; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 128; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // hmac - token.len_min[6] = 64; - token.len_max[6] = 64; token.sep[6] = '*'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 64; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // verify blob - token.len_min[7] = 1384; - token.len_max[7] = 1384; token.sep[7] = '*'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 1384; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // magicv - token.len_min[8] = 34; // fixed 785435725a573571565662727670754100 - token.len_max[8] = 34; token.sep[8] = '*'; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 34; // fixed 785435725a573571565662727670754100 + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_28200.c b/src/modules/module_28200.c index af538472a..4eaf61bc6 100644 --- a/src/modules/module_28200.c +++ b/src/modules/module_28200.c @@ -285,57 +285,54 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_EXODUS; - token.len_min[0] = 6; - token.len_max[0] = 6; token.sep[0] = ':'; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; + token.sep[1] = ':'; token.len_min[1] = 1; token.len_max[1] = 6; - token.sep[1] = ':'; token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = ':'; token.len_min[2] = 1; token.len_max[2] = 6; - token.sep[2] = ':'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[3] = ':'; token.len_min[3] = 1; token.len_max[3] = 6; - token.sep[3] = ':'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 44; - token.len_max[4] = 44; token.sep[4] = ':'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 44; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; - token.len_min[5] = 16; - token.len_max[5] = 16; token.sep[5] = ':'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 16; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; - token.len_min[6] = 44; - token.len_max[6] = 44; token.sep[6] = ':'; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 44; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; - token.len_min[7] = 24; - token.len_max[7] = 24; token.sep[7] = ':'; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 24; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_28300.c b/src/modules/module_28300.c index b5c74be75..b820dd9cb 100644 --- a/src/modules/module_28300.c +++ b/src/modules/module_28300.c @@ -51,6 +51,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -60,22 +62,19 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[2] = 28; - token.len_max[2] = 28; token.sep[2] = '$'; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 28; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; - token.len_min[3] = 152; - token.len_max[3] = 152; token.sep[3] = '$'; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 152; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_28400.c b/src/modules/module_28400.c index b003b336c..dbeba6126 100644 --- a/src/modules/module_28400.c +++ b/src/modules/module_28400.c @@ -171,6 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 4; @@ -183,10 +185,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.len[2] = 22; diff --git a/src/modules/module_28501.c b/src/modules/module_28501.c index be173044f..8692e05e6 100644 --- a/src/modules/module_28501.c +++ b/src/modules/module_28501.c @@ -69,6 +69,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len_min[0] = 26; diff --git a/src/modules/module_28502.c b/src/modules/module_28502.c index 2c9fdeae3..daafa9be3 100644 --- a/src/modules/module_28502.c +++ b/src/modules/module_28502.c @@ -69,6 +69,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len_min[0] = 26; diff --git a/src/modules/module_28503.c b/src/modules/module_28503.c index d52cd51ec..696bbf2d8 100644 --- a/src/modules/module_28503.c +++ b/src/modules/module_28503.c @@ -91,6 +91,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_28504.c b/src/modules/module_28504.c index dae2ae67d..93e35784c 100644 --- a/src/modules/module_28504.c +++ b/src/modules/module_28504.c @@ -91,6 +91,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_28505.c b/src/modules/module_28505.c index 49db31745..133bf1e43 100644 --- a/src/modules/module_28505.c +++ b/src/modules/module_28505.c @@ -69,6 +69,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 34; diff --git a/src/modules/module_28506.c b/src/modules/module_28506.c index 35b378088..296122758 100644 --- a/src/modules/module_28506.c +++ b/src/modules/module_28506.c @@ -69,6 +69,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 34; diff --git a/src/modules/module_28600.c b/src/modules/module_28600.c index 48058649c..e152e8dc8 100644 --- a/src/modules/module_28600.c +++ b/src/modules/module_28600.c @@ -133,15 +133,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_POSTGRES_SHA256; token.sep[0] = '$'; - token.len_min[0] = 13; - token.len_max[0] = 13; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 13; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = ':'; @@ -157,9 +158,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_BASE64A; token.sep[3] = ':'; - token.len_min[3] = 44; - token.len_max[3] = 44; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 44; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.len[4] = 44; diff --git a/src/modules/module_28700.c b/src/modules/module_28700.c index 4c956f230..e86ccb448 100644 --- a/src/modules/module_28700.c +++ b/src/modules/module_28700.c @@ -97,6 +97,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_AWS_SIG_V4; @@ -106,35 +108,32 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; // longdate - token.len_min[1] = 16; - token.len_max[1] = 16; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; + token.len[1] = 16; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH; // region + token.sep[2] = '$'; token.len_min[2] = 1; token.len_max[2] = 16; - token.sep[2] = '$'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; // service + token.sep[3] = '$'; token.len_min[3] = 1; token.len_max[3] = 16; - token.sep[3] = '$'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH; // canonical - token.len_min[4] = 32 * 2; - token.len_max[4] = 32 * 2; token.sep[4] = '$'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32 * 2; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // digest - token.len_min[5] = 32 * 2; - token.len_max[5] = 32 * 2; token.sep[5] = '$'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 32 * 2; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_28800.c b/src/modules/module_28800.c index 98a8baeab..d34c860e5 100644 --- a/src/modules/module_28800.c +++ b/src/modules/module_28800.c @@ -99,6 +99,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KRB5DB; @@ -134,10 +136,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[3] = '$'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; } // assume $krb5db$17$user$realm$*spn*$hash else @@ -167,10 +168,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[3] = TOKEN_ATTR_FIXED_LENGTH; token.sep[4] = '$'; - token.len_min[4] = 32; - token.len_max[4] = 32; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH - | TOKEN_ATTR_VERIFY_HEX; + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_HEX; is_spn_provided = 1; } diff --git a/src/modules/module_28900.c b/src/modules/module_28900.c index 10c2ae4ab..929e09a04 100644 --- a/src/modules/module_28900.c +++ b/src/modules/module_28900.c @@ -99,6 +99,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KRB5DB; @@ -134,9 +136,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[3] = '$'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; } @@ -168,9 +169,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[3] = TOKEN_ATTR_FIXED_LENGTH; token.sep[4] = '$'; - token.len_min[4] = 64; - token.len_max[4] = 64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; is_spn_provided = 1; diff --git a/src/modules/module_29000.c b/src/modules/module_29000.c index b1a1f4698..175d2c0a5 100644 --- a/src/modules/module_29000.c +++ b/src/modules/module_29000.c @@ -74,12 +74,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.sep[0] = hashconfig->separator; - token.len_min[0] = 40; - token.len_max[0] = 40; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 40; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = hashconfig->separator; diff --git a/src/modules/module_29100.c b/src/modules/module_29100.c index 5d2227f41..b0db0f42f 100644 --- a/src/modules/module_29100.c +++ b/src/modules/module_29100.c @@ -58,6 +58,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.sep[0] = '.'; diff --git a/src/modules/module_29200.c b/src/modules/module_29200.c index 245e25d44..9a9d95c03 100644 --- a/src/modules/module_29200.c +++ b/src/modules/module_29200.c @@ -79,6 +79,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_RADMIN3; @@ -95,9 +97,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // SHA1 salt token.sep[2] = '*'; - token.len_min[2] = 64; - token.len_max[2] = 64; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // verifier diff --git a/src/modules/module_29311.c b/src/modules/module_29311.c index 78bc26ca6..b6603ad73 100644 --- a/src/modules/module_29311.c +++ b/src/modules/module_29311.c @@ -125,6 +125,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -135,15 +137,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29312.c b/src/modules/module_29312.c index 1ee66f9a7..6d8bfe643 100644 --- a/src/modules/module_29312.c +++ b/src/modules/module_29312.c @@ -125,6 +125,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -135,15 +137,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29313.c b/src/modules/module_29313.c index a0f8032f8..064ef2c46 100644 --- a/src/modules/module_29313.c +++ b/src/modules/module_29313.c @@ -125,6 +125,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -135,15 +137,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29321.c b/src/modules/module_29321.c index cad92dfd1..c443ce2a3 100644 --- a/src/modules/module_29321.c +++ b/src/modules/module_29321.c @@ -126,6 +126,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -136,15 +138,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29322.c b/src/modules/module_29322.c index 5adaccc95..0dad95126 100644 --- a/src/modules/module_29322.c +++ b/src/modules/module_29322.c @@ -126,6 +126,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -136,15 +138,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29323.c b/src/modules/module_29323.c index a20b7167b..1186809af 100644 --- a/src/modules/module_29323.c +++ b/src/modules/module_29323.c @@ -126,6 +126,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -136,15 +138,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29331.c b/src/modules/module_29331.c index b5b198a57..00f89b10c 100644 --- a/src/modules/module_29331.c +++ b/src/modules/module_29331.c @@ -111,6 +111,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -121,15 +123,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29332.c b/src/modules/module_29332.c index 03154bcf0..aea7fb0a5 100644 --- a/src/modules/module_29332.c +++ b/src/modules/module_29332.c @@ -111,6 +111,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -121,15 +123,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29333.c b/src/modules/module_29333.c index adab22650..cd3c4ac05 100644 --- a/src/modules/module_29333.c +++ b/src/modules/module_29333.c @@ -111,6 +111,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -121,15 +123,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29341.c b/src/modules/module_29341.c index 873c646c2..01e0947aa 100644 --- a/src/modules/module_29341.c +++ b/src/modules/module_29341.c @@ -138,6 +138,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -148,15 +150,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29342.c b/src/modules/module_29342.c index 465e3a52a..cf6f6abf2 100644 --- a/src/modules/module_29342.c +++ b/src/modules/module_29342.c @@ -138,6 +138,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -148,15 +150,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29343.c b/src/modules/module_29343.c index 2eb1dbbf0..6ed61b839 100644 --- a/src/modules/module_29343.c +++ b/src/modules/module_29343.c @@ -138,6 +138,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -148,15 +150,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = TC_SALT_HEX_LEN; - token.len_max[1] = TC_SALT_HEX_LEN; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = TC_SALT_HEX_LEN; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = TC_DATA_HEX_LEN; - token.len_max[2] = TC_DATA_HEX_LEN; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = TC_DATA_HEX_LEN; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29411.c b/src/modules/module_29411.c index 7c5063bf5..e0695a5a0 100644 --- a/src/modules/module_29411.c +++ b/src/modules/module_29411.c @@ -153,6 +153,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -163,15 +165,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29412.c b/src/modules/module_29412.c index ca95614b2..cf5e403b8 100644 --- a/src/modules/module_29412.c +++ b/src/modules/module_29412.c @@ -153,6 +153,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -163,15 +165,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29413.c b/src/modules/module_29413.c index d96acbe4a..f8ea19758 100644 --- a/src/modules/module_29413.c +++ b/src/modules/module_29413.c @@ -153,6 +153,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -163,15 +165,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29421.c b/src/modules/module_29421.c index 25c39d811..69d86b307 100644 --- a/src/modules/module_29421.c +++ b/src/modules/module_29421.c @@ -163,6 +163,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -173,15 +175,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29422.c b/src/modules/module_29422.c index 202fbb1b6..8099b8998 100644 --- a/src/modules/module_29422.c +++ b/src/modules/module_29422.c @@ -163,6 +163,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -173,15 +175,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29423.c b/src/modules/module_29423.c index a4f586d09..afaa1b147 100644 --- a/src/modules/module_29423.c +++ b/src/modules/module_29423.c @@ -163,6 +163,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -173,15 +175,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29431.c b/src/modules/module_29431.c index 05efeee6e..a48035fc5 100644 --- a/src/modules/module_29431.c +++ b/src/modules/module_29431.c @@ -140,6 +140,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -150,15 +152,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29432.c b/src/modules/module_29432.c index 44cdac43d..a3ace917a 100644 --- a/src/modules/module_29432.c +++ b/src/modules/module_29432.c @@ -140,6 +140,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -150,15 +152,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29433.c b/src/modules/module_29433.c index 2970869b8..9ea966525 100644 --- a/src/modules/module_29433.c +++ b/src/modules/module_29433.c @@ -154,6 +154,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -164,15 +166,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29441.c b/src/modules/module_29441.c index e3e9e95c9..65a34b8c3 100644 --- a/src/modules/module_29441.c +++ b/src/modules/module_29441.c @@ -155,6 +155,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -165,15 +167,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29442.c b/src/modules/module_29442.c index aece9619e..2e688d499 100644 --- a/src/modules/module_29442.c +++ b/src/modules/module_29442.c @@ -155,6 +155,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -165,15 +167,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29443.c b/src/modules/module_29443.c index dcda52155..124bac2e6 100644 --- a/src/modules/module_29443.c +++ b/src/modules/module_29443.c @@ -155,6 +155,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -165,15 +167,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29451.c b/src/modules/module_29451.c index 0cee1aac1..e2cfc368c 100644 --- a/src/modules/module_29451.c +++ b/src/modules/module_29451.c @@ -172,6 +172,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -182,15 +184,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29452.c b/src/modules/module_29452.c index 61c3d7aba..39c826da1 100644 --- a/src/modules/module_29452.c +++ b/src/modules/module_29452.c @@ -172,6 +172,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -182,15 +184,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29453.c b/src/modules/module_29453.c index 5d102ac56..e5bbe5d9e 100644 --- a/src/modules/module_29453.c +++ b/src/modules/module_29453.c @@ -172,6 +172,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -182,15 +184,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29461.c b/src/modules/module_29461.c index 9bc7f7dd7..0489a8e6b 100644 --- a/src/modules/module_29461.c +++ b/src/modules/module_29461.c @@ -174,6 +174,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -184,15 +186,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29462.c b/src/modules/module_29462.c index 28f2194f8..329eee24b 100644 --- a/src/modules/module_29462.c +++ b/src/modules/module_29462.c @@ -174,6 +174,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -184,15 +186,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29463.c b/src/modules/module_29463.c index 2726ab426..2b61a3e43 100644 --- a/src/modules/module_29463.c +++ b/src/modules/module_29463.c @@ -174,6 +174,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -184,15 +186,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29471.c b/src/modules/module_29471.c index 9590b080c..2fa8e247d 100644 --- a/src/modules/module_29471.c +++ b/src/modules/module_29471.c @@ -163,6 +163,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -173,15 +175,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29472.c b/src/modules/module_29472.c index 241788a69..7fc95a2d9 100644 --- a/src/modules/module_29472.c +++ b/src/modules/module_29472.c @@ -163,6 +163,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -173,15 +175,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29473.c b/src/modules/module_29473.c index 67c180f78..1b8a7d6e4 100644 --- a/src/modules/module_29473.c +++ b/src/modules/module_29473.c @@ -169,6 +169,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -179,15 +181,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29481.c b/src/modules/module_29481.c index 71a3e078c..3cf55a275 100644 --- a/src/modules/module_29481.c +++ b/src/modules/module_29481.c @@ -165,6 +165,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -175,15 +177,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29482.c b/src/modules/module_29482.c index 137350cbe..aece087db 100644 --- a/src/modules/module_29482.c +++ b/src/modules/module_29482.c @@ -165,6 +165,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -175,15 +177,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29483.c b/src/modules/module_29483.c index b3de3bc24..d958e5424 100644 --- a/src/modules/module_29483.c +++ b/src/modules/module_29483.c @@ -165,6 +165,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -175,15 +177,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 896; - token.len_max[2] = 896; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 896; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29511.c b/src/modules/module_29511.c index e2b098ba7..673f1833c 100644 --- a/src/modules/module_29511.c +++ b/src/modules/module_29511.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29512.c b/src/modules/module_29512.c index 8db821145..0079abd74 100644 --- a/src/modules/module_29512.c +++ b/src/modules/module_29512.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29513.c b/src/modules/module_29513.c index 61e6c6a46..20fb7620b 100644 --- a/src/modules/module_29513.c +++ b/src/modules/module_29513.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29521.c b/src/modules/module_29521.c index 5a1bb3320..43ba8a537 100644 --- a/src/modules/module_29521.c +++ b/src/modules/module_29521.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29522.c b/src/modules/module_29522.c index e424d3c66..cc940ef1b 100644 --- a/src/modules/module_29522.c +++ b/src/modules/module_29522.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29523.c b/src/modules/module_29523.c index 0a6a7705b..7d7c17ae9 100644 --- a/src/modules/module_29523.c +++ b/src/modules/module_29523.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29531.c b/src/modules/module_29531.c index 2fd82133e..bc175f9b0 100644 --- a/src/modules/module_29531.c +++ b/src/modules/module_29531.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29532.c b/src/modules/module_29532.c index 3ebdb3fcb..fc864498b 100644 --- a/src/modules/module_29532.c +++ b/src/modules/module_29532.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29533.c b/src/modules/module_29533.c index ef52bafba..a21a581ea 100644 --- a/src/modules/module_29533.c +++ b/src/modules/module_29533.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29541.c b/src/modules/module_29541.c index 9bab26aed..4f9d02309 100644 --- a/src/modules/module_29541.c +++ b/src/modules/module_29541.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29542.c b/src/modules/module_29542.c index 08bf7e871..397e70c92 100644 --- a/src/modules/module_29542.c +++ b/src/modules/module_29542.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29543.c b/src/modules/module_29543.c index 9c77dacc5..4dd2e82f8 100644 --- a/src/modules/module_29543.c +++ b/src/modules/module_29543.c @@ -151,6 +151,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -169,9 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // key size token.sep[2] = '$'; - token.len_min[2] = 3; - token.len_max[2] = 3; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 3; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; // iter @@ -183,9 +184,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // salt token.sep[4] = '$'; - token.len_min[4] = LUKS_SALT_HEX_LEN; - token.len_max[4] = LUKS_SALT_HEX_LEN; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = LUKS_SALT_HEX_LEN; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; // af @@ -197,9 +197,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE // ct token.sep[6] = '$'; - token.len_min[6] = LUKS_CT_HEX_LEN; - token.len_max[6] = LUKS_CT_HEX_LEN; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = LUKS_CT_HEX_LEN; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29600.c b/src/modules/module_29600.c index 9d7eb86f9..e05edcd63 100644 --- a/src/modules/module_29600.c +++ b/src/modules/module_29600.c @@ -109,6 +109,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; // salt diff --git a/src/modules/module_29700.c b/src/modules/module_29700.c index 50c36de3e..857076ab4 100644 --- a/src/modules/module_29700.c +++ b/src/modules/module_29700.c @@ -122,19 +122,19 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_KEEPASS; token.sep[0] = '*'; - token.len_min[0] = 9; - token.len_max[0] = 9; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '*'; @@ -158,33 +158,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 11; token.sep[4] = '*'; - token.len_min[4] = 32; - token.len_max[4] = 32; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 32; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 64; - token.len_max[5] = 64; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[6] = '*'; - token.len_min[6] = 32; - token.len_max[6] = 32; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '*'; - token.len_min[7] = 64; - token.len_max[7] = 64; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 64; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[8] = '*'; - token.len_min[8] = 1; - token.len_max[8] = 1; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 1; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[9] = '*'; @@ -204,21 +199,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 14; token.sep[11] = '*'; - token.len_min[11] = 1; - token.len_max[11] = 1; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH + token.len[11] = 1; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[12] = '*'; - token.len_min[12] = 2; - token.len_max[12] = 2; - token.attr[12] = TOKEN_ATTR_VERIFY_LENGTH + token.len[12] = 2; + token.attr[12] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[13] = '*'; - token.len_min[13] = 64; - token.len_max[13] = 64; - token.attr[13] = TOKEN_ATTR_VERIFY_LENGTH + token.len[13] = 64; + token.attr[13] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; } } @@ -227,33 +219,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 9; token.sep[4] = '*'; - token.len_min[4] = 64; - token.len_max[4] = 64; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 64; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '*'; - token.len_min[5] = 64; - token.len_max[5] = 64; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 64; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[6] = '*'; - token.len_min[6] = 32; - token.len_max[6] = 32; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 32; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '*'; - token.len_min[7] = 64; - token.len_max[7] = 64; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 64; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[8] = '*'; - token.len_min[8] = 64; - token.len_max[8] = 64; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 64; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; if (is_keyfile_present == true) @@ -261,21 +248,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.token_cnt = 12; token.sep[9] = '*'; - token.len_min[9] = 1; - token.len_max[9] = 1; - token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + token.len[9] = 1; + token.attr[9] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[10] = '*'; - token.len_min[10] = 2; - token.len_max[10] = 2; - token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + token.len[10] = 2; + token.attr[10] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[11] = '*'; - token.len_min[11] = 64; - token.len_max[11] = 64; - token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH + token.len[11] = 64; + token.attr[11] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; } } diff --git a/src/modules/module_29800.c b/src/modules/module_29800.c index 653587030..364076c45 100644 --- a/src/modules/module_29800.c +++ b/src/modules/module_29800.c @@ -278,6 +278,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 7; token.signatures_cnt = 1; @@ -287,34 +289,31 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 1; - token.len_max[1] = 1; token.sep[1] = '*'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[2] = '*'; token.len_min[2] = 1; token.len_max[2] = 10; - token.sep[2] = '*'; token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; + token.sep[3] = '*'; token.len_min[3] = 1; token.len_max[3] = 2; - token.sep[3] = '*'; token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[4] = 1; - token.len_max[4] = 1; token.sep[4] = '*'; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 1; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; - token.len_min[5] = 16; - token.len_max[5] = 16; token.sep[5] = '*'; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 16; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len[6] = 64; diff --git a/src/modules/module_29910.c b/src/modules/module_29910.c index 0960c3cb2..23ed260c7 100644 --- a/src/modules/module_29910.c +++ b/src/modules/module_29910.c @@ -92,6 +92,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; @@ -102,39 +104,33 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 16; - token.len_max[3] = 16; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; - token.len_min[4] = 16; - token.len_max[4] = 16; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 16; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; - token.len_min[5] = 2; - token.len_max[5] = 2; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 2; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '$'; - token.len_min[6] = 64; - token.len_max[6] = 64; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 64; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '$'; diff --git a/src/modules/module_29920.c b/src/modules/module_29920.c index e73dc1268..bb433b090 100644 --- a/src/modules/module_29920.c +++ b/src/modules/module_29920.c @@ -92,6 +92,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 9; token.signatures_cnt = 1; @@ -102,39 +104,33 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 16; - token.len_max[3] = 16; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; - token.len_min[4] = 16; - token.len_max[4] = 16; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 16; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; - token.len_min[5] = 2; - token.len_max[5] = 2; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 2; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[6] = '$'; - token.len_min[6] = 64; - token.len_max[6] = 64; - token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + token.len[6] = 64; + token.attr[6] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '$'; @@ -144,9 +140,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[8] = '$'; - token.len_min[8] = 256; - token.len_max[8] = 256; - token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + token.len[8] = 256; + token.attr[8] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29930.c b/src/modules/module_29930.c index f436d64f4..bf467b029 100644 --- a/src/modules/module_29930.c +++ b/src/modules/module_29930.c @@ -87,6 +87,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 5; token.signatures_cnt = 1; @@ -97,27 +99,23 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 16; - token.len_max[3] = 16; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; - token.len_min[4] = 16; - token.len_max[4] = 16; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 16; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_29940.c b/src/modules/module_29940.c index 02d6ec047..5cdca974e 100644 --- a/src/modules/module_29940.c +++ b/src/modules/module_29940.c @@ -87,6 +87,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 6; token.signatures_cnt = 1; @@ -97,33 +99,28 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 1; - token.len_max[1] = 1; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 1; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[2] = '$'; - token.len_min[2] = 1; - token.len_max[2] = 1; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 1; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '$'; - token.len_min[3] = 16; - token.len_max[3] = 16; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 16; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; - token.len_min[4] = 16; - token.len_max[4] = 16; - token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + token.len[4] = 16; + token.attr[4] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[5] = '$'; - token.len_min[5] = 256; - token.len_max[5] = 256; - token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + token.len[5] = 256; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_30000.c b/src/modules/module_30000.c index 0c9cd8c6d..2a3fd4704 100644 --- a/src/modules/module_30000.c +++ b/src/modules/module_30000.c @@ -53,15 +53,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_WERKZEUG_MD5; token.sep[0] = '$'; - token.len_min[0] = 3; - token.len_max[0] = 3; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 3; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; @@ -70,9 +71,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[2] = '$'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; if (hashconfig->opts_type & OPTS_TYPE_ST_HEX) diff --git a/src/modules/module_30120.c b/src/modules/module_30120.c index 15d602fa9..f17570333 100644 --- a/src/modules/module_30120.c +++ b/src/modules/module_30120.c @@ -84,15 +84,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_WERKZEUG_SHA256; token.sep[0] = '$'; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; @@ -101,9 +102,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[2] = '$'; - token.len_min[2] = 64; - token.len_max[2] = 64; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; if (hashconfig->opts_type & OPTS_TYPE_ST_HEX) diff --git a/src/modules/module_30420.c b/src/modules/module_30420.c index 64237bdab..8074d3412 100644 --- a/src/modules/module_30420.c +++ b/src/modules/module_30420.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 56; - token.len_max[0] = 56; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 56; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_30500.c b/src/modules/module_30500.c index f9d0a6342..e68921944 100644 --- a/src/modules/module_30500.c +++ b/src/modules/module_30500.c @@ -80,12 +80,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.len_min[1] = SALT_MIN; diff --git a/src/modules/module_30600.c b/src/modules/module_30600.c index 5172ffecf..713fa6f64 100644 --- a/src/modules/module_30600.c +++ b/src/modules/module_30600.c @@ -171,6 +171,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 4; @@ -183,10 +185,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; - token.len_min[1] = 2; - token.len_max[1] = 2; token.sep[1] = '$'; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 2; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_DIGIT; token.len[2] = 22; diff --git a/src/modules/module_30700.c b/src/modules/module_30700.c index 953ed21da..b078dc447 100644 --- a/src/modules/module_30700.c +++ b/src/modules/module_30700.c @@ -56,27 +56,26 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_ANOPE; token.sep[0] = ':'; - token.len_min[0] = 6; - token.len_max[0] = 6; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 6; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = ':'; - token.len_min[1] = 64; - token.len_max[1] = 64; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 64; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = ':'; - token.len_min[2] = 64; - token.len_max[2] = 64; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_30901.c b/src/modules/module_30901.c index 0422f4f20..3d60c3d90 100644 --- a/src/modules/module_30901.c +++ b/src/modules/module_30901.c @@ -74,6 +74,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len_min[0] = 26; diff --git a/src/modules/module_30902.c b/src/modules/module_30902.c index 3a765943b..984496707 100644 --- a/src/modules/module_30902.c +++ b/src/modules/module_30902.c @@ -75,6 +75,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len_min[0] = 26; diff --git a/src/modules/module_30903.c b/src/modules/module_30903.c index 1d179a527..3bcdad5af 100644 --- a/src/modules/module_30903.c +++ b/src/modules/module_30903.c @@ -97,6 +97,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_30904.c b/src/modules/module_30904.c index 27add2ea6..a3c9f2abe 100644 --- a/src/modules/module_30904.c +++ b/src/modules/module_30904.c @@ -97,6 +97,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_30905.c b/src/modules/module_30905.c index 5f8297f20..e3e9b7d55 100644 --- a/src/modules/module_30905.c +++ b/src/modules/module_30905.c @@ -75,6 +75,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 34; diff --git a/src/modules/module_30906.c b/src/modules/module_30906.c index fce7b67e7..1be061fad 100644 --- a/src/modules/module_30906.c +++ b/src/modules/module_30906.c @@ -75,6 +75,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len[0] = 34; diff --git a/src/modules/module_31000.c b/src/modules/module_31000.c index b6b9a330c..b7a3c2208 100644 --- a/src/modules/module_31000.c +++ b/src/modules/module_31000.c @@ -51,6 +51,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t * hashconfig, MAYBE_UNUS hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_31100.c b/src/modules/module_31100.c index 008f84d4c..8db92fb91 100644 --- a/src/modules/module_31100.c +++ b/src/modules/module_31100.c @@ -54,11 +54,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; - token.len_min[0] = 64; - token.len_max[0] = 64; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 64; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_31200.c b/src/modules/module_31200.c index 32c1a181a..50bc5405e 100644 --- a/src/modules/module_31200.c +++ b/src/modules/module_31200.c @@ -81,21 +81,21 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; token.signatures_buf[0] = SIGNATURE_VEEAM_VBK; token.sep[0] = '*'; - token.len_min[0] = 5; - token.len_max[0] = 5; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '*'; - token.len_min[1] = 128; - token.len_max[1] = 128; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 128; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '*'; @@ -105,9 +105,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_DIGIT; token.sep[3] = '*'; - token.len_min[3] = 32; - token.len_max[3] = 32; - token.attr[3] = TOKEN_ATTR_VERIFY_HEX + token.len[3] = 32; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_31300.c b/src/modules/module_31300.c index 731c34e43..ae4130837 100644 --- a/src/modules/module_31300.c +++ b/src/modules/module_31300.c @@ -52,6 +52,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.signatures_cnt = 1; @@ -62,15 +64,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 32; - token.len_max[1] = 32; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 32; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[2] = '$'; - token.len_min[2] = 96; - token.len_max[2] = 96; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 96; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_31400.c b/src/modules/module_31400.c index fb1b6e03a..bcc8654bb 100644 --- a/src/modules/module_31400.c +++ b/src/modules/module_31400.c @@ -74,6 +74,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 2; token.signatures_cnt = 1; diff --git a/src/modules/module_31700.c b/src/modules/module_31700.c index df52e64ab..a99bdc663 100644 --- a/src/modules/module_31700.c +++ b/src/modules/module_31700.c @@ -69,12 +69,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 3; token.sep[0] = hashconfig->separator; - token.len_min[0] = 32; - token.len_max[0] = 32; - token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + token.len[0] = 32; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[1] = hashconfig->separator; diff --git a/src/modules/module_31800.c b/src/modules/module_31800.c index e8d5cf375..e1dfa3b04 100644 --- a/src/modules/module_31800.c +++ b/src/modules/module_31800.c @@ -135,6 +135,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 8; token.signatures_cnt = 1; @@ -150,15 +152,13 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH; token.sep[2] = '$'; - token.len_min[2] = 64; - token.len_max[2] = 64; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 64; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; - token.len_min[3] = 64; - token.len_max[3] = 64; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 64; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[4] = '$'; @@ -180,9 +180,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.sep[7] = '$'; - token.len_min[7] = 32; - token.len_max[7] = 32; - token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + token.len[7] = 32; + token.attr[7] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); diff --git a/src/modules/module_99999.c b/src/modules/module_99999.c index f09d550d7..6189d4aea 100644 --- a/src/modules/module_99999.c +++ b/src/modules/module_99999.c @@ -65,6 +65,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 1; token.len_min[0] = 1; diff --git a/src/shared.c b/src/shared.c index 7110c91ac..b2b543a24 100644 --- a/src/shared.c +++ b/src/shared.c @@ -1153,6 +1153,13 @@ int input_tokenizer (const u8 *input_buf, const int input_len, hc_token_t *token token->buf[token_idx + 1] = token->buf[token_idx] + len; len_left -= len; + + if (token->sep[token_idx] != 0) + { + token->buf[token_idx + 1]++; // +1 = separator + + len_left--; // -1 = separator + } } else {