Skip to content

Commit

Permalink
fixed BE and LE NC
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Sep 4, 2024
1 parent 39ff977 commit a5015d1
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -3455,21 +3455,18 @@ for(zeiger = messagelist; zeiger < messagelist +MESSAGELIST_MAX; zeiger++)
{
if(memcmp(zeiger->ap, macap, 6) != 0) continue;
if(memcmp(zeiger->client, macclient, 6) != 0) continue;
if(memcmp(zeiger->nonce, wpak->nonce, 28) == 0)
if((memcmp(zeiger->nonce, wpak->nonce, 28) == 0) && (memcmp(&zeiger->nonce[28], &wpak->nonce[28], 4) != 0))
{
if(memcmp(&zeiger->nonce[28], &wpak->nonce[28], 4) != 0)
eapolnccount++;
if(memcmp(&zeiger->nonce[30], &wpak->nonce[30], 2) != 0)
{
eapolnccount++;
if(memcmp(&zeiger->nonce[30], &wpak->nonce[31], 2) != 0)
{
zeiger->status = ST_LE;
(messagelist +MESSAGELIST_MAX)->status = ST_LE;
}
else if(memcmp(&zeiger->nonce[28], &wpak->nonce[29], 2) != 0)
{
zeiger->status = ST_BE;
(messagelist +MESSAGELIST_MAX)->status = ST_BE;
}
zeiger->status = ST_LE;
(messagelist +MESSAGELIST_MAX)->status = ST_LE;
}
else if(memcmp(&zeiger->nonce[28], &wpak->nonce[28], 2) != 0)
{
zeiger->status = ST_BE;
(messagelist +MESSAGELIST_MAX)->status = ST_BE;
}
}
}
Expand Down Expand Up @@ -3851,21 +3848,18 @@ for(zeiger = messagelist; zeiger < messagelist +MESSAGELIST_MAX +1; zeiger++)
if(memcmp(zeiger->ap, macap, 6) != 0) continue;
if(memcmp(zeiger->client, macclient, 6) != 0) continue;
eapolm1ancount++;
if(memcmp(zeiger->nonce, wpak->nonce, 28) == 0)
if((memcmp(zeiger->nonce, wpak->nonce, 28) == 0) && (memcmp(&zeiger->nonce[28], &wpak->nonce[28], 4) != 0))
{
if(memcmp(&zeiger->nonce[28], &wpak->nonce[28], 4) != 0)
eapolnccount++;
if(memcmp(&zeiger->nonce[30], &wpak->nonce[30], 2) != 0)
{
eapolnccount++;
if(memcmp(&zeiger->nonce[30], &wpak->nonce[31], 2) != 0)
{
zeiger->status = ST_LE;
(messagelist +MESSAGELIST_MAX)->status = ST_LE;
}
else if(memcmp(&zeiger->nonce[28], &wpak->nonce[29], 2) != 0)
{
zeiger->status = ST_BE;
(messagelist +MESSAGELIST_MAX)->status = ST_BE;
}
zeiger->status = ST_LE;
(messagelist +MESSAGELIST_MAX)->status = ST_LE;
}
else if(memcmp(&zeiger->nonce[28], &wpak->nonce[28], 2) != 0)
{
zeiger->status = ST_BE;
(messagelist +MESSAGELIST_MAX)->status = ST_BE;
}
}
}
Expand Down

0 comments on commit a5015d1

Please sign in to comment.