some speed improvements in PMKID detection
@@ -1257,6 +1257,12 @@ static inline bool detectpmkid(uint16_t authlen, uint8_t *authpacket)
{
pmkid_t *pmkid;
+uint8_t pmkidoui[] =
+{
+0x00, 0x0f, 0xac
+};
+#define PMKIDOUI_SIZE sizeof(pmkidoui)
+
if(authlen < WPAKEY_SIZE +PMKID_SIZE)
{
return false;
@@ -1267,7 +1273,8 @@ if((pmkid->id != 0xdd) && (pmkid->id != 0x14))
{
return false;
}
-if((pmkid->oui[0] != 0x00) && (pmkid->oui[1] != 0x0f) && (pmkid->oui[2] != 0xac))
+if(memcmp(&pmkidoui, pmkid->oui, PMKIDOUI_SIZE) != 0)
+//if((pmkid->oui[0] != 0x00) && (pmkid->oui[1] != 0x0f) && (pmkid->oui[2] != 0xac))
{
return false;
}
@@ -1845,7 +1852,6 @@ static const uint8_t associationrequestdata[] =
0xdd, 0x1e, 0x00, 0x90, 0x4c, 0x33, 0xad, 0x49, 0x17, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xdd, 0x07, 0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00,
-
};
#define ASSOCIATIONREQUEST_SIZE sizeof(associationrequestdata)
