Skip to content

Commit

Permalink
allow WPA1 PMKIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Sep 9, 2024
1 parent cff1845 commit 3747fb9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 10 additions & 1 deletion hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -3159,10 +3159,12 @@ return true;
static bool gettags(int infolen, uint8_t *infoptr, tags_t *zeiger)
{
static ietag_t *tagptr;
static uint8_t tagok;
static bool ef;

memset(zeiger, 0, TAGS_SIZE);
ef = false;
tagok = 0;
while(0 < infolen)
{
if(infolen == 4) return true;
Expand All @@ -3187,6 +3189,7 @@ while(0 < infolen)
memcpy(zeiger->essid, &tagptr->data[0], tagptr->len);
zeiger->essidlen = tagptr->len;
}
tagok |= TAG_SSID_OK;
}
else if(tagptr->id == TAG_CHAN)
{
Expand Down Expand Up @@ -3217,7 +3220,13 @@ while(0 < infolen)
infoptr += tagptr->len +IETAG_SIZE;
infolen -= tagptr->len +IETAG_SIZE;
}
if((infolen != 0) && (infolen != 4) && (ef == false)) return false;
if((infolen != 0) && (infolen != 4) && (ef == false))
{
if((tagok & TAG_SSID_OK) == TAG_SSID_OK) return true;
if((tagok & TAG_SSID_RSN) == TAG_SSID_RSN) return true;
if((tagok & TAG_SSID_VENDOR) == TAG_SSID_VENDOR) return true;
return false;
}
return true;
}
/*===========================================================================*/
Expand Down
5 changes: 4 additions & 1 deletion include/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ struct ie_tag
#define TAG_PAG 0xde
#define TAG_VENDOR 0xdd
#define TAG_EXT 0xff
#define TAG_SSID_OK 0x01
#define TAG_SSID_RSN 0x02
#define TAG_SSID_VENDOR 0x04
uint8_t len;
uint8_t data[1];
} __attribute__((__packed__));
Expand Down Expand Up @@ -417,7 +420,7 @@ struct rsnie_tag
} __attribute__((__packed__));
typedef struct rsnie_tag rsnie_t;
#define RSNIE_SIZE offsetof(rsnie_t, data)
#define RSNIE_LEN_MIN 20
#define RSNIE_LEN_MIN 18
/*===========================================================================*/
struct wpaie_tag
{
Expand Down

0 comments on commit 3747fb9

Please sign in to comment.