pull/144/head
midoks 3 years ago
parent 4cd2ce1746
commit 8668c6e668
  1. 54
      plugins/op_waf/waf/lua/init.lua
  2. 10
      plugins/php/versions/common/openssl.sh

@ -186,33 +186,33 @@ function waf_user_agent()
return false return false
end end
-- function cc() function cc()
-- local ip = params['ip'] local ip = params['ip']
-- local request_uri = params['request_uri'] local request_uri = params['request_uri']
-- local endtime = config['cc']['endtime'] local endtime = config['cc']['endtime']
-- if not config['cc']['open'] or not site_cc then return false end if not config['cc']['open'] or not site_cc then return false end
-- local token = ngx.md5(ip .. '_' .. request_uri) local token = ngx.md5(ip .. '_' .. request_uri)
-- local count,_ = ngx.shared.limit:get(token) local count,_ = ngx.shared.limit:get(token)
-- if count then if count then
-- if count > limit then if count > limit then
-- local safe_count,_ = ngx.shared.drop_sum:get(ip) local safe_count,_ = ngx.shared.drop_sum:get(ip)
-- if not safe_count then if not safe_count then
-- ngx.shared.drop_sum:set(ip,1,86400) ngx.shared.drop_sum:set(ip,1,86400)
-- safe_count = 1 safe_count = 1
-- else else
-- ngx.shared.drop_sum:incr(ip,1) ngx.shared.drop_sum:incr(ip,1)
-- end end
-- local lock_time = (endtime * safe_count) local lock_time = (endtime * safe_count)
-- if lock_time > 86400 then lock_time = 86400 end if lock_time > 86400 then lock_time = 86400 end
-- ngx.shared.drop_ip:set(ip,retry+1,lock_time) ngx.shared.drop_ip:set(ip,retry+1,lock_time)
-- C:write_log('cc',cycle..'秒内累计超过'..limit..'次请求,封锁' .. lock_time .. '秒') C:write_log('cc',cycle..'秒内累计超过'..limit..'次请求,封锁' .. lock_time .. '')
-- C:write_drop_ip('cc',lock_time) C:write_drop_ip('cc',lock_time)
-- if not server_name then if not server_name then
-- insert_ip_list(ip,lock_time,os.time(),'1111') insert_ip_list(ip,lock_time,os.time(),'1111')
-- else else
-- insert_ip_list(ip,lock_time,os.time(),server_name) insert_ip_list(ip,lock_time,os.time(),server_name)
-- end end
-- ngx.exit(config['cc']['status']) -- ngx.exit(config['cc']['status'])
-- return true -- return true

@ -41,9 +41,8 @@ Install_lib()
return return
fi fi
if [ "$version" -ge "70" ];then # cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh if [ "$version" -lt "70" ];then
else
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh
fi fi
@ -59,9 +58,8 @@ Install_lib()
mv config0.m4 config.m4 mv config0.m4 config.m4
fi fi
if [ "$version" -ge "70" ];then openssl_version=`pkg-config openssl --modversion`
export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig if [ "$version" -lt "70" ];then
else
export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig
fi fi

Loading…
Cancel
Save