Skip to content

Commit

Permalink
prepare off-line GPX evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jul 28, 2024
1 parent 4c410e8 commit 5a433e0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5657,6 +5657,19 @@ outputtacacsplist();
printcontentinfo();
return;
}

/*===========================================================================*/
static bool processgpxfile(char *gpxinname)
{
static FILE *fh_gpxin;

if((fh_gpxin = fopen(gpxinname, "r")) == NULL) return false;



fclose(fh_gpxin);
return true;
}
/*===========================================================================*/
static bool processcapfile(char *eigenname, char *pcapinname)
{
Expand Down Expand Up @@ -6028,6 +6041,7 @@ fprintf(stdout, "%s %s (C) %s ZeroBeat\n"
"--eapmd5-john=<file> : output EAP MD5 CHALLENGE (john chap)\n"
"--eapleap=<file> : output EAP LEAP and MSCHAPV2 CHALLENGE (hashcat -m 5500, john netntlm)\n"
"--tacacs-plus=<file> : output TACACS PLUS v1 (hashcat -m 16100, john tacacs-plus)\n"
"--gpxin=<file> : input GPX file\n"
"--nmea=<file> : output GPS data in NMEA 0183 format\n"
" format: NMEA 0183 $GPGGA, $GPRMC, $GPWPL\n"
" to convert it to gpx, use GPSBabel:\n"
Expand Down Expand Up @@ -6138,6 +6152,7 @@ static char *essidproberequestoutname;
static char *deviceinfooutname;
static char *identityoutname;
static char *usernameoutname;
static char *gpxinname;
static char *nmeaoutname;
static char *csvoutname;
static char *logoutname;
Expand Down Expand Up @@ -6185,6 +6200,7 @@ static const struct option long_options[] =
{"nonce-error-corrections", required_argument, NULL, HCX_NC},
{"ignore-ie", no_argument, NULL, HCX_IE},
{"max-essids", required_argument, NULL, HCX_ESSIDS},
{"gpxin", required_argument, NULL, HCX_GPX_IN},
{"nmea", required_argument, NULL, HCX_NMEA_OUT},
{"csv", required_argument, NULL, HCX_CSV_OUT},
{"raw-out", required_argument, NULL, HCX_RAW_OUT},
Expand Down Expand Up @@ -6229,6 +6245,7 @@ essidproberequestoutname = NULL;
identityoutname = NULL;
usernameoutname = NULL;
deviceinfooutname = NULL;
gpxinname = NULL;
nmeaoutname = NULL;
csvoutname = NULL;
logoutname = NULL;
Expand Down Expand Up @@ -6343,6 +6360,10 @@ while((auswahl = getopt_long (argc, argv, short_options, long_options, &index))
deviceinfooutname = optarg;
break;

case HCX_GPX_IN:
gpxinname = optarg;
break;

case HCX_NMEA_OUT:
nmeaoutname = optarg;
break;
Expand Down Expand Up @@ -6715,6 +6736,11 @@ if(hccapoutnamedeprecated != NULL)
}
}

if(gpxinname != NULL)
{
if(processgpxfile(gpxinname) == false) exitcode = EXIT_FAILURE;
}

for(index = optind; index < argc; index++)
{
if(processcapfile(argv[0], argv[index]) == false) exitcode = EXIT_FAILURE;
Expand Down
1 change: 1 addition & 0 deletions include/hcxpcapngtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define HCX_PMKIDEAPOLJTR_OUT_DEPRECATED 20
#define HCX_PREFIX_OUT 21
#define HCX_ADD_TIMESTAMP 22
#define HCX_GPX_IN 23
#define HCX_PMKIDEAPOL_OUT 'o'
#define HCX_ESSID_OUT 'E'
#define HCX_ESSIDPROBEREQUEST_OUT 'R'
Expand Down

0 comments on commit 5a433e0

Please sign in to comment.