Skip to content

Commit

Permalink
Merge pull request #98 from kellyjonbrazil/dev
Browse files Browse the repository at this point in the history
Dev v1.14.1
  • Loading branch information
kellyjonbrazil committed Jan 6, 2021
2 parents 03c0295 + 58246e3 commit 3c25839
Show file tree
Hide file tree
Showing 156 changed files with 3,634 additions and 372 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
jc changelog

20210106 v1.14.1
- Add iw-scan parser tested on linux (beta)
- Update date parser for Ubuntu 20.04 support
- Update last parser for last -F support
- Update last parser to add convenience fields and augment data for easier parsing
- Update man page
- Minor documentation updates

20201231 v1.14.0
- Add hashsum parser tested on linux, macos
- Add hash parser tested on linux, macos
Expand Down
92 changes: 92 additions & 0 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ date | jc --date -p # or: jc -p date
"hour": 16,
"minute": 48,
"second": 11,
"period": null,
"month": "Jul",
"weekday": "Fri",
"weekday_num": 6,
Expand Down Expand Up @@ -1195,6 +1196,97 @@ iptables --line-numbers -v -L -t nat | jc --iptables -p # or: jc -p ip
}
]
```
### iw dev `device` scan
```bash
iw dev wlan0 scan | jc --iw-scan -p # or: jc -p iw dev wlan0 scan
```
```json
[
{
"bssid": "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": "<no flags>",
"erp_d4.0": "<no flags>",
"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
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,14 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
- `--group` enables the `/etc/group` file parser
- `--gshadow` enables the `/etc/gshadow` file parser
- `--hash` enables the `hash` command parser
- `--hashsum` enables the `hashsum` command parser (`md5sum`, `shasum`, etc.)
- `--hashsum` enables the `hashsum` command parser (`md5`, `md5sum`, `shasum`, `sha1sum`, `sha224sum`, `sha256sum`, `sha384sum`, `sha512sum`)
- `--history` enables the `history` command parser
- `--hosts` enables the `/etc/hosts` file parser
- `--id` enables the `id` command parser
- `--ifconfig` enables the `ifconfig` command parser
- `--ini` enables the `INI` file parser
- `--iptables` enables the `iptables` command parser
- `--iw-scan` enables the `iw dev <device> scan` command parser (beta)
- `--jobs` enables the `jobs` command parser
- `--kv` enables the `Key/Value` file parser
- `--last` enables the `last` and `lastb` command parser
Expand Down Expand Up @@ -228,7 +229,8 @@ cat lsof.out | jc --lsof -q

Tested on:
- Centos 7.7
- Ubuntu 18.4
- Ubuntu 18.04
- Ubuntu 20.04
- Fedora32
- OSX 10.11.6
- OSX 10.14.6
Expand Down
1 change: 1 addition & 0 deletions docgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pydocmd simple jc.parsers.id+ > ../docs/parsers/id.md
pydocmd simple jc.parsers.ifconfig+ > ../docs/parsers/ifconfig.md
pydocmd simple jc.parsers.ini+ > ../docs/parsers/ini.md
pydocmd simple jc.parsers.iptables+ > ../docs/parsers/iptables.md
pydocmd simple jc.parsers.iw_scan+ > ../docs/parsers/iw_scan.md
pydocmd simple jc.parsers.jobs+ > ../docs/parsers/jobs.md
pydocmd simple jc.parsers.kv+ > ../docs/parsers/kv.md
pydocmd simple jc.parsers.last+ > ../docs/parsers/last.md
Expand Down
2 changes: 1 addition & 1 deletion docs/parsers/airport.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (Dictionary) raw structured data to process

Returns:

Expand Down
6 changes: 3 additions & 3 deletions docs/parsers/airport_s.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Structured data with the following schema:
List of Dictionaries. Structured data with the following schema:
[
{
"ssid": string,
Expand Down Expand Up @@ -144,5 +144,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

6 changes: 3 additions & 3 deletions docs/parsers/arp.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Structured data with the following schema:
List of Dictionaries. Structured data with the following schema:

[
{
Expand Down Expand Up @@ -154,5 +154,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

6 changes: 3 additions & 3 deletions docs/parsers/blkid.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Structured data with the following schema:
List of Dictionaries. Structured data with the following schema:

[
{
Expand Down Expand Up @@ -157,5 +157,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

6 changes: 3 additions & 3 deletions docs/parsers/cksum.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Structured data with the following schema:
List of Dictionaries. Structured data with the following schema:

[
{
Expand All @@ -91,5 +91,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

2 changes: 1 addition & 1 deletion docs/parsers/crontab.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (Dictionary) raw structured data to process

Returns:

Expand Down
2 changes: 1 addition & 1 deletion docs/parsers/crontab_u.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (Dictionary) raw structured data to process

Returns:

Expand Down
6 changes: 3 additions & 3 deletions docs/parsers/csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Each dictionary represents a row in the csv file:
List of Dictionaries. Each Dictionary represents a row in the csv file:

[
{
Expand All @@ -109,5 +109,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

4 changes: 3 additions & 1 deletion docs/parsers/date.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Examples:
"hour": 16,
"minute": 48,
"second": 11,
"period": null,
"month": "Jul",
"weekday": "Fri",
"weekday_num": 6,
Expand Down Expand Up @@ -63,7 +64,7 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (Dictionary) raw structured data to process

Returns:

Expand All @@ -76,6 +77,7 @@ Returns:
"hour": integer,
"minute": integer,
"second": integer,
"period": string,
"month": string,
"weekday": string,
"weekday_num": integer,
Expand Down
6 changes: 3 additions & 3 deletions docs/parsers/df.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Structured data with the following schema:
List of Dictionaries. Structured data with the following schema:

[
{
Expand Down Expand Up @@ -134,5 +134,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

6 changes: 3 additions & 3 deletions docs/parsers/dig.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Structured data with the following schema:
List of Dictionaries. Structured data with the following schema:

[
{
Expand Down Expand Up @@ -421,5 +421,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

6 changes: 3 additions & 3 deletions docs/parsers/dmidecode.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Structured data with the following schema:
List of Dictionaries. Structured data with the following schema:

[
{
Expand Down Expand Up @@ -162,5 +162,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

6 changes: 3 additions & 3 deletions docs/parsers/du.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ Final processing to conform to the schema.

Parameters:

proc_data: (dictionary) raw structured data to process
proc_data: (List of Dictionaries) raw structured data to process

Returns:

List of dictionaries. Structured data with the following schema:
List of Dictionaries. Structured data with the following schema:

[
{
Expand All @@ -124,5 +124,5 @@ Parameters:

Returns:

List of dictionaries. Raw or processed structured data.
List of Dictionaries. Raw or processed structured data.

0 comments on commit 3c25839

Please sign in to comment.