diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-14 16:44:06 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-14 16:44:06 +0300 |
commit | 08bad0ffbfe70f7a38a9efc6423bc8a8bb4a3a9c (patch) | |
tree | 4bc5e974c5dc2f2d84580aad999b2b26219f93eb /include/parameters | |
parent | 93074a89ea41657e04dc9d784f204ef169479692 (diff) |
Initial support for remote scanning with: lynis audit system remote
Diffstat (limited to 'include/parameters')
-rw-r--r-- | include/parameters | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/include/parameters b/include/parameters index 206e29a4..7b939aa4 100644 --- a/include/parameters +++ b/include/parameters @@ -38,7 +38,7 @@ "dockerfile") if [ "$3" = "" ]; then echo "${RED}Error: ${WHITE}Missing file name or URL${NORMAL}" - echo "Example: lynis audit dockerfile /root/Dockerfile" + echo "Example: $0 audit dockerfile /root/Dockerfile" ExitFatal else shift; shift @@ -48,6 +48,35 @@ fi ;; "system") + if [ "$3" = "remote" ]; then + shift + if [ "$3" = "" ]; then + echo "${RED}Error: ${WHITE}Missing remote location${NORMAL}" + echo "Example: $0 audit system remote 192.168.1.100" + ExitFatal + else + REMOTE_TARGET="$3" + shift; shift; shift # shift out first three arguments + EXTRA_PARAMS="" + if [ ! "$1" = "" ]; then EXTRA_PARAMS=" $@"; fi + # --quick is added to be non-interactive + REMOTE_COMMAND="./lynis audit system --quick${EXTRA_PARAMS}" + echo "" + echo " How to perform a remote scan:" + echo " =============================" + echo " Target : ${REMOTE_TARGET}" + echo " Command : ${REMOTE_COMMAND}" + HELPER="system_remote_scan" + HELPER_PARAMS="$@" + CHECK_BINARIES=0 + QUIET=1 + RUN_HELPERS=1 + RUN_PLUGINS=0 + RUN_TESTS=0 + SHOW_PROGRAM_DETAILS=0 + break + fi + fi CHECK=1 CHECK_BINARIES=1 HELPER="" |