From b34a619335af67dd116b0e0b3294e910f05b0299 Mon Sep 17 00:00:00 2001 From: = <=> Date: Sat, 27 Jul 2024 16:26:40 +0200 Subject: [PATCH] ignored faulty pmkid --- hcxpcapngtool.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/hcxpcapngtool.c b/hcxpcapngtool.c index 8a4b1f8e..e1172ea8 100644 --- a/hcxpcapngtool.c +++ b/hcxpcapngtool.c @@ -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; @@ -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) {