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:
authorMichael Boelen <michael.boelen@cisofy.com>2016-06-18 12:14:01 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-06-18 12:14:01 +0300
commit983e293eb157131ca5e085e4927ea5fc220edc73 (patch)
treecc5e8bea4af5cfa53f57a73d2c61357f47165857 /include/tests_php
parent9c093f7a97fb0b9593a303ef7394c3bc5dea99b2 (diff)
Replaced text strings to allow translations
Diffstat (limited to 'include/tests_php')
-rw-r--r--include/tests_php28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/tests_php b/include/tests_php
index daff864f..685a3165 100644
--- a/include/tests_php
+++ b/include/tests_php
@@ -79,11 +79,11 @@
done
if [ ! "${PHPINIFILE}" = "" ]; then
- Display --indent 2 --text "- Checking PHP" --result "FOUND" --color GREEN
+ Display --indent 2 --text "- Checking PHP" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: using single file ${PHPINIFILE} for main php.ini tests"
LogText "Result: using php.ini array ${PHPINI_ALLFILES} for further tests"
else
- Display --indent 2 --text "- Checking PHP" --result "NOT FOUND" --color WHITE
+ Display --indent 2 --text "- Checking PHP" --result "${STATUS_NOT_FOUND}" --color WHITE
LogText "Result: no php.ini file found"
fi
fi
@@ -116,13 +116,13 @@
done
if [ ${FOUND} -eq 0 ]; then
LogText "Result: all PHP functions can be executed"
- Display --indent 4 --text "- Checking PHP disabled functions" --result "NONE" --color YELLOW
+ Display --indent 4 --text "- Checking PHP disabled functions" --result "${STATUS_NONE}" --color YELLOW
ReportSuggestion ${TEST_NO} "Harden PHP by disabling risky functions"
LogText "Functions of interest to research/disable: chown, diskfreespace, disk_free_space, disk_total_space, dl, exec, escapeshellarg, escapeshellcmd, fileinode, highlight_file, max_execution_time, passthru, pclose, phpinfo, popen, proc_close, proc_open, proc_get_status, proc_nice, proc_open, proc_terminate, set_time_limit, shell_exec, show_source, system)"
AddHP 0 1
else
LogText "Result: one or more PHP functions are disabled/blacklisted"
- Display --indent 4 --text "- Checking PHP disabled functions" --result "FOUND" --color GREEN
+ Display --indent 4 --text "- Checking PHP disabled functions" --result "${STATUS_FOUND}" --color GREEN
AddHP 3 3
fi
fi
@@ -154,13 +154,13 @@
LogText "Test: Checking PHP register_globals option"
FIND=`egrep -i 'register_globals.*(on|yes|1)' ${PHPINIFILE} | grep -v '^;'`
if [ ! "${FIND}" = "" ]; then
- Display --indent 4 --text "- Checking register_globals option" --result WARNING --color RED
+ Display --indent 4 --text "- Checking register_globals option" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "M" "PHP option register_globals option is turned on, which can be a risk for variable value overwriting"
ReportSuggestion ${TEST_NO} "Change the register_globals line to: register_globals = Off"
LogText "Result: register_globals option is turned on, which can be a risk for variable value overwriting."
AddHP 1 2
else
- Display --indent 4 --text "- Checking register_globals option" --result OK --color GREEN
+ Display --indent 4 --text "- Checking register_globals option" --result "${STATUS_OK}" --color GREEN
LogText "Result: No 'register_globals' found. Most likely it is in disabled state (0, no, or off), which is the default nowadays and considered the safe value."
ReportManual ${TEST_NO}:01
AddHP 2 2
@@ -178,13 +178,13 @@
LogText "Test: Checking expose_php option"
FIND=`egrep -i 'expose_php.*(off|no|0)' ${PHPINIFILE} | grep -v '^;'`
if [ "${FIND}" = "" ]; then
- Display --indent 4 --text "- Checking expose_php option" --result ON --color RED
+ Display --indent 4 --text "- Checking expose_php option" --result "${STATUS_ON}" --color RED
ReportWarning ${TEST_NO} "M" "PHP option expose_php is possibly turned on, which can reveal useful information for attackers."
ReportSuggestion ${TEST_NO} "Change the expose_php line to: expose_php = Off"
Report "Result: expose_php option is turned on, which can expose useful information for an attacker"
AddHP 1 2
else
- Display --indent 4 --text "- Checking expose_php option" --result OFF --color GREEN
+ Display --indent 4 --text "- Checking expose_php option" --result "${STATUS_OFF}" --color GREEN
LogText "Result: Found 'expose_php' in disabled state (0, no, or off)"
AddHP 2 2
fi
@@ -202,12 +202,12 @@
LogText "Test: Checking PHP enable_dl option"
FIND=`egrep -i 'enable_dl.*(off|no|0)' ${PHPINIFILE} | grep -v '^;'`
if [ "${FIND}" = "" ]; then
- Display --indent 4 --text "- Checking enable_dl option" --result ON --color YELLOW
+ Display --indent 4 --text "- Checking enable_dl option" --result "${STATUS_ON}" --color YELLOW
Report "Result: enable_dl option is turned on, which can be used for riskful downloads via PHP"
ReportSuggestion ${TEST_NO} "Change the enable_dl line to: enable_dl = Off, to disable downloads via PHP"
AddHP 0 1
else
- Display --indent 4 --text "- Checking enable_dl option" --result OFF --color GREEN
+ Display --indent 4 --text "- Checking enable_dl option" --result "${STATUS_OFF}" --color GREEN
LogText "Result: Found 'enable_dl' in disabled state (0, no, or off)"
AddHP 2 2
fi
@@ -225,12 +225,12 @@
LogText "Test: Checking PHP allow_url_fopen option"
FIND=`egrep -i 'allow_url_fopen.*(off|no|0)' ${PHPINIFILE} | grep -v '^;'`
if [ "${FIND}" = "" ]; then
- Display --indent 4 --text "- Checking allow_url_fopen option" --result ON --color YELLOW
+ Display --indent 4 --text "- Checking allow_url_fopen option" --result "${STATUS_ON}" --color YELLOW
Report "Result: allow_url_fopen option is turned on, which can be used for riskful downloads via PHP"
ReportSuggestion ${TEST_NO} "Change the allow_url_fopen line to: allow_url_fopen = Off, to disable downloads via PHP"
AddHP 0 1
else
- Display --indent 4 --text "- Checking allow_url_fopen option" --result OFF --color GREEN
+ Display --indent 4 --text "- Checking allow_url_fopen option" --result "${STATUS_OFF}" --color GREEN
LogText "Result: Found 'allow_url_fopen' in disabled state (0, no, or off)"
AddHP 2 2
fi
@@ -248,12 +248,12 @@
LogText "Test: Checking PHP allow_url_include option"
FIND=`egrep -i 'allow_url_include.*(off|no|0)' ${PHPINIFILE} | grep -v '^;'`
if [ "${FIND}" = "" ]; then
- Display --indent 4 --text "- Checking allow_url_include option" --result ON --color YELLOW
+ Display --indent 4 --text "- Checking allow_url_include option" --result "${STATUS_ON}" --color YELLOW
Report "Result: allow_url_include option is turned on, which can be used for riskful downloads via PHP"
ReportSuggestion ${TEST_NO} "Change the allow_url_include line to: allow_url_include = Off, to disable downloads via PHP"
AddHP 0 1
else
- Display --indent 4 --text "- Checking allow_url_include option" --result OFF --color GREEN
+ Display --indent 4 --text "- Checking allow_url_include option" --result "${STATUS_OFF}" --color GREEN
LogText "Result: Found 'allow_url_include' in disabled state (0, no, or off)"
AddHP 2 2
fi