From e275c4a937b66905e5e20c56b3b62b70b890eb46 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 24 Apr 2019 14:11:37 +0800 Subject: [PATCH] up --- plugins/op_firewall/ico.png | Bin 344 -> 0 bytes plugins/op_firewall/index.html | 17 ----------------- .../{op_firewall => op_waf}/conf/luawaf.conf | 0 plugins/op_waf/ico.png | Bin 0 -> 2501 bytes plugins/op_waf/index.html | 17 +++++++++++++++++ plugins/{op_firewall => op_waf}/index.py | 3 +++ plugins/{op_firewall => op_waf}/info.json | 6 +++--- plugins/{op_firewall => op_waf}/install.sh | 6 +++--- plugins/op_waf/js/op_waf.js | 16 ++++++++++++++++ plugins/{op_firewall => op_waf}/waf/config.lua | 2 +- plugins/{op_firewall => op_waf}/waf/init.lua | 0 plugins/{op_firewall => op_waf}/waf/waf.lua | 0 .../{op_firewall => op_waf}/waf/wafconf/args | 0 .../waf/wafconf/blockip | 0 .../{op_firewall => op_waf}/waf/wafconf/cookie | 0 .../{op_firewall => op_waf}/waf/wafconf/denycc | 0 .../{op_firewall => op_waf}/waf/wafconf/post | 0 .../waf/wafconf/returnhtml | 0 .../{op_firewall => op_waf}/waf/wafconf/url | 0 .../waf/wafconf/user-agent | 0 .../waf/wafconf/whiteip | 0 .../waf/wafconf/whiteurl | 0 22 files changed, 43 insertions(+), 24 deletions(-) delete mode 100644 plugins/op_firewall/ico.png delete mode 100755 plugins/op_firewall/index.html rename plugins/{op_firewall => op_waf}/conf/luawaf.conf (100%) create mode 100644 plugins/op_waf/ico.png create mode 100755 plugins/op_waf/index.html rename plugins/{op_firewall => op_waf}/index.py (99%) rename plugins/{op_firewall => op_waf}/info.json (77%) rename plugins/{op_firewall => op_waf}/install.sh (80%) create mode 100755 plugins/op_waf/js/op_waf.js rename plugins/{op_firewall => op_waf}/waf/config.lua (90%) rename plugins/{op_firewall => op_waf}/waf/init.lua (100%) rename plugins/{op_firewall => op_waf}/waf/waf.lua (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/args (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/blockip (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/cookie (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/denycc (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/post (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/returnhtml (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/url (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/user-agent (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/whiteip (100%) rename plugins/{op_firewall => op_waf}/waf/wafconf/whiteurl (100%) diff --git a/plugins/op_firewall/ico.png b/plugins/op_firewall/ico.png deleted file mode 100644 index 39d56b20c4e900a33ec16d8f4b5e2d1b4909a512..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 344 zcmeAS@N?(olHy`uVBq!ia0vp^20*OA!3-q(BRicz0s%fDuK)l4_ulSJJTg-~<_Xj* zP!i-9%pmygze~s6wB4(ejAxdIo=N<$@di-txTlL_NX4zUmoM@)EAX^FJk;3K@%iul zGCjkf8cp?9`g^xTGy3S}e)Pyr0c@UQ&=_kb(sTRhtu{Zs% z)#g_}v(sF}vleSdUUr-zcJ@*&cf+p-Kl%CICJL9;*9l8KnIa*1N1DT$W9#}m>;DS1 zrj*C6Y*=yc{+!niFViPJi`821oL+r)+5Xqhti09EtBKF^;mKQDR+}2*M2-tTp8 z!XAdnmC5SA{z=b&ze>Kg`KkN;#0^t_DVtT+GNw;qZ?k00j0Sp%!PC{xWt~$(69BOQ Bk&yrZ 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 0000000000000000000000000000000000000000..55dabc43d782b232437a2efee3bbaa696aa4ec5a GIT binary patch literal 2501 zcmaJ@c|4T+9v-{I$p}TNF-a1$n6V9$n6V5d+gKvE#>|T`W-&9e4M#;nn?m+2OACdT zbIMv-O0MN#6xVW!EG4Qb*>XlFo%_e_zMs$g{+7@4Jm2m4<4trvXsaNnE(ZdE6bN>B zSJ7%9dUa%_Mc-P^HAm5+#6~`VjhkW2`~U284}J2W^ys%Sm-xhjA*}h4TnO$L3ng5^zWp+ zh|UlkivvImVTSq?1QHD~HiaP#k!Ta79>f5FM8Od#I1;6gG{7KCF-Swm_XjG9#-aLS zT=6#FV~I{!XdsWr#=zlWVPUW^6pY0QfFn&!P2mUwxPgJb2%*o7VDiY}`b_Swbp<@Y zrEq9$9*xC>tSOTHSfM;DRFvu8B{0}OWSQLWZ4xyM9!_S%kubzsN$Wr&@&7{^j2~z& z&lUJ5-~TDhB}K3SxGTVAg>opO!TIl63&qCZH~^W);*eOZ;Poy#2eNo9ZXk;d!Qmh} zo-`(v6~^8B4NfFt2uv=I%%lJWJQgYvfYE4Fi~-6BZ-c-Yqb+d=B+}Z%#MsKl)EZ@j zvqIyIZA{SXTs(^s$^e+WbuRTEuE|fiYffOWMUn9Uhjt90+HhD5$hV3yw4di<_*1>_ zT5AK{q~X!tvNSLuS&DCytho7W<8xA~y5@-{Mexar zBy&7;zpnlDDyX|3o&OO5wl7u%)1@{}{_*Zh?hCh!cOCZzhib-|F<9>Gf9_A@ESa45 z84S_5ahvmSK;!bjJqF=Oc0MJyIHtL$%tCl9ORmvu6x%gsoSu5=RlIlYtNtzg?rS-F zJveQqqsTd=mw1PCGWeFsKfqt4B!}$=VNUt*hemTs(b{t{zjV%@_%v$D7Ls(Ka>~1UNpViE z7TleG`D`-<&;A-Ewz98azK{>DxNm+-lHQn-M;be<@)G86Y#krI`R$vQ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000..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