Added warning when log is empty in pentest mode

This commit is contained in:
mboelen 2014-09-21 13:04:36 +02:00
parent 47678ffeaa
commit abcf438ee1
1 changed files with 16 additions and 6 deletions

22
lynis
View File

@ -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 " #########################################################"