Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/parameters31
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=""