diff --git a/hcxpcapngtool.c b/hcxpcapngtool.c index 87b947d2a..11f1828f7 100644 --- a/hcxpcapngtool.c +++ b/hcxpcapngtool.c @@ -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) { @@ -6028,6 +6041,7 @@ fprintf(stdout, "%s %s (C) %s ZeroBeat\n" "--eapmd5-john= : output EAP MD5 CHALLENGE (john chap)\n" "--eapleap= : output EAP LEAP and MSCHAPV2 CHALLENGE (hashcat -m 5500, john netntlm)\n" "--tacacs-plus= : output TACACS PLUS v1 (hashcat -m 16100, john tacacs-plus)\n" + "--gpxin= : input GPX file\n" "--nmea= : output GPS data in NMEA 0183 format\n" " format: NMEA 0183 $GPGGA, $GPRMC, $GPWPL\n" " to convert it to gpx, use GPSBabel:\n" @@ -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; @@ -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}, @@ -6229,6 +6245,7 @@ essidproberequestoutname = NULL; identityoutname = NULL; usernameoutname = NULL; deviceinfooutname = NULL; +gpxinname = NULL; nmeaoutname = NULL; csvoutname = NULL; logoutname = NULL; @@ -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; @@ -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; diff --git a/include/hcxpcapngtool.h b/include/hcxpcapngtool.h index 05f00b0e0..49053f011 100644 --- a/include/hcxpcapngtool.h +++ b/include/hcxpcapngtool.h @@ -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'