diff --git a/EXAMPLES.md b/EXAMPLES.md index 63b14e99..b536ce6a 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -1196,6 +1196,97 @@ iptables --line-numbers -v -L -t nat | jc --iptables -p # or: jc -p ip } ] ``` +### iw dev scan +```bash +iw dev wlan0 scan | jc --iw-scan -p # or: jc -p iw dev wlan0 scan +``` +```json +[ + { + "mac_address": "71:31:72:65:e1:a2", + "interface": "wlan0", + "freq": 2462, + "capability": "ESS Privacy ShortSlotTime (0x0411)", + "ssid": "WLAN-1234", + "supported_rates": [ + 1.0, + 2.0, + 5.5, + 11.0, + 18.0, + 24.0, + 36.0, + 54.0 + ], + "erp": "", + "erp_d4.0": "", + "rsn": "Version: 1", + "group_cipher": "CCMP", + "pairwise_ciphers": "CCMP", + "authentication_suites": "PSK", + "capabilities": "0x186c", + "extended_supported_rates": [ + 6.0, + 9.0, + 12.0, + 48.0 + ], + "ht_rx_mcs_rate_indexes_supported": "0-15", + "primary_channel": 11, + "secondary_channel_offset": "no secondary", + "rifs": 1, + "ht_protection": "no", + "non-gf_present": 1, + "obss_non-gf_present": 0, + "dual_beacon": 0, + "dual_cts_protection": 0, + "stbc_beacon": 0, + "l-sig_txop_prot": 0, + "pco_active": 0, + "pco_phase": 0, + "bss_width_channel_transition_delay_factor": 5, + "extended_capabilities": "HT Information Exchange Supported", + "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", + "wps": "Version: 1.0", + "wi-fi_protected_setup_state": "2 (Configured)", + "selected_registrar": "0x0", + "response_type": "3 (AP)", + "uuid": "00000000-0000-0003-0000-75317074f1a2", + "manufacturer": "Corporation", + "model": "VGV8539JW", + "model_number": "1.47.000", + "serial_number": "J144024542", + "primary_device_type": "6-0050f204-1", + "device_name": "Wireless Router(WFA)", + "config_methods": "Label, PBC", + "rf_bands": "0x3", + "tsf_usec": 212098649788, + "sta_channel_width_mhz": 20, + "passive_dwell_tus": 20, + "active_dwell_tus": 10, + "channel_width_trigger_scan_interval_s": 300, + "scan_passive_total_per_channel_tus": 200, + "scan_active_total_per_channel_tus": 20, + "beacon_interval_tus": 100, + "signal_dbm": -80.0, + "last_seen_ms": 11420, + "selected_rates": [ + 1.0, + 2.0, + 5.5, + 11.0 + ], + "obss_scan_activity_threshold_percent": 0.25, + "ds_parameter_set_channel": 11, + "max_amsdu_length_bytes": 7935, + "minimum_rx_ampdu_time_spacing_usec": 16 + } +] +``` ### jobs ```bash jobs -l | jc --jobs -p # or: jc -p jobs diff --git a/README.md b/README.md index a8a65cc3..b5cb47f3 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `--ifconfig` enables the `ifconfig` command parser - `--ini` enables the `INI` file parser - `--iptables` enables the `iptables` command parser +- `--iw-scan` enables the `iw dev scan` command parser - `--jobs` enables the `jobs` command parser - `--kv` enables the `Key/Value` file parser - `--last` enables the `last` and `lastb` command parser diff --git a/docs/parsers/iw_scan.md b/docs/parsers/iw_scan.md index 62fa3768..66e66cba 100644 --- a/docs/parsers/iw_scan.md +++ b/docs/parsers/iw_scan.md @@ -23,7 +23,7 @@ Compatibility: Examples: - $ iw-scan | jc --iw-scan -p + $ iw dev wlan0 scan | jc --iw-scan -p [ { "mac_address": "71:31:72:65:e1:a2", diff --git a/jc/parsers/iw_scan.py b/jc/parsers/iw_scan.py index 456689a3..e1cd2690 100644 --- a/jc/parsers/iw_scan.py +++ b/jc/parsers/iw_scan.py @@ -21,7 +21,7 @@ Compatibility: Examples: - $ iw-scan | jc --iw-scan -p + $ iw dev wlan0 scan | jc --iw-scan -p [ { "mac_address": "71:31:72:65:e1:a2",