diff --git a/docs/parsers/ufw_appinfo.md b/docs/parsers/ufw_appinfo.md index 826ff851..35a5d75f 100644 --- a/docs/parsers/ufw_appinfo.md +++ b/docs/parsers/ufw_appinfo.md @@ -3,6 +3,8 @@ # jc.parsers.ufw_appinfo jc - JSON CLI output utility `ufw app info [application]` command output parser +Supports individual apps via `ufw app info [application]` and all apps list via `ufw app info all`. + Because `ufw` application definitions allow overlapping ports and port ranges, this parser preserves that behavior, but also provides `normalized` lists and ranges that remove duplicate ports and merge overlapping ranges. Usage (cli): @@ -20,105 +22,111 @@ Usage (module): Schema: - { - "profile": string, - "title": string, - "description": string, - "tcp_list": [ - integer - ], - "tcp_ranges": [ - { - "start": integer, # 'any' is converted to start/end: 0/65535 - "end": integer - } - ], - "udp_list": [ - integer - ], - "udp_ranges": [ - { - "start": integer, # 'any' is converted to start/end: 0/65535 - "end": integer - } - ], - "normalized_tcp_list": [ - integers # duplicates and overlapping are removed - ], - "normalized_tcp_ranges": [ - { - "start": integer, # 'any' is converted to start/end: 0/65535 - "end": integers # overlapping are merged - } - ], - "normalized_udp_list": [ - integers # duplicates and overlapping are removed - ], - "normalized_udp_ranges": [ - { - "start": integer, # 'any' is converted to start/end: 0/65535 - "end": integers # overlapping are merged - } - ] - } + [ + { + "profile": string, + "title": string, + "description": string, + "tcp_list": [ + integer + ], + "tcp_ranges": [ + { + "start": integer, # 'any' is converted to start/end: 0/65535 + "end": integer + } + ], + "udp_list": [ + integer + ], + "udp_ranges": [ + { + "start": integer, # 'any' is converted to start/end: 0/65535 + "end": integer + } + ], + "normalized_tcp_list": [ + integers # duplicates and overlapping are removed + ], + "normalized_tcp_ranges": [ + { + "start": integer, # 'any' is converted to start/end: 0/65535 + "end": integers # overlapping are merged + } + ], + "normalized_udp_list": [ + integers # duplicates and overlapping are removed + ], + "normalized_udp_ranges": [ + { + "start": integer, # 'any' is converted to start/end: 0/65535 + "end": integers # overlapping are merged + } + ] + } + ] Examples: $ ufw app info MSN | jc --ufw-appinfo -p - { - "profile": "MSN", - "title": "MSN Chat", - "description": "MSN chat protocol (with file transfer and voice)", - "tcp_list": [ - 1863, - 6901 - ], - "udp_list": [ - 1863, - 6901 - ], - "tcp_ranges": [ - { - "start": 6891, - "end": 6900 - } - ], - "normalized_tcp_list": [ - 1863, - 6901 - ], - "normalized_tcp_ranges": [ - { - "start": 6891, - "end": 6900 - } - ], - "normalized_udp_list": [ - 1863, - 6901 - ] - } + [ + { + "profile": "MSN", + "title": "MSN Chat", + "description": "MSN chat protocol (with file transfer and voice)", + "tcp_list": [ + 1863, + 6901 + ], + "udp_list": [ + 1863, + 6901 + ], + "tcp_ranges": [ + { + "start": 6891, + "end": 6900 + } + ], + "normalized_tcp_list": [ + 1863, + 6901 + ], + "normalized_tcp_ranges": [ + { + "start": 6891, + "end": 6900 + } + ], + "normalized_udp_list": [ + 1863, + 6901 + ] + } + ] $ ufw app info MSN | jc --ufw-appinfo -p -r - { - "profile": "MSN", - "title": "MSN Chat", - "description": "MSN chat protocol (with file transfer and voice)", - "tcp_list": [ - "1863", - "6901" - ], - "udp_list": [ - "1863", - "6901" - ], - "tcp_ranges": [ - { - "start": "6891", - "end": "6900" - } - ] - } + [ + { + "profile": "MSN", + "title": "MSN Chat", + "description": "MSN chat protocol (with file transfer and voice)", + "tcp_list": [ + "1863", + "6901" + ], + "udp_list": [ + "1863", + "6901" + ], + "tcp_ranges": [ + { + "start": "6891", + "end": "6900" + } + ] + } + ] ## info @@ -142,7 +150,7 @@ Parameters: Returns: - Dictionary. Raw or processed structured data. + List of Dictionaries. Raw or processed structured data. ## Parser Information Compatibility: linux diff --git a/jc/man/jc.1.gz b/jc/man/jc.1.gz index 8efe4136..e2074643 100644 Binary files a/jc/man/jc.1.gz and b/jc/man/jc.1.gz differ diff --git a/man/jc.1.gz b/man/jc.1.gz index 8efe4136..e2074643 100644 Binary files a/man/jc.1.gz and b/man/jc.1.gz differ