Skip to content

Commit

Permalink
LE/BE workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Sep 5, 2024
1 parent a5015d1 commit 96f15b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions hcxhashtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,10 +1319,10 @@ if(zeiger->type == HCX_TYPE_EAPOL)
rc = wpak->replaycount;
#endif
fprintf(fh_pmkideapol, "REPLAYCOUNT: %" PRIu64 "\n", rc);
if((zeiger->mp & 0xf0) == 0x10) fprintf(fh_pmkideapol, "NC INFO....: ROGUE attack / NC deactivated\n");
else if((zeiger->mp & 0xf0) == 0x20) fprintf(fh_pmkideapol, "NC INFO....: little endian router detected / NC on LE\n");
else if((zeiger->mp & 0xf0) == 0x40) fprintf(fh_pmkideapol, "NC INFO....: big endian router detected / NC on BE\n");
else if((zeiger->mp & 0xf0) == 0x80) fprintf(fh_pmkideapol, "NC INFO....: hashcat default NC activated\n");
if((zeiger->mp & 0x20) == 0x20) fprintf(fh_pmkideapol, "ROUTER TYPE: little endian (LE)\n");
else if((zeiger->mp & 0x40) == 0x40) fprintf(fh_pmkideapol, "ROUTER TYPE: big endian (BE)\n");
if((zeiger->mp & 0xf0) == 0x10) fprintf(fh_pmkideapol, "NC INFO....: NC deactivated\n");
else if((zeiger->mp & 0x80) == 0x80) fprintf(fh_pmkideapol, "NC INFO....: hashcat default NC activated\n");
else fprintf(fh_pmkideapol, "NC INFO....: NC not detected\n");
keyinfo = (getkeyinfo(ntohs(wpak->keyinfo)));
fprintf(fh_pmkideapol, "EAPOL MSG..: %d\n", keyinfo);
Expand Down
19 changes: 10 additions & 9 deletions hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,8 @@ for(zeigerhs = zeigerhsakt; zeigerhs < handshakelistptr; zeigerhs++)
if((zeigerhs->status &7) == ST_M34E4) eapolm34e4count++;
if((zeigerhs->status & ST_ENDIANESS) != 0)
{
zeigerhs->status &= ~(1 << 7);
zeigerhs->status |= 0x80;
// zeigerhs->status &= ~(1 << 7);
}
wpak = (wpakey_t*)(zeigerhs->eapol +EAPAUTH_SIZE);
keyvertemp = ntohs(wpak->keyinfo) & WPA_KEY_INFO_TYPE_MASK;
Expand Down Expand Up @@ -3460,13 +3461,13 @@ for(zeiger = messagelist; zeiger < messagelist +MESSAGELIST_MAX; zeiger++)
eapolnccount++;
if(memcmp(&zeiger->nonce[30], &wpak->nonce[30], 2) != 0)
{
zeiger->status = ST_LE;
(messagelist +MESSAGELIST_MAX)->status = ST_LE;
zeiger->status = ST_LE +ST_NC;
(messagelist +MESSAGELIST_MAX)->status = ST_LE +ST_NC;
}
else if(memcmp(&zeiger->nonce[28], &wpak->nonce[28], 2) != 0)
{
zeiger->status = ST_BE;
(messagelist +MESSAGELIST_MAX)->status = ST_BE;
zeiger->status = ST_BE +ST_NC;
(messagelist +MESSAGELIST_MAX)->status = ST_BE +ST_NC;
}
}
}
Expand Down Expand Up @@ -3853,13 +3854,13 @@ for(zeiger = messagelist; zeiger < messagelist +MESSAGELIST_MAX +1; zeiger++)
eapolnccount++;
if(memcmp(&zeiger->nonce[30], &wpak->nonce[30], 2) != 0)
{
zeiger->status = ST_LE;
(messagelist +MESSAGELIST_MAX)->status = ST_LE;
zeiger->status = ST_LE +ST_NC;
(messagelist +MESSAGELIST_MAX)->status = ST_LE +ST_NC;
}
else if(memcmp(&zeiger->nonce[28], &wpak->nonce[28], 2) != 0)
{
zeiger->status = ST_BE;
(messagelist +MESSAGELIST_MAX)->status = ST_BE;
zeiger->status = ST_BE +ST_NC;
(messagelist +MESSAGELIST_MAX)->status = ST_BE +ST_NC;
}
}
}
Expand Down

0 comments on commit 96f15b8

Please sign in to comment.