Try the
jc
web demo!
I’m happy to announce the release of jc
version 1.11.1 available on github and pypi.
jc
now supports over 50 commands and file-types and now can be installed via Homebrew (macOS) and zypper
(OpenSUSE). In addition, jc
can now be installed via DEB and RPM packages or run as a single binary on linux or macOS. You can set your own custom colors for jc
to display and more command parsers are supported on macOS. See below for more information on the new features.
To upgrade, run:
$ pip3 install --upgrade jc
RPM/DEB packages and Binaries can also be found here.
OS package repositories (e.g. brew
, zypper
, etc.) will be updated with the latest version of jc
on their own future release schedules.
New Features
jc
now supports custom colors. You can customize the colors by setting theJC_COLORS
environment variable.jc
is now available on macOS via Homebrew (brew install jc
)jc
is now available on OpenSUSE viazypper
- DEB, RPM, and Binary packages are now available for linux and macOS
- Several back-end updates to support packaging on standard linux distribution package repositories in the future (e.g. Fedora)
New Parsers
jc
now supports 51 parsers. The dmidecode
command is now supported for linux platforms.
Documentation and schemas for all parsers can be found here.
dmidecode
command parser
Linux support for the dmidecode
command:
# jc -p dmidecode [ { "handle": "0x0000", "type": 0, "bytes": 24, "description": "BIOS Information", "values": { "vendor": "Phoenix Technologies LTD", "version": "6.00", "release_date": "04/13/2018", "address": "0xEA490", "runtime_size": "88944 bytes", "rom_size": "64 kB", "characteristics": [ "ISA is supported", "PCI is supported", "PC Card (PCMCIA) is supported", "PNP is supported", "APM is supported", "BIOS is upgradeable", "BIOS shadowing is allowed", "ESCD support is available", "Boot from CD is supported", "Selectable boot is supported", "EDD is supported", "Print screen service is supported (int 5h)", "8042 keyboard services are supported (int 9h)", "Serial services are supported (int 14h)", "Printer services are supported (int 17h)", "CGA/mono video services are supported (int 10h)", "ACPI is supported", "Smart battery is supported", "BIOS boot specification is supported", "Function key-initiated network boot is supported", "Targeted content distribution is supported" ], "bios_revision": "4.6", "firmware_revision": "0.0" } }, ... ]
Updated Parsers
The netstat
command is now supported on macOS:
$ jc -p netstat [ { "proto": "tcp4", "recv_q": 0, "send_q": 0, "local_address": "mylaptop.local", "foreign_address": "173.199.15.254", "state": "SYN_SENT ", "kind": "network", "local_port": "57561", "foreign_port": "https", "transport_protocol": "tcp", "network_protocol": "ipv4", "local_port_num": 57561 }, { "proto": "tcp4", "recv_q": 0, "send_q": 0, "local_address": "mylaptop.local", "foreign_address": "192.0.71.3", "state": "ESTABLISHED", "kind": "network", "local_port": "57525", "foreign_port": "https", "transport_protocol": "tcp", "network_protocol": "ipv4", "local_port_num": 57525 }, ... ]
The netstat
parser has been enhanced to support the -r
(routes) and -i
(interfaces) options on both linux and macOS.
$ jc -p netstat -r [ { "destination": "default", "gateway": "router.local", "route_flags": "UGSc", "route_refs": 102, "use": 24, "iface": "en0", "kind": "route" }, { "destination": "127", "gateway": "localhost", "route_flags": "UCS", "route_refs": 0, "use": 0, "iface": "lo0", "kind": "route" }, ... ]
$ jc -p netstat -i [ { "iface": "lo0", "mtu": 16384, "network": "<Link#1>", "address": null, "ipkts": 1777797, "ierrs": 0, "opkts": 1777797, "oerrs": 0, "coll": 0, "kind": "interface" }, { "iface": "lo0", "mtu": 16384, "network": "127", "address": "localhost", "ipkts": 1777797, "ierrs": null, "opkts": 1777797, "oerrs": null, "coll": null, "kind": "interface" }, { "iface": "lo0", "mtu": 16384, "network": "localhost", "address": "::1", "ipkts": 1777797, "ierrs": null, "opkts": 1777797, "oerrs": null, "coll": null, "kind": "interface" }, ... ]
The stat
command is now supported on macOS.
$ jc -p stat jc* [ { "file": "jc-1.11.1-linux.sha256", "device": "16778221", "inode": 82163627, "flags": "-rw-r--r--", "links": 1, "user": "joeuser", "group": "staff", "rdev": 0, "size": 69, "access_time": "May 26 08:27:44 2020", "modify_time": "May 24 18:47:25 2020", "change_time": "May 24 18:51:21 2020", "birth_time": "May 24 18:47:25 2020", "block_size": 4096, "blocks": 8, "osx_flags": "0" }, { "file": "jc-1.11.1-linux.tar.gz", "device": "16778221", "inode": 82163628, "flags": "-rw-r--r--", "links": 1, "user": "joeuser", "group": "staff", "rdev": 0, "size": 20226936, "access_time": "May 26 08:27:44 2020", "modify_time": "May 24 18:47:25 2020", "change_time": "May 24 18:47:25 2020", "birth_time": "May 24 18:47:25 2020", "block_size": 4096, "blocks": 39512, "osx_flags": "0" }, ... ]
Schema Changes
There are no schema changes in this release.
Full Parser List
airport -I
airport -s
arp
blkid
crontab
crontab-u
CSV
df
dig
dmidecode
du
env
file
free
fstab
/etc/group
/etc/gshadow
history
/etc/hosts
id
ifconfig
INI
iptables
jobs
last
andlastb
ls
lsblk
lsmod
lsof
mount
netstat
ntpq
/etc/passwd
pip list
pip show
ps
route
/etc/shadow
ss
stat
systemctl
systemctl list-jobs
systemctl list-sockets
systemctl list-unit-files
timedatectl
uname -a
uptime
w
who
XML
YAML
For more information on the motivations for creating
jc
, see my blog post.
Happy parsing!