diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py
index c5bd1634a..fd9579fbb 100755
--- a/plugins/op_waf/index.py
+++ b/plugins/op_waf/index.py
@@ -225,6 +225,7 @@ def initTotalInfo():
_name[name] = tmp
total_contents['sites'] = _name
+ total_contents['start_time'] = str(time.time())
cjson = mw.getJson(total_contents)
mw.writeFile(path_total, cjson)
diff --git a/plugins/op_waf/js/op_waf.js b/plugins/op_waf/js/op_waf.js
index 1e635df7d..af858b296 100755
--- a/plugins/op_waf/js/op_waf.js
+++ b/plugins/op_waf/js/op_waf.js
@@ -961,8 +961,12 @@ function wafScreen(){
owPost('waf_srceen', {}, function(data){
var rdata = $.parseJSON(data.data);
+ var end_time = Date.now();
+ var cos_time = (end_time/1000) - parseInt(rdata['start_time']);
+ var cos_day = parseInt(parseInt(cos_time)/86400);
+
var con = '
总拦截'+rdata.total+'次
';
- con += '安全防护0天
';
+ con += '安全防护'+cos_day+'天
';
con += '\
POST渗透'+rdata.rules.post+'
\
diff --git a/plugins/op_waf/waf/lua/init.lua b/plugins/op_waf/waf/lua/init.lua
index 37304a42b..c76fa2f52 100644
--- a/plugins/op_waf/waf/lua/init.lua
+++ b/plugins/op_waf/waf/lua/init.lua
@@ -533,41 +533,62 @@ end
function waf()
min_route()
+ -- C:D("min_route")
-- white ip
if waf_ip_white() then return true end
+ -- C:D("waf_ip_white")
+
-- url white
if waf_url_white() then return true end
+ -- C:D("waf_url_white")
+
-- black ip
if waf_ip_black() then return true end
+ -- C:D("waf_ip_black")
+
-- 封禁ip返回
if waf_drop_ip() then return true end
+
+ -- C:D("waf_ip_black")
-- ua check
if waf_user_agent() then return true end
+ -- C:D("waf_user_agent")
if waf_url() then return true end
+ -- C:D("waf_url")
-- cc setting
if waf_cc_increase() then return true end
+ -- C:D("waf_cc_increase")
if waf_cc() then return true end
+ -- C:D("waf_cc")
-- cookie检查
if waf_cookie() then return true end
+ -- C:D("waf_cookie")
-- args参数拦截
if waf_get_args() then return true end
+ -- C:D("waf_get_args")
-- 扫描软件禁止
if waf_scan_black() then return true end
+ -- C:D("waf_scan_black")
if waf_post() then return true end
+ -- C:D("waf_post")
if site_config[server_name] and site_config[server_name]['open'] then
if X_Forwarded() then return true end
+ -- C:D("X_Forwarded")
if post_X_Forwarded() then return true end
+ -- C:D("post_X_Forwarded")
if url_ext() then return true end
+ -- C:D("url_ext")
if post_data() then return true end
+ -- C:D("post_data")
end
end
diff --git a/plugins/op_waf/waf/rule/ip_white.json b/plugins/op_waf/waf/rule/ip_white.json
index 2fae3655e..49d826931 100755
--- a/plugins/op_waf/waf/rule/ip_white.json
+++ b/plugins/op_waf/waf/rule/ip_white.json
@@ -1 +1 @@
-[[[127, 0, 0, 1], [127, 0, 0, 255]]]
\ No newline at end of file
+[[[127,0,0,254], [127, 0, 0, 255]]]
\ No newline at end of file