From b8b3a237effb3c8b2803a03b3d68d2e052cbdb3c Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 9 Oct 2022 01:37:14 +0800 Subject: [PATCH] up --- plugins/op_waf/index.py | 5 +++-- plugins/op_waf/js/op_waf.js | 4 ++-- plugins/op_waf/t/index.py | 15 ++++++++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py index 3e729405f..e309ae40f 100755 --- a/plugins/op_waf/index.py +++ b/plugins/op_waf/index.py @@ -806,7 +806,7 @@ def getLogsList(): return data[1] data = [] - path = mw.getLogsDir() + '/waf' + path = getServerDir() + '/logs' if not os.path.exists(path): return mw.returnJson(False, '还未生成!', []) @@ -829,7 +829,8 @@ def getSafeLogs(): if not data[0]: return data[1] - path = mw.getLogsDir() + '/waf' + path = getServerDir() + '/logs' + file = path + '/' + args['siteName'] + '_' + args['toDate'] + '.log' if not os.path.exists(file): return mw.returnJson(False, "文件不存在!") diff --git a/plugins/op_waf/js/op_waf.js b/plugins/op_waf/js/op_waf.js index d12fde0c9..fff5729d9 100755 --- a/plugins/op_waf/js/op_waf.js +++ b/plugins/op_waf/js/op_waf.js @@ -826,8 +826,8 @@ function wafScreen(){
Cookie渗透'+rdata.rules.cookie+'
\
恶意扫描0
\
恶意HEAD请求0
\ -
URI自定义拦截0
\ -
URI保护0
\ +
URI自定义拦截'+rdata.rules.args+'
\ +
URI保护'+rdata.rules.args+'
\
恶意文件上传0
\
禁止的扩展名0
\
禁止PHP脚本0
\ diff --git a/plugins/op_waf/t/index.py b/plugins/op_waf/t/index.py index b0cccb57a..ef324c1ff 100644 --- a/plugins/op_waf/t/index.py +++ b/plugins/op_waf/t/index.py @@ -7,13 +7,18 @@ import time import json -TEST_URL = "t1.cn" +TEST_URL = "http://t1.cn/" def run(): - print('op lua run ok') + url = TEST_URL + '?t=../etc/passwd' + print("args test start") + + print("args test end") + + +def test_start(): + if __name__ == "__main__": - if len(sys.argv) > 1: - if action == "run": - run() + test_start()