From daaf5d365c0cc1ed1564cf41683cd66d45a4c07a Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Thu, 2 Jan 2020 10:41:22 +0100 Subject: [PATCH] Use * in potfile entries for -m 22000 and -m 22001 --- src/modules/module_22000.c | 6 +++--- src/modules/module_22001.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/module_22000.c b/src/modules/module_22000.c index 173c3f377..1942303f8 100644 --- a/src/modules/module_22000.c +++ b/src/modules/module_22000.c @@ -327,7 +327,7 @@ int module_hash_decode_potfile (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY // essid - char *sep_pos = strrchr (line_buf, ':'); + char *sep_pos = strrchr (line_buf, '*'); if (sep_pos == NULL) return (PARSER_SEPARATOR_UNMATCHED); @@ -358,7 +358,7 @@ int module_hash_encode_potfile (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY tmp_buf[tmp_len] = 0; - const int line_len = snprintf (line_buf, line_size, "%08x%08x%08x%08x%08x%08x%08x%08x:%s", + const int line_len = snprintf (line_buf, line_size, "%08x%08x%08x%08x%08x%08x%08x%08x*%s", wpa_pbkdf2_tmp->out[0], wpa_pbkdf2_tmp->out[1], wpa_pbkdf2_tmp->out[2], @@ -1193,7 +1193,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE const u8 *mac_ap = (const u8 *) wpa->mac_ap; const u8 *mac_sta = (const u8 *) wpa->mac_sta; - if (need_hexify ((const u8 *) wpa->essid_buf, wpa->essid_len, ':', 0) == true) + if (need_hexify ((const u8 *) wpa->essid_buf, wpa->essid_len, '*', 0) == true) { char tmp_buf[128]; diff --git a/src/modules/module_22001.c b/src/modules/module_22001.c index dc37532d1..446d710f4 100644 --- a/src/modules/module_22001.c +++ b/src/modules/module_22001.c @@ -328,7 +328,7 @@ int module_hash_decode_potfile (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY // essid - char *sep_pos = strrchr (line_buf, ':'); + char *sep_pos = strrchr (line_buf, '*'); if (sep_pos == NULL) return (PARSER_SEPARATOR_UNMATCHED); @@ -1194,7 +1194,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE const u8 *mac_ap = (const u8 *) wpa->mac_ap; const u8 *mac_sta = (const u8 *) wpa->mac_sta; - if (need_hexify ((const u8 *) wpa->essid_buf, wpa->essid_len, ':', 0) == true) + if (need_hexify ((const u8 *) wpa->essid_buf, wpa->essid_len, '*', 0) == true) { char tmp_buf[128];