From ced78b52b0f757821b88d9a0c04bcf9a1f83b914 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 14 Jul 2019 15:11:45 +0200 Subject: Small markup changes --- include/report | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'include/report') diff --git a/include/report b/include/report index 2df666e4..88d75ce0 100644 --- a/include/report +++ b/include/report @@ -22,8 +22,7 @@ # ################################################################################# # - - # Add data fields to report file + # Add additional data fields to the report file at the end of the scan Report "dhcp_client_running=${DHCP_CLIENT_RUNNING}" Report "arpwatch_running=${ARPWATCH_RUNNING}" @@ -37,10 +36,11 @@ Report "package_audit_tool=${PACKAGE_AUDIT_TOOL}" Report "package_audit_tool_found=${PACKAGE_AUDIT_TOOL_FOUND}" Report "vulnerable_packages_found=${VULNERABLE_PACKAGES_FOUND}" - - +# +################################################################################# +# # Hardening Index - + # # Goal: # Provide a visual way to show how much the system is hardened # @@ -95,8 +95,9 @@ HPGRAPH="[${HPCOLOR}${HPBLOCKS}${NORMAL}${HPEMPTY}]" LogText "Hardening index : [${HPINDEX}] [${HPBLOCKS}${HPEMPTY}]" LogText "Hardening strength: ${HIDESCRIPTION}" - - +# +################################################################################# +# # Only show overview if not running in quiet mode if [ ${QUIET} -eq 0 ]; then echo ""; echo "================================================================================" @@ -108,19 +109,14 @@ LogTextBreak - # - ################################################################################# - # # Show test results overview - # - ################################################################################# - # - if [ "${CONTROL_URL_PROTOCOL}" = "" ]; then CONTROL_URL_PROTOCOL="https"; fi - if [ "${CONTROL_URL_PREPEND}" = "" ]; then CONTROL_URL_PREPEND="cisofy.com/lynis/controls/"; fi - if [ "${CONTROL_URL_APPEND}" = "" ]; then CONTROL_URL_APPEND="/"; fi - if [ "${CUSTOM_URL_PROTOCOL}" = "" ]; then CUSTOM_URL_PROTOCOL="https"; fi - if [ "${CUSTOM_URL_PREPEND}" = "" ]; then CUSTOM_URL_PREPEND="your-domain.example.org/controls/"; fi - if [ "${CUSTOM_URL_APPEND}" = "" ]; then CUSTOM_URL_APPEND="/"; fi + + if [ -z "${CONTROL_URL_PROTOCOL}" ]; then CONTROL_URL_PROTOCOL="https"; fi + if [ -z "${CONTROL_URL_PREPEND}" ]; then CONTROL_URL_PREPEND="cisofy.com/lynis/controls/"; fi + if [ -z "${CONTROL_URL_APPEND}" ]; then CONTROL_URL_APPEND="/"; fi + if [ -z "${CUSTOM_URL_PROTOCOL}" ]; then CUSTOM_URL_PROTOCOL="https"; fi + if [ -z "${CUSTOM_URL_PREPEND}" ]; then CUSTOM_URL_PREPEND="your-domain.example.org/controls/"; fi + if [ -z "${CUSTOM_URL_APPEND}" ]; then CUSTOM_URL_APPEND="/"; fi # Show warnings from logfile SWARNINGS=$(${GREPBINARY} 'Warning: ' ${LOGFILE} | sed 's/ /!space!/g') @@ -249,7 +245,7 @@ if [ ! "${PROGRAM_LV}" = "0" -a ! "${REPORTFILE}" = "" -a ! "${REPORTFILE}" = "/dev/null" ]; then # Determine if the quality of the program can be increased by filtering out the exceptions FIND=$(${GREPBINARY} "^exception" ${REPORTFILE}) - if [ ! "${FIND}" = "" ]; then + if [ -n "${FIND}" ]; then echo "" echo " ${RED}${NOTE_EXCEPTIONS_FOUND}${NORMAL}" echo " ${WHITE}${NOTE_EXCEPTIONS_FOUND_DETAILED}!${NORMAL}" -- cgit v1.2.3