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:
authormboelen <michael@cisofy.com>2014-09-21 15:04:36 +0400
committermboelen <michael@cisofy.com>2014-09-21 15:04:36 +0400
commitabcf438ee15860276f52fee67d3c2234bfcd1ed0 (patch)
tree3542614b5a88679e0ed246651bee176e6cbc4b4d
parent47678ffeaa077d2b07f1bad0a77771e1a0356835 (diff)
Added warning when log is empty in pentest mode
-rwxr-xr-xlynis22
1 files changed, 16 insertions, 6 deletions
diff --git a/lynis b/lynis
index 4a2f1798..b4cacc37 100755
--- a/lynis
+++ b/lynis
@@ -156,7 +156,9 @@
# Disable logging if no alternative was provided
if [ ${PENTESTINGMODE} -eq 1 ]; then
- if [ "${LOGFILE}" = "" ]; then LOGFILE="/dev/null"; fi
+ if [ "${LOGFILE}" = "" ]; then
+ LOGFILE="/dev/null"
+ fi
if [ "${REPORTFILE}" = "" ]; then REPORTFILE="/dev/null"; fi
fi
#
@@ -280,18 +282,26 @@
fi
if [ ${PENTESTINGMODE} -eq 1 ]; then
+ echo ""; echo ""
echo "${WHITE}"
echo " #########################################################"
+ echo " # #"
echo " # ${PURPLE}Pentesting mode (non-privileged)${WHITE} #"
+ echo " # #"
echo " #########################################################"
echo "${NORMAL}"
- echo " ${CYAN}NOTES:${NORMAL}"
+ echo " ${YELLOW}NOTES:${NORMAL}"
echo " --------------"
- echo " ${RED}*${NORMAL} Some tests will be skipped (requires root permissions)"
- echo " ${RED}*${NORMAL} Some tests might fail silently or give different results"
- echo " ${RED}*${NORMAL} This mode is preferred for pentests only (not full audit)"
- echo " ${RED}*${NORMAL} Logging capabilities might be limited"
+ echo " ${WHITE}*${NORMAL} This mode is suitable for pentests only (not full audit)"
+ echo " ${WHITE}*${NORMAL} Some tests will be skipped (as they require root permissions)"
+ echo " ${WHITE}*${NORMAL} Some tests might fail silently or give different results"
echo ""
+ if [ "${LOGFILE}" = "" -o "${LOGFILE}" = "/dev/null" ]; then
+ echo " ${RED}Warning:${NORMAL}"
+ echo " ${WHITE}*${NORMAL} No suggestions or warnings will be displayed in report"
+ echo " (Reason is missing log file)"
+ echo ""
+ fi
echo " ${WHITE}Press [ENTER] to continue or [CTRL] + C to break${NORMAL}"
echo ""
echo " #########################################################"