From 9a06474ca100faf936c5d21d3c2b014e6a124839 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 17 Jun 2024 12:20:31 +0200 Subject: [PATCH] added detailed MP info to --add-timestamp --- hcxpcapngtool.c | 12 +++++++++++- include/hcxpcapngtool.h | 12 ++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/hcxpcapngtool.c b/hcxpcapngtool.c index c92a73ca7..14fd44666 100644 --- a/hcxpcapngtool.c +++ b/hcxpcapngtool.c @@ -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++; } diff --git a/include/hcxpcapngtool.h b/include/hcxpcapngtool.h index d588e4874..05f00b0e0 100644 --- a/include/hcxpcapngtool.h +++ b/include/hcxpcapngtool.h @@ -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