From 6f2466a1319eaa4256ae7a2a0f23b3ff37882d37 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sat, 29 Feb 2020 11:56:12 -0800 Subject: [PATCH] update readme with /etc/passwd and /etc/shadow file parsers --- README.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/README.md b/README.md index f85a7b68..56f68c6e 100755 --- a/README.md +++ b/README.md @@ -108,10 +108,12 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `--lsof` enables the `lsof` command parser - `--mount` enables the `mount` command parser - `--netstat` enables the `netstat` command parser +- `--passwd` enables the `/etc/passwd` file parser - `--pip-list` enables the `pip list` command parser - `--pip-show` enables the `pip show` command parser - `--ps` enables the `ps` command parser - `--route` enables the `route` command parser +- `--shadow` enables the `/etc/shadow` file parser - `--ss` enables the `ss` command parser - `--stat` enables the `stat` command parser - `--systemctl` enables the `systemctl` command parser @@ -1371,6 +1373,40 @@ $ sudo netstat -apee | jc --netstat -p # or: sudo jc -p netstat -apee ... ] ``` +### /etc/passwd file +``` +$ cat /etc/passwd | jc --passwd -p +[ + { + "username": "nobody", + "password": "*", + "uid": -2, + "gid": -2, + "comment": "Unprivileged User", + "home": "/var/empty", + "shell": "/usr/bin/false" + }, + { + "username": "root", + "password": "*", + "uid": 0, + "gid": 0, + "comment": "System Administrator", + "home": "/var/root", + "shell": "/bin/sh" + }, + { + "username": "daemon", + "password": "*", + "uid": 1, + "gid": 1, + "comment": "System Services", + "home": "/var/root", + "shell": "/usr/bin/false" + }, + ... +] +``` ### pip list ``` $ pip list | jc --pip-list -p # or: jc -p pip list # or: jc -p pip3 list @@ -1548,6 +1584,43 @@ $ route -ee | jc --route -p # or: jc -p route -ee } ] ``` +### /etc/shadow file +``` +$ sudo cat /etc/shadow | jc --shadow -p +[ + { + "username": "root", + "password": "*", + "last_changed": 18113, + "minimum": 0, + "maximum": 99999, + "warn": 7, + "inactive": null, + "expire": null + }, + { + "username": "daemon", + "password": "*", + "last_changed": 18113, + "minimum": 0, + "maximum": 99999, + "warn": 7, + "inactive": null, + "expire": null + }, + { + "username": "bin", + "password": "*", + "last_changed": 18113, + "minimum": 0, + "maximum": 99999, + "warn": 7, + "inactive": null, + "expire": null + }, + ... +] +``` ### ss ``` $ sudo ss -a | jc --ss -p # or: sudo jc -p ss -a