Skip to content

Commit

Permalink
added detailed MP info to --add-timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jun 17, 2024
1 parent d4f1adb commit 9a06474
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
12 changes: 11 additions & 1 deletion hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,17 @@ for(zeigerhs = zeigerhsakt; zeigerhs < handshakelistptr; zeigerhs++)
zeigerhs->anonce[24], zeigerhs->anonce[25], zeigerhs->anonce[26], zeigerhs->anonce[27], zeigerhs->anonce[28], zeigerhs->anonce[29], zeigerhs->anonce[30], zeigerhs->anonce[31]);
for(p = 0; p < zeigerhs->eapauthlen; p++) fprintf(fh_pmkideapol, "%02x", eapoltemp[p]);
if(addtimestampflag == false) fprintf(fh_pmkideapol, "*%02x\n", zeigerhs->status);
else fprintf(fh_pmkideapol, "*%02x\t%s %" PRIu64 "\n", zeigerhs->status, timestringhs, zeigerhs->timestampgap);
else
{
fprintf(fh_pmkideapol, "*%02x\t%s %" PRIu64 "\t", zeigerhs->status, timestringhs, zeigerhs->timestampgap);
if((zeigerhs->status & 0x07) == ST_M12E2) fprintf(fh_pmkideapol, "M12E2");
else if((zeigerhs->status & 0x07) == ST_M14E4) fprintf(fh_pmkideapol, "M14E4");
else if((zeigerhs->status & 0x07) == ST_M32E2) fprintf(fh_pmkideapol, "M32E2");
else if((zeigerhs->status & 0x07) == ST_M32E3) fprintf(fh_pmkideapol, "M32E3");
else if((zeigerhs->status & 0x07) == ST_M34E3) fprintf(fh_pmkideapol, "M34E3");
else if((zeigerhs->status & 0x07) == ST_M34E4) fprintf(fh_pmkideapol, "M34E4");
fprintf(fh_pmkideapol, "\n");
}
if(zeigerhs->rcgap == 0) eapolwrittencount++;
else eapolncwrittencount++;
}
Expand Down
12 changes: 6 additions & 6 deletions include/hcxpcapngtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ struct messagelist_s
uint64_t timestamp;
long int eapolmsgcount;
uint8_t status;
#define ST_M12E2 0
#define ST_M14E4 1
#define ST_M32E2 2
#define ST_M32E3 3
#define ST_M34E3 4
#define ST_M34E4 5
#define ST_M12E2 0x00
#define ST_M14E4 0x01
#define ST_M32E2 0x02
#define ST_M32E3 0x03
#define ST_M34E3 0x04
#define ST_M34E4 0x05
#define ST_APLESS 0x10
#define ST_LE 0x20
#define ST_BE 0x40
Expand Down

0 comments on commit 9a06474

Please sign in to comment.