-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor fix to iw-scan to parse more fields
- Loading branch information
1 parent
3665892
commit a2b5d41
Showing
8 changed files
with
132 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,4 +146,4 @@ Compatibility: linux | |
|
||
Source: [`jc/parsers/iw_scan.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/iw_scan.py) | ||
|
||
Version 0.7 by Kelly Brazil ([email protected]) | ||
Version 0.75 by Kelly Brazil ([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,7 +122,7 @@ | |
|
||
class info(): | ||
"""Provides parser metadata (version, author, etc.)""" | ||
version = '0.7' | ||
version = '0.75' | ||
description = '`iw dev [device] scan` command parser' | ||
author = 'Kelly Brazil' | ||
author_email = '[email protected]' | ||
|
@@ -298,6 +298,7 @@ def parse(data, raw=False, quiet=False): | |
|
||
raw_output = [] | ||
section = {} | ||
header = '' | ||
|
||
if jc.utils.has_data(data): | ||
|
||
|
@@ -323,7 +324,9 @@ def parse(data, raw=False, quiet=False): | |
split_line[0] = split_line[0].lower().replace('*', '').replace('(', '')\ | ||
.replace(')', '').replace(',', '').replace('-', '_')\ | ||
.strip().replace(' ', '_') | ||
section[split_line[0]] = split_line[1].strip() | ||
if split_line[1] == '': | ||
header = split_line[0] + '_' | ||
section[header + split_line[0]] = split_line[1].strip() | ||
|
||
continue | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"bssid": "00:19:a9:cd:c6:80", "interface": "wlan0", "freq": 2412, "capability": "ESS ShortPreamble ShortSlotTime (0x0421)", "ssid": "Cisco1240", "supported_rates": [1.0, 2.0, 5.5, 6.0, 9.0, 11.0, 12.0, 18.0], "erp": "<no flags>", "extended_supported_rates": [24.0, 36.0, 48.0, 54.0], "wmm": "Parameter version 1", "be": "CW 15-1023, AIFSN 3", "bk": "CW 15-1023, AIFSN 7", "vi": "CW 7-15, AIFSN 2, TXOP 3008 usec", "vo": "CW 3-7, AIFSN 2, TXOP 1504 usec", "tsf_usec": 2984923701, "beacon_interval_tus": 100, "signal_dbm": -45.0, "last_seen_ms": 429, "selected_rates": [1.0, 2.0, 5.5, 11.0], "ds_parameter_set_channel": 1}, {"bssid": "d0:d0:fd:69:ca:70", "interface": "wlan0", "freq": 2462, "capability": "ESS ShortPreamble ShortSlotTime (0x0421)", "ssid": "Cisco1250", "supported_rates": [1.0, 2.0, 5.5, 6.0, 9.0, 11.0, 12.0, 18.0], "erp": "<no flags>", "extended_supported_rates": [24.0, 36.0, 48.0, 54.0], "wmm": "Parameter version 1", "be": "CW 15-1023, AIFSN 3", "bk": "CW 15-1023, AIFSN 7", "vi": "CW 7-15, AIFSN 2, TXOP 3008 usec", "vo": "acm CW 3-7, AIFSN 2, TXOP 1504 usec", "tsf_usec": 2968648942, "beacon_interval_tus": 102, "signal_dbm": -70.0, "last_seen_ms": 328, "selected_rates": [1.0, 2.0, 5.5, 11.0], "ds_parameter_set_channel": 11}] | ||
[{"bssid":"00:19:a9:cd:c6:80","interface":"wlan0","freq":2412,"capability":"ESS ShortPreamble ShortSlotTime (0x0421)","ssid":"Cisco1240","supported_rates":[1.0,2.0,5.5,6.0,9.0,11.0,12.0,18.0],"erp":"<no flags>","extended_supported_rates":[24.0,36.0,48.0,54.0],"wmm":"Parameter version 1","be":"CW 15-1023, AIFSN 3","bk":"CW 15-1023, AIFSN 7","vi":"CW 7-15, AIFSN 2, TXOP 3008 usec","vo":"CW 3-7, AIFSN 2, TXOP 1504 usec","tsf_usec":2984923701,"beacon_interval_tus":100,"signal_dbm":-45.0,"last_seen_ms":429,"selected_rates":[1.0,2.0,5.5,11.0],"ds_parameter_set_channel":1},{"bssid":"d0:d0:fd:69:ca:70","interface":"wlan0","freq":2462,"capability":"ESS ShortPreamble ShortSlotTime (0x0421)","ssid":"Cisco1250","supported_rates":[1.0,2.0,5.5,6.0,9.0,11.0,12.0,18.0],"erp":"<no flags>","extended_supported_rates":[24.0,36.0,48.0,54.0],"wmm":"Parameter version 1","be":"CW 15-1023, AIFSN 3","bk":"CW 15-1023, AIFSN 7","vi":"CW 7-15, AIFSN 2, TXOP 3008 usec","vo":"acm CW 3-7, AIFSN 2, TXOP 1504 usec","tsf_usec":2968648942,"beacon_interval_tus":102,"signal_dbm":-70.0,"last_seen_ms":328,"selected_rates":[1.0,2.0,5.5,11.0],"ds_parameter_set_channel":11}] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"bssid":"xx:xx:xx:xx:3e:41","interface":"wlan0-1","freq":2412,"capability":"ESS (0x1431)","information_elements_from_probe_response_frame_ssid":"Troubleshooting","information_elements_from_probe_response_frame_rsn":"Version: 1","information_elements_from_probe_response_frame_group_cipher":"CCMP","information_elements_from_probe_response_frame_pairwise_ciphers":"CCMP","information_elements_from_probe_response_frame_authentication_suites":"PSK","information_elements_from_probe_response_frame_capabilities":"16-PTKSA-RC 1-GTKSA-RC (0x000c)","ht_capabilities_capabilities":"0x1ef","ht_capabilities_max_amsdu_length":"3839 bytes","ht_capabilities_minimum_rx_ampdu_time_spacing":"No restriction (0x00)","ht_capabilities_ht_rx_mcs_rate_indexes_supported":"0-15","ht_operation_primary_channel":1,"ht_operation_secondary_channel_offset":"no secondary","ht_operation_sta_channel_width":"20 MHz","vht_capabilities_0x33800192_max_mpdu_length":11454,"vht_capabilities_0x33800192_supported_channel_width":"neither 160 nor 80 80","vht_rx_mcs_set_1_streams":"MCS 0-9","vht_rx_mcs_set_2_streams":"MCS 0-9","vht_rx_mcs_set_3_streams":"not supported","vht_rx_mcs_set_4_streams":"not supported","vht_rx_mcs_set_5_streams":"not supported","vht_rx_mcs_set_6_streams":"not supported","vht_rx_mcs_set_7_streams":"not supported","vht_rx_mcs_set_8_streams":"not supported","vht_rx_mcs_set_vht_rx_highest_supported":"780 Mbps","vht_tx_mcs_set_1_streams":"MCS 0-9","vht_tx_mcs_set_2_streams":"MCS 0-9","vht_tx_mcs_set_3_streams":"not supported","vht_tx_mcs_set_4_streams":"not supported","vht_tx_mcs_set_5_streams":"not supported","vht_tx_mcs_set_6_streams":"not supported","vht_tx_mcs_set_7_streams":"not supported","vht_tx_mcs_set_8_streams":"not supported","vht_tx_mcs_set_vht_tx_highest_supported":"780 Mbps","vht_tx_mcs_set_vht_extended_nss":"not supported","vht_operation_channel_width":"0 (20 or 40 MHz)","vht_operation_center_freq_segment_1":0,"vht_operation_center_freq_segment_2":0,"vht_operation_vht_basic_mcs_set":"0xfffa","he_mac_capabilities_0x010102000040_minimum_payload_size_of_128_bytes":1,"he_mac_capabilities_0x010102000040_he_phy_capabilities":"(0x06304c090c008008020c00):","he_mac_capabilities_0x010102000040_device_class":1,"he_mac_capabilities_0x010102000040_dcm_max_constellation":1,"he_mac_capabilities_0x010102000040_dcm_max_constellation_rx":1,"he_mac_capabilities_0x010102000040_beamformee_sts_<=_80mhz":3,"he_mac_capabilities_0x010102000040_max_nc":1,"he_mac_capabilities_0x010102000040_1_streams":"MCS 0-11","he_mac_capabilities_0x010102000040_2_streams":"MCS 0-11","he_mac_capabilities_0x010102000040_3_streams":"not supported","he_mac_capabilities_0x010102000040_4_streams":"not supported","he_mac_capabilities_0x010102000040_5_streams":"not supported","he_mac_capabilities_0x010102000040_6_streams":"not supported","he_mac_capabilities_0x010102000040_7_streams":"not supported","he_mac_capabilities_0x010102000040_8_streams":"not supported","tsf_usec":608162896731,"beacon_interval_tus":100,"signal_dbm":-54.0,"last_seen_ms":1410}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
BSS xx:xx:xx:xx:3e:41(on wlan0-1) | ||
last seen: 4206.107s [boottime] | ||
TSF: 608162896731 usec (7d, 00:56:02) | ||
freq: 2412 | ||
beacon interval: 100 TUs | ||
capability: ESS (0x1431) | ||
signal: -54.00 dBm | ||
last seen: 1410 ms ago | ||
Information elements from Probe Response frame: | ||
SSID: Troubleshooting | ||
RSN: * Version: 1 | ||
* Group cipher: CCMP | ||
* Pairwise ciphers: CCMP | ||
* Authentication suites: PSK | ||
* Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c) | ||
HT capabilities: | ||
Capabilities: 0x1ef | ||
RX LDPC | ||
HT20/HT40 | ||
SM Power Save disabled | ||
RX HT20 SGI | ||
RX HT40 SGI | ||
TX STBC | ||
RX STBC 1-stream | ||
Max AMSDU length: 3839 bytes | ||
No DSSS/CCK HT40 | ||
Maximum RX AMPDU length 65535 bytes (exponent: 0x003) | ||
Minimum RX AMPDU time spacing: No restriction (0x00) | ||
HT RX MCS rate indexes supported: 0-15 | ||
HT TX MCS rate indexes are undefined | ||
HT operation: | ||
* primary channel: 1 | ||
* secondary channel offset: no secondary | ||
* STA channel width: 20 MHz | ||
VHT capabilities: | ||
VHT Capabilities (0x33800192): | ||
Max MPDU length: 11454 | ||
Supported Channel Width: neither 160 nor 80 80 | ||
RX LDPC | ||
TX STBC | ||
RX antenna pattern consistency | ||
TX antenna pattern consistency | ||
VHT RX MCS set: | ||
1 streams: MCS 0-9 | ||
2 streams: MCS 0-9 | ||
3 streams: not supported | ||
4 streams: not supported | ||
5 streams: not supported | ||
6 streams: not supported | ||
7 streams: not supported | ||
8 streams: not supported | ||
VHT RX highest supported: 780 Mbps | ||
VHT TX MCS set: | ||
1 streams: MCS 0-9 | ||
2 streams: MCS 0-9 | ||
3 streams: not supported | ||
4 streams: not supported | ||
5 streams: not supported | ||
6 streams: not supported | ||
7 streams: not supported | ||
8 streams: not supported | ||
VHT TX highest supported: 780 Mbps | ||
VHT extended NSS: not supported | ||
VHT operation: | ||
* channel width: 0 (20 or 40 MHz) | ||
* center freq segment 1: 0 | ||
* center freq segment 2: 0 | ||
* VHT basic MCS set: 0xfffa | ||
HE capabilities: | ||
HE MAC Capabilities (0x010102000040): | ||
HTC HE Supported | ||
Minimum Payload size of 128 bytes: 1 | ||
OM Control | ||
A-MSDU in A-MPDU | ||
HE PHY Capabilities: (0x06304c090c008008020c00): | ||
HE40/2.4GHz | ||
HE40/HE80/5GHz | ||
Device Class: 1 | ||
LDPC Coding in Payload | ||
STBC Tx <= 80MHz | ||
STBC Rx <= 80MHz | ||
Full Bandwidth UL MU-MIMO | ||
DCM Max Constellation: 1 | ||
DCM Max Constellation Rx: 1 | ||
Beamformee STS <= 80Mhz: 3 | ||
PPE Threshold Present | ||
Max NC: 1 | ||
20MHz in 40MHz HE PPDU 2.4GHz | ||
TX 1024-QAM | ||
RX 1024-QAM | ||
HE RX MCS and NSS set <= 80 MHz | ||
1 streams: MCS 0-11 | ||
2 streams: MCS 0-11 | ||
3 streams: not supported | ||
4 streams: not supported | ||
5 streams: not supported | ||
6 streams: not supported | ||
7 streams: not supported | ||
8 streams: not supported | ||
HE TX MCS and NSS set <= 80 MHz | ||
1 streams: MCS 0-11 | ||
2 streams: MCS 0-11 | ||
3 streams: not supported | ||
4 streams: not supported | ||
5 streams: not supported | ||
6 streams: not supported | ||
7 streams: not supported | ||
8 streams: not supported | ||
PPE Threshold 0x19 0x1c 0xc7 0x71 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters