[2] ErrorException in defense.php line 168

fileatime(): stat failed for .htaccess2

  1. header('Content-type: text/html; charset=utf-8');
  2. $ip = $_SERVER['REMOTE_ADDR'];//获取当前访问者的ip
  3. $logFilePath = './log/';//日志记录文件保存目录
  4. $fileht = '.htaccess2';//被禁止的ip记录文件
  5. $allowtime = 10;//防刷新时间 在提示“警告:不要刷新的太频繁”之后 5秒后重置计算时间
  6. $allownum = 15;//防刷新次数
  7. $allowRefresh = 20;//在允许刷新次数之后加入禁止ip文件中 在提示“警告:不要刷新的太频繁”之后 5秒后可刷新的次数,超过则加入黑名单
  8. //删除不是当天的文件
  9. if(date('d',fileatime($fileht)) != date('d',time())){
  10. @unlink($fileht);
  11. }
  12. if (!file_exists($fileht)) {
  13. file_put_contents($fileht, '');
  14. }
  15. $filehtarr = @file($fileht);
  16. if (in_array($ip . "\r\n", $filehtarr)) {
  17. exit(ip_pape('警告:由于您的访问方式存在攻击性行为,今天之内网站已禁止您的访问!如有疑问,请联系网站管理员。'));

Call Stack

  1. in defense.php line 168
  2. at Error::appError(2, 'fileatime(): stat fa...', '/data/wwwroot/www.ki...', 168, ['file' => '/data/wwwroot/www.ki...', 'name' => 'database', 'range' => '_sys_', ...])
  3. at fileatime('.htaccess2') in defense.php line 168
  4. at require_once('/data/wwwroot/www.ki...') in database.php line 6
  5. at include('/data/wwwroot/www.ki...') in database.php line 13
  6. at include('/data/wwwroot/www.ki...') in Config.php line 65
  7. at Config::load('/data/wwwroot/www.ki...', 'database') in App.php line 505
  8. at App::init() in App.php line 439
  9. at App::initCommon() in App.php line 75
  10. at App::run() in index.php line 61

Exception Datas

Error Context
file
/data/wwwroot/www.kingfa.com/en/../app/database.php
name
database
range
_sys_
type
php
webscan_switch
1
webscan_post
1
webscan_get
1
webscan_cookie
1
webscan_referre
1
webscan_white_directory
admin|\/data\/
webscan_white_url
{ "index.php": "m=admin", "post.php": "job=postnew&step=post", "edit_space_info.php": "" }
getfilter
\<.+javascript:window\[.{1}\\x|<.*=(&#\d+?;?)+?>|<.*(data|src)=data:text\/html.*>|\b(alert\(|confirm\(|expression\(|prompt\(|benchmark\s*?\(.*\)|sleep\s*?\(.*\)|\b(group_)?concat[\s\/\*]*?\([^\)]+?\)|\bcase[\s\/\*]*?when[\s\/\*]*?\([^\)]+?\)|load_file\s*?\()|<[a-z]+?\b[^>]*?\bon([a-z]{4,})\s*?=|^\+\/v(8|9)|\b(and|or)\b\s*?([\(\)'"\d]+?=[\(\)'"\d]+?|[\(\)'"a-zA-Z]+?=[\(\)'"a-zA-Z]+?|>|<|\s+?[\w]+?\s+?\bin\b\s*?\(|\blike\b\s+?["'])|\/\*.*\*\/|<\s*script\b|\bEXEC\b|UNION.+?SELECT\s*(\(.+\)\s*|@{1,2}.+?\s*|\s+?.+?|(`|'|").*?(`|'|")\s*)|UPDATE\s*(\(.+\)\s*|@{1,2}.+?\s*|\s+?.+?|(`|'|").*?(`|'|")\s*)SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE)@{0,2}(\(.+\)|\s+?.+?\s+?|(`|'|").*?(`|'|"))FROM(\(.+\)|\s+?.+?|(`|'|").*?(`|'|"))|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)|<\s*iframe\b
postfilter
<.*=(&#\d+?;?)+?>|<.*data=data:text\/html.*>|\b(alert\(|confirm\(|expression\(|prompt\(|benchmark\s*?\(.*\)|sleep\s*?\(.*\)|\b(group_)?concat[\s\/\*]*?\([^\)]+?\)|\bcase[\s\/\*]*?when[\s\/\*]*?\([^\)]+?\)|load_file\s*?\()|<[^>]*?\b(onerror|onmousemove|onload|onclick|onmouseover)\b|\b(and|or)\b\s*?([\(\)'"\d]+?=[\(\)'"\d]+?|[\(\)'"a-zA-Z]+?=[\(\)'"a-zA-Z]+?|>|<|\s+?[\w]+?\s+?\bin\b\s*?\(|\blike\b\s+?["'])|\/\*.*\*\/|<\s*script\b|\bEXEC\b|UNION.+?SELECT\s*(\(.+\)\s*|@{1,2}.+?\s*|\s+?.+?|(`|'|").*?(`|'|")\s*)|UPDATE\s*(\(.+\)\s*|@{1,2}.+?\s*|\s+?.+?|(`|'|").*?(`|'|")\s*)SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE)(\(.+\)|\s+?.+?\s+?|(`|'|").*?(`|'|"))FROM(\(.+\)|\s+?.+?|(`|'|").*?(`|'|"))|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)|<\s*iframe\b
cookiefilter
benchmark\s*?\(.*\)|sleep\s*?\(.*\)|load_file\s*?\(|\b(and|or)\b\s*?([\(\)'"\d]+?=[\(\)'"\d]+?|[\(\)'"a-zA-Z]+?=[\(\)'"a-zA-Z]+?|>|<|\s+?[\w]+?\s+?\bin\b\s*?\(|\blike\b\s+?["'])|\/\*.*\*\/|<\s*script\b|\bEXEC\b|UNION.+?SELECT\s*(\(.+\)\s*|@{1,2}.+?\s*|\s+?.+?|(`|'|").*?(`|'|")\s*)|UPDATE\s*(\(.+\)\s*|@{1,2}.+?\s*|\s+?.+?|(`|'|").*?(`|'|")\s*)SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE)@{0,2}(\(.+\)|\s+?.+?\s+?|(`|'|").*?(`|'|"))FROM(\(.+\)|\s+?.+?|(`|'|").*?(`|'|"))|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)|<\s*iframe\b
webscan_referer
[]
ip
120.76.16.232
logFilePath
./log/
fileht
.htaccess2
allowtime
10
allownum
15
allowRefresh
20

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

TEMP
/tmp
TMPDIR
/tmp
TMP
/tmp
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
proxy-nokeepalive
1
HTTP_HOST
www.kingfa.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_X_TRUE_IP
175.29.3.55
HTTP_X_REAL_IP
175.29.3.55
HTTP_WEB_SERVER_TYPE
nginx
HTTP_WL_PROXY_CLIENT_IP
175.29.3.55
HTTP_X_FORWARDED_FOR
175.29.3.55
HTTP_X_FORWARDED_PROTO
http
HTTP_X_FORWARDED_CLUSTER
waf,
HTTP_EAGLEEYE_TRACEID
784c10e815905501096293821eb9f4
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_EAGLEEYE_RPCID
0.1
LD_LIBRARY_PATH
/usr/local/apache/lib
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
www.kingfa.com
SERVER_ADDR
172.18.0.75
SERVER_PORT
80
REMOTE_ADDR
120.76.16.232
DOCUMENT_ROOT
/data/wwwroot/www.kingfa.com
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/data/wwwroot/www.kingfa.com
SERVER_ADMIN
admin@example.com
SCRIPT_FILENAME
/data/wwwroot/www.kingfa.com/en/index.php
REMOTE_PORT
29810
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/en/
SCRIPT_NAME
/en/index.php
PHP_SELF
/en/index.php
REQUEST_TIME_FLOAT
1590550109.6343
REQUEST_TIME
1590550109
Environment Variables
empty

ThinkPHP Constants

APP_DEBUG
false
CMF_ROOT
/data/wwwroot/www.kingfa.com/en/../
SITE_ID
2
APP_PATH
/data/wwwroot/www.kingfa.com/en/../app/
CMF_PATH
/data/wwwroot/www.kingfa.com/en/../simplewind/cmf/
PLUGINS_PATH
/data/wwwroot/www.kingfa.com/en/plugins/
EXTEND_PATH
/data/wwwroot/www.kingfa.com/en/../simplewind/extend/
VENDOR_PATH
/data/wwwroot/www.kingfa.com/en/../simplewind/vendor/
RUNTIME_PATH
/data/wwwroot/www.kingfa.com/en/../data/runtime/
THINKCMF_VERSION
5.0.170927
SO
is_top DESC,list_order DESC,published_time DESC,post_id DESC
GSO
is_top DESC,category_relate.list_order DESC,published_time DESC,goods_id DESC
TMPLSO
order:is_top DESC,list_order DESC,published_time DESC,post_id DESC;
TMPLGSO
order:is_top DESC,category_relate.list_order DESC,published_time DESC,goods_id DESC;
WEB_ROOT
/data/wwwroot/www.kingfa.com/en/
THINK_VERSION
5.0.11
THINK_START_TIME
1590550109.6345
THINK_START_MEM
241048
EXT
.php
DS
/
THINK_PATH
/data/wwwroot/www.kingfa.com/simplewind/thinkphp/
LIB_PATH
/data/wwwroot/www.kingfa.com/simplewind/thinkphp/library/
CORE_PATH
/data/wwwroot/www.kingfa.com/simplewind/thinkphp/library/think/
TRAIT_PATH
/data/wwwroot/www.kingfa.com/simplewind/thinkphp/library/traits/
ROOT_PATH
/data/wwwroot/www.kingfa.com/
LOG_PATH
/data/wwwroot/www.kingfa.com/en/../data/runtime/log/
CACHE_PATH
/data/wwwroot/www.kingfa.com/en/../data/runtime/cache/
TEMP_PATH
/data/wwwroot/www.kingfa.com/en/../data/runtime/temp/
CONF_PATH
/data/wwwroot/www.kingfa.com/en/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/data/wwwroot/www.kingfa.com/simplewind/vendor/ezyang/htmlpurifier/library
QINIU_FUNCTIONS_VERSION
7.2.1