Skip to content

Commit

Permalink
added better m4 detection to make sure hcxdumptool stops only if a co…
Browse files Browse the repository at this point in the history
…mplete 4way handshake has been received
  • Loading branch information
= committed Feb 15, 2024
1 parent ef72433 commit 176ca73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hcxdumptool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 176ca73

Please sign in to comment.