Added 'show eol' command

This commit is contained in:
Michael Boelen 2019-03-04 12:33:25 +01:00
parent f7a291a62f
commit ff6446a5bc
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 13 additions and 1 deletions

View File

@ -32,13 +32,14 @@ COMMANDS="audit configure show update upload-only"
HELPERS="audit configure show update" HELPERS="audit configure show update"
OPTIONS="--auditor\n--cronjob (--cron)\n--debug\n--developer\n--help (-h)\n--license-key\n--log-file\n--manpage (--man)\n--no-colors\n--no-log\n--pentest\n--profile\n--plugin-dir\n--quick (-Q)\n--quiet (-q)\n--report-file\n--reverse-colors\n--skip-plugins\n--tests\n--tests-from-category\n--tests-from-group\n--upload\n--verbose\n--version (-V)\n--wait\n--warnings-only" OPTIONS="--auditor\n--cronjob (--cron)\n--debug\n--developer\n--help (-h)\n--license-key\n--log-file\n--manpage (--man)\n--no-colors\n--no-log\n--pentest\n--profile\n--plugin-dir\n--quick (-Q)\n--quiet (-q)\n--report-file\n--reverse-colors\n--skip-plugins\n--tests\n--tests-from-category\n--tests-from-group\n--upload\n--verbose\n--version (-V)\n--wait\n--warnings-only"
SHOW_ARGS="categories changelog commands dbdir details environment groups help hostids includedir language license logfile man options os pidfile plugindir profiles release releasedate report settings tests version workdir" SHOW_ARGS="categories changelog commands dbdir details environment eol 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) SHOW_HELP="lynis show ${BROWN}categories${NORMAL} (display test categories)
lynis show ${BROWN}changelog${NORMAL} ${GRAY}[version]${NORMAL} (release details) lynis show ${BROWN}changelog${NORMAL} ${GRAY}[version]${NORMAL} (release details)
lynis show ${BROWN}commands${NORMAL} (all available commands) lynis show ${BROWN}commands${NORMAL} (all available commands)
lynis show ${BROWN}dbdir${NORMAL} (database directory) lynis show ${BROWN}dbdir${NORMAL} (database directory)
lynis show ${BROWN}details${NORMAL} (display test details from log file) lynis show ${BROWN}details${NORMAL} (display test details from log file)
lynis show ${BROWN}environment${NORMAL} (hardware, virtual machine, or container type) lynis show ${BROWN}environment${NORMAL} (hardware, virtual machine, or container type)
lynis show ${BROWN}eol${NORMAL} (OS end-of-life status)
lynis show ${BROWN}groups${NORMAL} (test groups) lynis show ${BROWN}groups${NORMAL} (test groups)
lynis show ${BROWN}help${NORMAL} (detailed information about arguments) lynis show ${BROWN}help${NORMAL} (detailed information about arguments)
lynis show ${BROWN}hostids${NORMAL} (unique IDs for this system) lynis show ${BROWN}hostids${NORMAL} (unique IDs for this system)
@ -242,6 +243,17 @@ if [ $# -gt 0 ]; then
${ECHOCMD} "virtual-machine=0" ${ECHOCMD} "virtual-machine=0"
fi fi
;; ;;
"eol")
if [ ${EOL} -eq 0 ]; then
${ECHOCMD} "OS end-of-life: No"
elif [ ${EOL} -eq 1 ]; then
${ECHOCMD} "OS end-of-life: Yes"
elif [ ${EOL} -eq 255 ]; then
${ECHOCMD} "OS end-of-life: Not tested"
else
${ECHOCMD} "OS end-of-life: Unknown"
fi
;;
"groups") "groups")
ViewGroups ViewGroups
;; ;;