billing:secure_26072021

Отключение PHP функций

С версии 3.09.01 в php отключаются следующие функции:

apache_child_terminate
apache_note
apache_setenv
assert
base64_decode
call_user_func
call_user_func_array
chgrp
chown
closelog
create_function
curl_multi_exec
debugger_off
debugger_on
define_syslog_variables
define_syslog_variables
diskfreespace
dl
extract
ftp_exec
ftp_get
ftp_nb_fput
ftp_raw
ftp_rawlist
get_cfg_var
get_current_user
getenv
getlastmo
getmygid
getmyinode
getmyuid
highlight_file
imap_open
ini_alter
ini_restore
inject_code
mail
openlog
parse_ini_file
parse_ini_string
passthru
pcntl_exec
pfsockopen
phpAds_XmlRpc
phpAds_remoteInfo
phpAds_xmlrpcDecode
phpAds_xmlrpcEncode
phpinfo
posix_getlogin
posix_getpwuid
posix_getpwuid
posix_mkfifo
posix_setegid
posix_setgid
posix_setpgid
posix_setpgid
posix_setuid
posix_ttyname
posix_uname
proc_nice
proc_terminate
putenv
shell_exec
show_source
stream_select
symlink
syslog
xmlrpc_decode
xmlrpc_encode
xmlrpc_entity_decode
xmlrpc_get_type
xmlrpc_is_fault
xmlrpc_set_type
#!/bin/bash

backup_name=$(date +%F_%H-%M)
for php_ini_file in $(find /etc -type f -name "php.ini")
do
	if [ -f "${php_ini_file}" ]; then
		echo "replace $php_ini_file"
		sed -e '/^[^;]*disable_functions/s/=.*$/= shell_exec,proc_terminate,pcntl_exec,passthru,proc_nice,dl,show_source,apache_note,apache_setenv,debugger_off,debugger_on,closelog,define_syslog_variables,ini_restore,openlog,syslog,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_uname,posix_setgid,posix_setuid,posix_setegid,posix_getpwuid,posix_setpgid,mail,apache_child_terminate,chgrp,chown,curl_multi_exec,define_syslog_variables,highlight_file,parse_ini_string,stream_select,imap_open,xmlrpc_entity_decode,inject_code,ini_alter,xmlrpc_encode,xmlrpc_decode,xmlrpc_get_type,xmlrpc_is_fault,xmlrpc_set_type,phpAds_remoteInfo,phpAds_XmlRpc,phpAds_xmlrpcDecode,phpAds_xmlrpcEncode,ftp_exec,ftp_get,ftp_nb_fput,ftp_raw,ftp_rawlist,symlink,assert,create_function,phpinfo,posix_ttyname,getenv,posix_getlogin,get_current_user,get_cfg_var,diskfreespace,getlastmo,getmygid,getmyinode,getmyuid,extract,putenv,pfsockopen,base64_decode,parse_ini_file,call_user_func_array,call_user_func/' -i.${backup_name} ${php_ini_file}
	fi
done
  • billing/secure_26072021.txt
  • Последнее изменение: 16 мес. назад
  • Александр Дудяк