From 176ca73664cb6f1be0eed4a2cb42cf3389842998 Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 15 Feb 2024 19:44:38 +0100 Subject: [PATCH] added better m4 detection to make sure hcxdumptool stops only if a complete 4way handshake has been received --- hcxdumptool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hcxdumptool.c b/hcxdumptool.c index 6370001e7..195cafef5 100644 --- a/hcxdumptool.c +++ b/hcxdumptool.c @@ -1881,7 +1881,7 @@ if((authseqakt.status & AP_EAPOL_M3) == AP_EAPOL_M3) { if(memcmp(&authseqakt.macap, macfrx->addr1, ETH_ALEN) == 0) { - if(authseqakt.replaycountm3 == authseqakt.replaycountm4) + if((authseqakt.replaycountm1 == (authseqakt.replaycountm4 -1)) && (authseqakt.replaycountm2 == (authseqakt.replaycountm4 -1)) && (authseqakt.replaycountm3 == authseqakt.replaycountm4)) { authseqakt.kdv4 = kdv; if(authseqakt.kdv3 == kdv) @@ -1920,7 +1920,7 @@ if((authseqakt.status & AP_EAPOL_M2) == AP_EAPOL_M2) { if(memcmp(&authseqakt.macap, macfrx->addr2, ETH_ALEN) == 0) { - if(authseqakt.replaycountm2 == (__hcx64be(wpakey->replaycount) - 1)) + if(authseqakt.replaycountm2 == (authseqakt.replaycountm3 - 1)) { authseqakt.kdv3 = kdv; if(authseqakt.kdv2 == kdv)