diff --git a/plugins/op_firewall/ico.png b/plugins/op_firewall/ico.png deleted file mode 100644 index 39d56b20c..000000000 Binary files a/plugins/op_firewall/ico.png and /dev/null differ diff --git a/plugins/op_firewall/index.html b/plugins/op_firewall/index.html deleted file mode 100755 index 9832175d1..000000000 --- a/plugins/op_firewall/index.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
-

服务

-

配置设置

-
-
-
-
-
- -
- \ No newline at end of file diff --git a/plugins/op_firewall/conf/luawaf.conf b/plugins/op_waf/conf/luawaf.conf similarity index 100% rename from plugins/op_firewall/conf/luawaf.conf rename to plugins/op_waf/conf/luawaf.conf diff --git a/plugins/op_waf/ico.png b/plugins/op_waf/ico.png new file mode 100644 index 000000000..55dabc43d Binary files /dev/null and b/plugins/op_waf/ico.png differ diff --git a/plugins/op_waf/index.html b/plugins/op_waf/index.html new file mode 100755 index 000000000..344df25aa --- /dev/null +++ b/plugins/op_waf/index.html @@ -0,0 +1,17 @@ +
+
+
+

服务

+

信息

+
+
+
+
+
+ +
+ \ No newline at end of file diff --git a/plugins/op_firewall/index.py b/plugins/op_waf/index.py similarity index 99% rename from plugins/op_firewall/index.py rename to plugins/op_waf/index.py index 519290fc4..4fbd5bd58 100755 --- a/plugins/op_firewall/index.py +++ b/plugins/op_waf/index.py @@ -128,6 +128,9 @@ def reload(): return 'ok' + + + if __name__ == "__main__": func = sys.argv[1] if func == 'status': diff --git a/plugins/op_firewall/info.json b/plugins/op_waf/info.json similarity index 77% rename from plugins/op_firewall/info.json rename to plugins/op_waf/info.json index f28c23d9f..51a5d7b72 100755 --- a/plugins/op_firewall/info.json +++ b/plugins/op_waf/info.json @@ -1,12 +1,12 @@ { "title":"OP防火墙[dev]", "tip":"soft", - "name":"op_firewall", + "name":"op_waf", "type":"其他插件", "ps":"有效防止sql注入/xss/一句话木马等常见渗透攻击", "shell":"install.sh", - "checks":"server/op_firewall", - "path":"server/op_firewall", + "checks":"server/op_waf", + "path":"server/op_waf", "author":"loveshell", "home":"https://github.com/loveshell/ngx_lua_waf", "date":"2019-04-21", diff --git a/plugins/op_firewall/install.sh b/plugins/op_waf/install.sh similarity index 80% rename from plugins/op_firewall/install.sh rename to plugins/op_waf/install.sh index a5a9a5b7a..e4a6e9a97 100755 --- a/plugins/op_firewall/install.sh +++ b/plugins/op_waf/install.sh @@ -14,14 +14,14 @@ install_tmp=${rootPath}/tmp/mw_install.pl Install_of(){ echo '正在安装脚本文件...' > $install_tmp - mkdir -p $serverPath/op_firewall + mkdir -p $serverPath/op_waf - echo '0.1' > $serverPath/op_firewall/version.pl + echo '0.1' > $serverPath/op_waf/version.pl echo 'install ok' > $install_tmp } Uninstall_of(){ - rm -rf $serverPath/op_firewall + rm -rf $serverPath/op_waf } diff --git a/plugins/op_waf/js/op_waf.js b/plugins/op_waf/js/op_waf.js new file mode 100755 index 000000000..e0cba5f83 --- /dev/null +++ b/plugins/op_waf/js/op_waf.js @@ -0,0 +1,16 @@ + +function owPost(method, args, callback){ + var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); + $.post('/plugins/run', {name:'op_waf', func:method, args:JSON.stringify(args)}, function(data) { + layer.close(loadT); + if (!data.status){ + layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']}); + return; + } + + if(typeof(callback) == 'function'){ + callback(data); + } + },'json'); +} + diff --git a/plugins/op_firewall/waf/config.lua b/plugins/op_waf/waf/config.lua similarity index 90% rename from plugins/op_firewall/waf/config.lua rename to plugins/op_waf/waf/config.lua index 56fa0a64b..cb1c91b46 100644 --- a/plugins/op_firewall/waf/config.lua +++ b/plugins/op_waf/waf/config.lua @@ -7,7 +7,7 @@ CookieMatch="off" postMatch="off" whiteModule="on" black_fileExt={"php","jsp"} -ipWhitelist={"127.0.0.1"} +ipWhitelist={"127.0.0.2"} ipBlocklist={"1.0.0.1"} CCDeny="off" CCrate="300/60" diff --git a/plugins/op_firewall/waf/init.lua b/plugins/op_waf/waf/init.lua similarity index 100% rename from plugins/op_firewall/waf/init.lua rename to plugins/op_waf/waf/init.lua diff --git a/plugins/op_firewall/waf/waf.lua b/plugins/op_waf/waf/waf.lua similarity index 100% rename from plugins/op_firewall/waf/waf.lua rename to plugins/op_waf/waf/waf.lua diff --git a/plugins/op_firewall/waf/wafconf/args b/plugins/op_waf/waf/wafconf/args similarity index 100% rename from plugins/op_firewall/waf/wafconf/args rename to plugins/op_waf/waf/wafconf/args diff --git a/plugins/op_firewall/waf/wafconf/blockip b/plugins/op_waf/waf/wafconf/blockip similarity index 100% rename from plugins/op_firewall/waf/wafconf/blockip rename to plugins/op_waf/waf/wafconf/blockip diff --git a/plugins/op_firewall/waf/wafconf/cookie b/plugins/op_waf/waf/wafconf/cookie similarity index 100% rename from plugins/op_firewall/waf/wafconf/cookie rename to plugins/op_waf/waf/wafconf/cookie diff --git a/plugins/op_firewall/waf/wafconf/denycc b/plugins/op_waf/waf/wafconf/denycc similarity index 100% rename from plugins/op_firewall/waf/wafconf/denycc rename to plugins/op_waf/waf/wafconf/denycc diff --git a/plugins/op_firewall/waf/wafconf/post b/plugins/op_waf/waf/wafconf/post similarity index 100% rename from plugins/op_firewall/waf/wafconf/post rename to plugins/op_waf/waf/wafconf/post diff --git a/plugins/op_firewall/waf/wafconf/returnhtml b/plugins/op_waf/waf/wafconf/returnhtml similarity index 100% rename from plugins/op_firewall/waf/wafconf/returnhtml rename to plugins/op_waf/waf/wafconf/returnhtml diff --git a/plugins/op_firewall/waf/wafconf/url b/plugins/op_waf/waf/wafconf/url similarity index 100% rename from plugins/op_firewall/waf/wafconf/url rename to plugins/op_waf/waf/wafconf/url diff --git a/plugins/op_firewall/waf/wafconf/user-agent b/plugins/op_waf/waf/wafconf/user-agent similarity index 100% rename from plugins/op_firewall/waf/wafconf/user-agent rename to plugins/op_waf/waf/wafconf/user-agent diff --git a/plugins/op_firewall/waf/wafconf/whiteip b/plugins/op_waf/waf/wafconf/whiteip similarity index 100% rename from plugins/op_firewall/waf/wafconf/whiteip rename to plugins/op_waf/waf/wafconf/whiteip diff --git a/plugins/op_firewall/waf/wafconf/whiteurl b/plugins/op_waf/waf/wafconf/whiteurl similarity index 100% rename from plugins/op_firewall/waf/wafconf/whiteurl rename to plugins/op_waf/waf/wafconf/whiteurl