diff options
author | mboelen <michael@cisofy.com> | 2014-09-21 15:04:36 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-21 15:04:36 +0400 |
commit | abcf438ee15860276f52fee67d3c2234bfcd1ed0 (patch) | |
tree | 3542614b5a88679e0ed246651bee176e6cbc4b4d | |
parent | 47678ffeaa077d2b07f1bad0a77771e1a0356835 (diff) |
Added warning when log is empty in pentest mode
-rwxr-xr-x | lynis | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -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 " #########################################################" |