From c0e63699e5d6206bc02bee5dd40ed7f813d3fc8f Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 16 Oct 2016 12:01:33 +0200 Subject: Added 'lynis show os' command and detection improvement --- include/helper_show | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/helper_show') diff --git a/include/helper_show b/include/helper_show index 35fac0aa..b5151807 100644 --- a/include/helper_show +++ b/include/helper_show @@ -32,7 +32,7 @@ COMMANDS="audit show update upload-only" HELPERS="audit configure show update" OPTIONS="--auditor\n--check-all (-c)\n--config\n--cronjob (--cron)\n--debug\n--developer\n--help (-h)\n--license-key\n--log-file\n--manpage (--man)\n--no-colors --no-log\n--pentest\n--profile\n--plugins-dir\n--quiet (-q)\n--quick (-Q)\n--report-file\n--reverse-colors\n--tests\n--tests-from-category\n--tests-from-group\n--upload\n--verbose\n--version (-V)\n--wait" -SHOW_ARGS="categories changelog commands dbdir details groups help hostids includedir language license logfile man options pidfile plugindir profiles release releasedate report settings tests version workdir" +SHOW_ARGS="categories changelog commands dbdir details groups help hostids includedir language license logfile man options os pidfile plugindir profiles release releasedate report settings tests version workdir" SHOW_HELP="lynis show ${BROWN}categories${NORMAL} (display test categories) lynis show ${BROWN}changelog${NORMAL} ${GRAY}[version]${NORMAL} (release details) lynis show ${BROWN}commands${NORMAL} (all available commands) @@ -47,6 +47,7 @@ lynis show ${BROWN}license${NORMAL} (license details) lynis show ${BROWN}logfile${NORMAL} (location of logfile) lynis show ${BROWN}man${NORMAL} (show help) lynis show ${BROWN}options${NORMAL} (available flags and options) +lynis show ${BROWN}os${NORMAL} (operating system and version) lynis show ${BROWN}pidfile${NORMAL} (active file to stored process ID) lynis show ${BROWN}plugindir${NORMAL} (directory with plugins) lynis show ${BROWN}profiles${NORMAL} (discovered profiles) @@ -270,6 +271,12 @@ if [ $# -gt 0 ]; then "logfile") ${ECHOCMD} "${LOGFILE}" ;; "man") ${ECHOCMD} "Use ./lynis --man or man lynis" ;; "options") ${ECHOCMD} "${OPTIONS}" ;; + "os") + ${ECHOCMD} "OS=${OS}" + ${ECHOCMD} "OS_NAME=${OS_NAME}" + ${ECHOCMD} "OS_FULLNAME=${OS_FULLNAME}" + ${ECHOCMD} "OS_VERSION=${OS_VERSION}" + ;; "pidfile") ${ECHOCMD} "${PIDFILE}" ;; "profile" | "profiles") for I in ${PROFILES}; do ${ECHOCMD} ${I}; done ;; "profiledir") ${ECHOCMD} "${PROFILEDIR}" ;; -- cgit v1.2.3