Skip to content

Commit

Permalink
ignored faulty pmkid
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jul 27, 2024
1 parent 43bcb27 commit b34a619
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1963,33 +1963,44 @@ else fprintf(fh_pmkideapoljtrdeprecated, "%c", (itoa64[((in[1] & 0x0f) << 2)]));
return;
}
/*===========================================================================*/
static bool testfaultypmkid(uint8_t *macsta)
static bool testfaultypmkid(uint8_t *faultypmkid, uint8_t *faultymacsta)
{
static const uint8_t faulty1[3] =
static const uint8_t faultymac1[3] =
{
0x64, 0x52, 0x99
};

static const uint8_t faulty2[3] =
static const uint8_t faultymac2[3] =
{
0xca, 0x6a, 0x10
};

static const uint8_t faulty3[3] =
static const uint8_t faultymac3[3] =
{
0xcc, 0x6a, 0x10
};
if(memcmp(&faulty1, macsta, 3) == 0)

static const uint8_t faultypmkid1[4] =
{
0x00, 0x00, 0x6e, 0x00
};

if(memcmp(&faultymac1, faultymacsta, 3) == 0)
{
pmkidfaultycount++;
return true;
}
if(memcmp(&faultymac2, faultymacsta, 3) == 0)
{
pmkidfaultycount++;
return true;
}
if(memcmp(&faulty2, macsta, 3) == 0)
if(memcmp(&faultymac3, faultymacsta, 3) == 0)
{
pmkidfaultycount++;
return true;
}
if(memcmp(&faulty3, macsta, 3) == 0)
if(memcmp(&faultypmkid1, faultypmkid, 4) == 0)
{
pmkidfaultycount++;
return true;
Expand Down Expand Up @@ -2710,7 +2721,7 @@ static pmkidlist_t *pmkidlistnew;
pmkidcount++;
if((pmkidstatus & PMKID_CLIENT) == PMKID_CLIENT)
{
if(testfaultypmkid(macclient) == true) return;
if(testfaultypmkid(pmkid, macclient) == true) return;
}
if(testpmkid(zeroedpmk, macclient, macap, pmkid) == false)
{
Expand Down

0 comments on commit b34a619

Please sign in to comment.