diff --git a/include/parameters b/include/parameters index 7b7c1f8e..2c68a23c 100644 --- a/include/parameters +++ b/include/parameters @@ -22,7 +22,8 @@ # Check number of parameters submitted (at least one is needed) PARAMCOUNT=$# while [ $# -ge 1 ]; do - case $1 in + + case $1 in # Assign auditor to report --auditor) @@ -46,9 +47,16 @@ # Perform tests with additional debugging information on screen --debug) - DEBUG=1 + DEBUG=1 ;; + --dump-options | --dumpoptions) + OPTIONS="--auditor --check-all_(-c) --cronjob --debug --help --info --license-key --log-file --manpage --no-colors --no-log --pentest --profile --plugins-dir --quiet --quick --report-file --reverse-colors --tests --tests-category --upload --version --view-categories" + for I in ${OPTIONS}; do + echo "${I}" + done + ExitClean + ;; # View help --help | -h) VIEWHELP=1 @@ -72,7 +80,7 @@ ;; # Don't use colors - --no-colors) + --no-colors | --nocolors) NORMAL=""; WARNING=""; SECTION=""; NOTICE=""; OK=""; BAD=""; CYAN=""; MAGENTA=""; PURPLE=""; YELLOW=""; WHITE=""; GREEN=""; RED="" ;; @@ -92,7 +100,7 @@ ;; # Define a custom plugin directory - --plugin-dir) + --plugin-dir | --plugins-dir) shift PLUGINDIR=$1 LASTCHAR=`echo $1 | awk '{ print substr($0, length($0))}'` @@ -118,6 +126,11 @@ QUICKMODE=1 ;; + --report-file) + shift + REPORTFILE=$1 + ;; + # Strip the colors which aren't clearly visible on light backgrounds --reverse-colors) #NORMAL=""; @@ -162,7 +175,7 @@ ;; # View man page - --view-manpage | --man) + --view-manpage | --man | --manpage) if [ -f lynis.8 ]; then nroff -man lynis.8 exit 0 @@ -180,8 +193,8 @@ WRONGOPTION_value=$1 ;; - esac - shift + esac + shift done