From 07c748e1366c6c6e4678ea95682c474615c2815a Mon Sep 17 00:00:00 2001 From: philsmd Date: Wed, 22 Mar 2017 12:09:15 +0100 Subject: [PATCH] fixes #1199: introduce special bit (8) in message_pair (HCCAPX) to indicate if replay counter match --- docs/changes.txt | 1 + src/interface.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 2a55f27cb..564f299d4 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -6,6 +6,7 @@ - WPA cracking: Added support for WPA/WPA2 handshake AP nonce automatic error correction - WPA cracking: Added parameter --nonce-error-corrections to configure range of error correction +- WPA cracking: Added support for a special bit (bit 8) of the message_pair that indicates if replay counters did match - Added visual indicator to the status screen to indicate if the checkpoint quit feature is enabled ## diff --git a/src/interface.c b/src/interface.c index bc76bcc74..d2b416ac0 100644 --- a/src/interface.c +++ b/src/interface.c @@ -2785,6 +2785,8 @@ int wpa_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED memcpy (wpa->orig_nonce_ap, in.nonce_ap, 32); memcpy (wpa->orig_nonce_sta, in.nonce_sta, 32); + in.message_pair &= 0x7f; // ignore the highest bit (it is used to indicate if the replay counters did match) + if (wpa->message_pair_chgd == true) { if (wpa->message_pair != in.message_pair) return (PARSER_HCCAPX_MESSAGE_PAIR);