diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py index 9dafdf829..9fd0f0c7a 100755 --- a/plugins/op_waf/index.py +++ b/plugins/op_waf/index.py @@ -365,6 +365,23 @@ def getSiteConfig(): return public.returnJson(True, 'ok!', content) +def getSiteConfigByName(): + args = getArgs() + data = checkArgs(args, ['siteName']) + if not data[0]: + return data[1] + path = getJsonPath('site') + content = public.readFile(path) + content = json.loads(content) + + siteName = args['siteName'] + retData = {} + if siteName in content: + retData = content[siteName] + + return public.returnJson(True, 'ok!', retData) + + def getLogsList(): args = getArgs() data = checkArgs(args, ['siteName']) @@ -472,6 +489,8 @@ if __name__ == "__main__": print saveScanRule() elif func == 'get_site_config': print getSiteConfig() + elif func == 'get_site_config_byname': + print getSiteConfigByName() elif func == 'get_logs_list': print getLogsList() elif func == 'get_safe_logs': diff --git a/plugins/op_waf/js/op_waf.js b/plugins/op_waf/js/op_waf.js index d9e96681c..2d385d840 100755 --- a/plugins/op_waf/js/op_waf.js +++ b/plugins/op_waf/js/op_waf.js @@ -1122,17 +1122,6 @@ function siteWafConfig(siteName, type) { \ 规则\ \ - \ - 禁止国外访问\ - '+ rdata.top.drop_abroad.ps + '\ - \ -
\ - \ - \ -
\ - \ - 设置\ - \ \ 常见扫描器'+ rdata.top.scan.ps + '\ \ @@ -1196,12 +1185,6 @@ function siteWafConfig(siteName, type) {   --\ 设置\ \ - \ - CMS专用过滤\ - 为特定CMS提供的过滤规则\ -   --\ - 设置\ - \ \ \ \ @@ -1229,7 +1212,7 @@ function wafSite(){ console.log(k,v); i += 1; tbody += '\ - ' + k + '\ + ' + k + '\ \ ' + v.total[1].value + '\ \