diff --git a/README.md b/README.md index b2adfb1..d1f5f49 100644 --- a/README.md +++ b/README.md @@ -15,21 +15,24 @@ Explore a dump (require `jq`): Explore specific entries of a dump: > ./sysdump.sh dump.json uname timezone +# Useful entries +Important note: Depending on the system, some entries may not be available. + +| Entry | Description | +|-----------------------|------------------------------------------------------------------| +| compgen | List all available commands in current shell | +| ping | Check if ping succeed (internet is available) | +| boot_folder | Recursive listing of /boot/ | +| root_folder | Content of / | +| home_folder | Content of $HOME | +| cmd__version | Get the version of some specific commands (e.g: gcc, python etc) | + # Notes - To get available entries see into `sysdump.sh` - Some commands require root permissions. If `sysdump.sh` is not run as root, these commands will not be executed. - -# Useful entries -Important note: Depending on the system, some entries may not be available. - -| Entry | Description | -|-------------|----------------------------------------------| -| compgen | List all available commands in current shell | -| boot_folder | Recursive listing of /boot/ | -| root_folder | Content of / | -| home_folder | Content of $HOME | - - - +- List available entries: +> cat dump.json |grep -o ".*:" +- List available command versions: +> cat dump.json |grep -o "cmd_.*_version" diff --git a/sysdump.sh b/sysdump.sh index f9762ea..4237bc5 100755 --- a/sysdump.sh +++ b/sysdump.sh @@ -111,6 +111,14 @@ dump "lsfd" safecmd lsfd dump "root_folder" safecmd ls -al / dump "glxinfo" safecmd glxinfo -B dump "compgen" safecmd compgen -c +dump "openssl" safecmd openssl +dump "ping" safecmd ping -c 2 -W 2 4.2.2.2 +for cmd in bash gcc ld python3 cmake make tar zip gzip bzip2 xz cpio wget rsync curl node pip apt cat systemctl gpg R ruby awk grep sshfs +do + dump "cmd_${cmd}_version" safecmd $cmd --version +done +dump "cmd_ssh_version" safecmd sshd -V +dump "cmd_tmux_version" safecmd tmux -V # safecmdroot dump "dmidecode" safecmdroot dmidecode dump "iptables" safecmdroot iptables -L