Skip to content

Commit 1f7ca27

Browse files
author
=
committed
removed WPS information field
1 parent b768e27 commit 1f7ca27

File tree

3 files changed

+64
-22
lines changed

3 files changed

+64
-22
lines changed

changelog

+41-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
03.03.2025
22
==========
3-
changed option -c to -t because output is tabulator separated an not comma separated
3+
hcxnmealog: removed WPS information - all tested APs use WPS 2.0!
4+
5+
03.03.2025
6+
==========
7+
hcxnmealog: changed option -c to -t because output is tabulator separated an not comma separated
48

59
02.03.2025
610
==========
@@ -134,11 +138,6 @@ less common options:
134138
added new passive GPS logger hcxnmealog. It can run in parallel with hcxdumptool, tshark or Wireshark
135139
data is logged to NMEA 0183 format (BSSID only - can be prosssed by gpsbabel) and CSV (tabulator separeted)
136140

137-
There is still work in progress:
138-
evaluation of RSN-IE and log to CSV
139-
evaluation of WPA-IE and log to CSV
140-
evaluation of WPS-IE and log to CSV
141-
142141
hcxnmealog:
143142
-n <file> : output nmea 0183 track to file
144143
track append to file: filename
@@ -154,11 +153,9 @@ hcxnmealog:
154153
ESSID (network name)
155154
COUNTRY CODE (ISO / IEC 3166 alpha2 country code)
156155
ENCRYPTION (encrypted / open)
157-
RSN INFORMATION ELEMENT
158-
bitmask (--help for more information)
159-
WPA INFORMATION ELEMENT
156+
RSN INFORMATION ELEMENT (WPA2/WPA3)
160157
bitmask (--help for more information)
161-
WPS INFORMATION ELEMENT
158+
WPA INFORMATION ELEMENT (WPA1)
162159
bitmask (--help for more information)
163160
FREQUENCY (interface frequency in MHz)
164161
CHANNEL
@@ -184,9 +181,42 @@ hcxnmealog:
184181

185182
--bpf=<file> : input Berkeley Packet Filter (BPF) code (maximum 4096 instructions) in tcpdump decimal numbers format
186183
see --help for more information
187-
--help : show this help
184+
--help : show additional help
188185
--version : show version
189186

187+
Additional information:
188+
0x00000000 suite not in use
189+
Cipher Suites (bitmask)
190+
0x00000001 WEP
191+
0x00000002 TKIP
192+
0x00000004 RESERVED
193+
0x00000008 CCMP-128
194+
0x00000010 WEP-104
195+
0x00000020 BIP-CMAC-128
196+
0x00000040 Group Address Traffic Not Allowed
197+
0x00000080 GCMP-128
198+
0x00000100 GCMP-256
199+
0x00000200 CCMP-256
200+
0x00000400 BIP-GMAC-128
201+
0x00000800 BIP-GMAC-256
202+
0x00001000 BIP-CMAC-256
203+
0x00008000 unknown
204+
Authentication Management Suites (bitmask)
205+
0x00010000 802.1X
206+
0x00020000 PSK
207+
0x00040000 FT + 802.1X
208+
0x00080000 FT + PSK
209+
0x00100000 802.1X SHA-256
210+
0x00200000 PSK SHA-256
211+
0x00400000 TDLS
212+
0x00800000 SAE SHA-256
213+
0x01000000 FT + SAE SHA-256
214+
0x02000000 AP Peer Key Authentication
215+
0x04000000 802.1X Suite B EAP SH-256
216+
0x08000000 802.1X Suite B EAP SH-384
217+
0x10000000 FT + 802.1X SHA-384
218+
0x80000000 unknown
219+
190220
11.11.2024
191221
==========
192222
release v6.3.5

hcxnmealog.c

+8-10
Original file line numberDiff line numberDiff line change
@@ -584,16 +584,16 @@ return;
584584
/*===========================================================================*/
585585
static inline __attribute__((always_inline)) void write_tsv(int i)
586586
{
587-
if((aplist + i)->apdata->essid[0] != 0) fprintf(fh_tsv, "%lld\t%02x%02x%02x%02x%02x%02x\t%.*s\t%c%c\t%s\t%08x\t%08x\t%8u\t%u\t%d\t%d\t%f\t%f\t%f%c\t%f\t%f\t%f\t%f\n",
587+
if((aplist + i)->apdata->essid[0] != 0) fprintf(fh_tsv, "%lld\t%02x%02x%02x%02x%02x%02x\t%.*s\t%c%c\t%s\t%08x\t%08x\t%u\t%d\t%d\t%f\t%f\t%f%c\t%f\t%f\t%f\t%f\n",
588588
(long long)(aplist + i)->tsakt,
589589
macfrx->addr3[0], macfrx->addr3[1], macfrx->addr3[2], macfrx->addr3[3], macfrx->addr3[4], macfrx->addr3[5], (aplist + i)->apdata->essidlen, (aplist + i)->apdata->essid, (aplist + i)->apdata->country[0], (aplist + i)->apdata->country[1],
590-
(aplist + i)->apdata->encmode, (aplist + i)->apdata->rsnie, (aplist + i)->apdata->wpaie, (aplist + i)->apdata->wpsie,
590+
(aplist + i)->apdata->encmode, (aplist + i)->apdata->rsnie, (aplist + i)->apdata->wpaie,
591591
(aplist + i)->apdata->frequency, (aplist + i)->apdata->channel,(s8)(aplist + i)->apdata->rssi,
592592
(aplist + i)->apdata->latitude, (aplist + i)->apdata->longitude, (aplist + i)->apdata->altitude, (aplist + i)->apdata->altitudeunit, (aplist + i)->apdata->speed, (aplist + i)->apdata->pdop, (aplist + i)->apdata->hdop, (aplist + i)->apdata->vdop);
593-
else fprintf(fh_tsv, "%lld\t%02x%02x%02x%02x%02x%02x\t<WILDCARD SSID LEN %d>\t%c%c\t%s\t%8u\t%08x\t%08x\t%u\t%d\t%d\t%f\t%f\t%f%c\t%f\t%f\t%f\t%f\n",
593+
else fprintf(fh_tsv, "%lld\t%02x%02x%02x%02x%02x%02x\t<WILDCARD SSID LEN %d>\t%c%c\t%s\t%8u\t%08x\t%u\t%d\t%d\t%f\t%f\t%f%c\t%f\t%f\t%f\t%f\n",
594594
(long long)(aplist + i)->tsakt,
595595
macfrx->addr3[0], macfrx->addr3[1], macfrx->addr3[2], macfrx->addr3[3], macfrx->addr3[4], macfrx->addr3[5], (aplist + i)->apdata->essidlen, (aplist + i)->apdata->country[0], (aplist + i)->apdata->country[1],
596-
(aplist + i)->apdata->encmode, (aplist + i)->apdata->rsnie, (aplist + i)->apdata->wpaie, (aplist + i)->apdata->wpsie,
596+
(aplist + i)->apdata->encmode, (aplist + i)->apdata->rsnie, (aplist + i)->apdata->wpaie,
597597
(aplist + i)->apdata->frequency, (aplist + i)->apdata->channel, (s8)(aplist + i)->apdata->rssi,
598598
(aplist + i)->apdata->latitude, (aplist + i)->apdata->longitude, (aplist + i)->apdata->altitude, (aplist + i)->apdata->altitudeunit, (aplist + i)->apdata->speed, (aplist + i)->apdata->pdop, (aplist + i)->apdata->hdop, (aplist + i)->apdata->vdop);
599599
return;
@@ -747,6 +747,8 @@ static u16 twstatus;
747747
static int tlen;
748748
static size_t i;
749749

750+
printf("\n\n");
751+
750752
twstatus = 0;
751753
while(0 < infolen)
752754
{
@@ -1074,7 +1076,7 @@ fprintf(stdout, "%s %s (C) %s ZeroBeat\n"
10741076
" 0x04000000 802.1X Suite B EAP SH-256\n"
10751077
" 0x08000000 802.1X Suite B EAP SH-384\n"
10761078
" 0x10000000 FT + 802.1X SHA-384\n"
1077-
" 0x80000000 unknown\n\n"
1079+
" 0x80000000 unknown\n"
10781080
"\n", eigenname, VERSION_TAG, VERSION_YEAR);
10791081
exit(EXIT_SUCCESS);
10801082
}
@@ -1105,10 +1107,6 @@ fprintf(stdout, "%s %s (C) %s ZeroBeat\n"
11051107
" bitmask (--help for more information)\n"
11061108
" WPA INFORMATION ELEMENT (WPA1)\n"
11071109
" bitmask (--help for more information)\n"
1108-
" WPS INFORMATION ELEMENT\n"
1109-
" 0 = WPS not in use\n"
1110-
" 1 = WPS 1.0\n"
1111-
" 2 = WPS 2.0\n"
11121110
" FREQUENCY (interface frequency in MHz)\n"
11131111
" CHANNEL\n"
11141112
" RSSI (signal strength in dBm)\n"
@@ -1133,7 +1131,7 @@ fprintf(stdout, "%s %s (C) %s ZeroBeat\n"
11331131
"\n"
11341132
"--bpf=<file> : input Berkeley Packet Filter (BPF) code (maximum %d instructions) in tcpdump decimal numbers format\n"
11351133
" see --help for more information\n"
1136-
"--help : show this help\n"
1134+
"--help : show additional help\n"
11371135
"--version : show version\n"
11381136
"\n", eigenname, VERSION_TAG, VERSION_YEAR, eigenname, BPF_MAXINSNS);
11391137
exit(EXIT_SUCCESS);

include/ieee80211.h

+15-1
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,17 @@ typedef struct __attribute__((__packed__))
202202

203203
}ieee80211_ietag_t;
204204
#define IEEE80211_IETAG_SIZE offsetof(ieee80211_ietag_t, ie)
205+
206+
/*---------------------------------------------------------------------------*/
207+
typedef struct __attribute__((__packed__))
208+
{
209+
u16 id;
210+
#define TAG_SSID 0x00
211+
u16 len;
212+
u8 et[1];
213+
}ieee80211_ieet_t;
214+
#define IEEE80211_IEET_SIZE offsetof(ieee80211_ieet_t, ie)
215+
205216
/*---------------------------------------------------------------------------*/
206217
typedef struct __attribute__((__packed__))
207218
{
@@ -405,7 +416,10 @@ static const u8 wpapsk[SUITE_SIZE] =
405416
{
406417
0x00, 0x50, 0xf2, 0x02
407418
};
408-
419+
static const u8 wpstype[SUITE_SIZE] =
420+
{
421+
0x00, 0x50, 0xf2, 0x04
422+
};
409423

410424
static const int vendoraprg[] =
411425
{

0 commit comments

Comments
 (0)