Skip to content

Commit

Permalink
added more hccapx import stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Dec 13, 2023
1 parent 5131f90 commit 463823b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions hcxhashtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1933,10 +1933,13 @@ static void readhccapxfile(int fd_hccapxin, long int hccapxrecords)
{
static long int c;
static hccapx_t *hccapxptr;
static wpakey_t *wpak;
static uint8_t keyver;
static hashlist_t *zeiger, *hashlistnew;

static uint8_t hccapxblock[HCCAPX_SIZE];


hccapxptr = (hccapx_t*)hccapxblock;
zeiger = hashlist;
for(c = 0; c < hccapxrecords; c++)
Expand All @@ -1962,14 +1965,28 @@ for(c = 0; c < hccapxrecords; c++)
readerrorcount++;
continue;
}
wpak = (wpakey_t*)&hccapxptr->eapol[EAPAUTH_SIZE];
keyver = ntohs(wpak->keyinfo) & WPA_KEY_INFO_TYPE_MASK;
if((keyver == 0) || (keyver > 3))
{
readerrorcount++;
continue;
}
if(keyver != hccapxptr->keyver)
{
readerrorcount++;
continue;
}

// printf("debug %02x\n", keyver);

memcpy(zeiger->essid, hccapxptr->essid, hccapxptr->essid_len);
zeiger->essidlen = hccapxptr->essid_len;



eapolcount++;


eapolcount++;
pmkideapolcount = pmkidcount +eapolcount;
if(pmkideapolcount >= hashlistcount)
{
Expand Down

0 comments on commit 463823b

Please sign in to comment.