From 65ae455f380f17acddbb65dbabf0e5c9933c941e Mon Sep 17 00:00:00 2001 From: zhangwq Date: Sun, 4 Nov 2018 15:36:53 +0800 Subject: [PATCH] =?UTF-8?q?BGP=E3=80=81DNS=E3=80=81SSL=E3=80=81HTTP?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=BA=90?= =?UTF-8?q?/=E7=9B=AE=E7=9A=84IP=E3=80=81=E5=85=B3=E9=94=AE=E5=AD=97?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AD=97=E6=AE=B5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/configuration/CfgIndexInfo.java | 8 +++ .../nis/web/dao/configuration/BgpCfgDao.xml | 21 ++++--- .../web/dao/configuration/WebsiteCfgDao.xml | 56 +++++++++---------- .../resources/messages/message_en.properties | 6 +- .../resources/messages/message_ru.properties | 6 +- .../messages/message_zh_CN.properties | 6 +- .../WEB-INF/views/cfg/other/bgpList.jsp | 13 +++-- .../WEB-INF/views/cfg/website/dnsList.jsp | 13 +++-- .../WEB-INF/views/cfg/website/httpList.jsp | 24 ++++++-- .../WEB-INF/views/cfg/website/sslList.jsp | 13 +++-- .../views/cfg/whitelist/domainList.jsp | 4 -- 11 files changed, 107 insertions(+), 63 deletions(-) diff --git a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java index c78f7e138..ef7117371 100644 --- a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java +++ b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java @@ -72,6 +72,8 @@ public class CfgIndexInfo extends BaseCfg { private List p2pKeywordList; private Integer sourceCompileId; + private String searchKeywords;// 列表关键字查询字段 + public Integer getSourceCompileId() { return sourceCompileId; } @@ -323,5 +325,11 @@ public class CfgIndexInfo extends BaseCfg { public void setIndexTable(String indexTable) { this.indexTable = indexTable; } + public String getSearchKeywords() { + return searchKeywords; + } + public void setSearchKeywords(String searchKeywords) { + this.searchKeywords = searchKeywords; + } } diff --git a/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml index 2553b3695..d57e62943 100644 --- a/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml @@ -254,15 +254,15 @@ AND a.compile_id in (select t.compile_id from ip_port_cfg t - and t.function_id=#{(functionId,jdbcType=Integer} + and t.function_id=#{functionId,jdbcType=INTEGER} - and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR} + and t.src_ip_address =#{ipPort.srcIpAddress,jdbcType=VARCHAR} and t.src_port =#{ipPort.srcPort,jdbcType=VARCHAR} - and t.dest_ip_address =#{(ipPort.destIpAddress,jdbcType=VARCHAR} + and t.dest_ip_address =#{ipPort.destIpAddress,jdbcType=VARCHAR} and t.dest_port =#{ipPort.destPort,jdbcType=VARCHAR} @@ -270,16 +270,15 @@ ) - + + ) + ${sqlMap.dsf} diff --git a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml index 8eea1a49c..4f138b2ff 100644 --- a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml @@ -248,30 +248,43 @@ ) - AND a.compile_id in (select i.compile_id from intercept_pkt_bin i + AND a.compile_id in (SELECT i.compile_id FROM intercept_pkt_bin i - REPLACE(i.cfg_keywords,'***and***','|') like concat(concat('%',#{interceptPktBin.cfgKeywords,jdbcType=VARCHAR}),'%') + REPLACE(i.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{interceptPktBin.cfgKeywords,jdbcType=VARCHAR}),'%') + + + ) + + + AND a.compile_id in (SELECT d.compile_id FROM dns_domain_cfg d WHERE + d.cfg_keywords LIKE concat(concat('%',#{searchKeywords,jdbcType=VARCHAR}),'%') + ) + + + AND a.compile_id in (SELECT s.compile_id FROM ssl_keyword_cfg s + + + REPLACE(s.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{sslCfg.cfgKeywords,jdbcType=VARCHAR}),'%') ) - AND a.compile_id in (select f.compile_id from http_url_cfg f + AND a.compile_id in (SELECT f.compile_id FROM http_url_cfg f - and f.cfg_keywords like concat(concat('%',#{httpUrl.cfgKeywords,jdbcType=VARCHAR}),'%') + REPLACE(f.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{httpUrl.cfgKeywords,jdbcType=VARCHAR}),'%') - - + ) AND a.compile_id in (select f.compile_id from http_body_cfg f - and cfg_type='http_req_body' + and cfg_type='NTC_HTTP_REQ_BODY' - and f.cfg_keywords like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%') + and REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%') @@ -280,9 +293,9 @@ AND a.compile_id in (select f.compile_id from http_body_cfg f - and cfg_type='http_res_body' + and cfg_type='NTC_HTTP_RES_BODY' - and f.cfg_keywords like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%') + and REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%') @@ -292,35 +305,20 @@ AND a.compile_id in (select f.compile_id from http_req_head_cfg f - and f.cfg_keywords like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%') + REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%') - - and f.district like concat(concat('%',#{httpReqHdr.district,jdbcType=VARCHAR}),'%') - - + ) AND a.compile_id in (select f.compile_id from http_res_head_cfg f - and f.cfg_keywords like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%') + REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%') - - and f.district like concat(concat('%',#{httpResHdr.district,jdbcType=VARCHAR}),'%') - - + ) - ${sqlMap.dsf} diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 0c3fce7f0..9decd368e 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1317,4 +1317,8 @@ encap_type=Encap Type link_id=Link Id inner_smac=Inner SMAC inner_dmac=Inner DMAC -ethernet=Ethernet \ No newline at end of file +ethernet=Ethernet +http_req_body_keywords=Request Body Keyword +http_res_body_keywords=Response Body Keyword +http_req_hdr_keywords=Request Header Keyword +http_res_hdr_keywords=Response Header Keyword \ No newline at end of file diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index 061993684..90317c425 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -1306,4 +1306,8 @@ default_request=Default Letter default_value=Default Value unkown_error=Unkown Error Infomation exception_info=Exception Infomation -no_tc_udp_port_comment_tip=Port must between 0 \ No newline at end of file +no_tc_udp_port_comment_tip=Port must between 0 +http_req_body_keywords=Request Body Keyword +http_res_body_keywords=Response Body Keyword +http_req_hdr_keywords=Request Header Keyword +http_res_hdr_keywords=Response Header Keyword \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index a4ab59e31..47bd8b679 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1307,4 +1307,8 @@ encap_type=\u539F\u59CB\u4E8C\u5C42\u5C01\u88C5\u683C\u5F0F link_id=\u4E32\u8054\u8BBE\u5907\u94FE\u8DEF\u53F7 inner_smac=\u5185\u5C42\u6E90MAC inner_dmac=\u5185\u5C42\u76EE\u6807MAC -ethernet=\u4EE5\u592A\u7F51 \ No newline at end of file +ethernet=\u4EE5\u592A\u7F51 +http_req_body_keywords=\u8BF7\u6C42\u5185\u5BB9\u5173\u952E\u5B57 +http_res_body_keywords=\u5E94\u7B54\u5185\u5BB9\u5173\u952E\u5B57 +http_req_hdr_keywords=\u8BF7\u6C42\u5934\u57DF\u5173\u952E\u5B57 +http_res_hdr_keywords=\u5E94\u7B54\u5934\u57DF\u5173\u952E\u5B57 \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp index 4085d4b0d..e6abc9a97 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp @@ -11,6 +11,12 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.compileId}"){ $("#intype").val("${cfg.compileId}"); + }else if("${cfg.ipPort.srcIpAddress}"){ + $("#intype").val("${cfg.ipPort.srcIpAddress}"); + }else if("${cfg.ipPort.destIpAddress}"){ + $("#intype").val("${cfg.ipPort.destIpAddress}"); + }else if("${cfg.ntcBgpAsCfg.cfgKeywords}"){ + $("#intype").val("${cfg.ntcBgpAsCfg.cfgKeywords}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -151,10 +157,9 @@ - <%-- - - - --%> + + + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp index f2509bc73..ad72fbdf4 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -11,6 +11,12 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.compileId}"){ $("#intype").val("${cfg.compileId}"); + }else if("${cfg.ipPort.srcIpAddress}"){ + $("#intype").val("${cfg.ipPort.srcIpAddress}"); + }else if("${cfg.ipPort.destIpAddress}"){ + $("#intype").val("${cfg.ipPort.destIpAddress}"); + }else if("${cfg.searchKeywords}"){ + $("#intype").val("${cfg.searchKeywords}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -149,10 +155,9 @@ - <%-- - - - --%> + + + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp index 25294e0cb..76928c6a2 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp @@ -11,6 +11,18 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.compileId}"){ $("#intype").val("${cfg.compileId}"); + }else if("${cfg.ipPort.srcIpAddress}"){ + $("#intype").val("${cfg.ipPort.srcIpAddress}"); + }else if("${cfg.ipPort.destIpAddress}"){ + $("#intype").val("${cfg.ipPort.destIpAddress}"); + }else if("${cfg.httpReqHdr.cfgKeywords}"){ + $("#intype").val("${cfg.httpReqHdr.cfgKeywords}"); + }else if("${cfg.httpResHdr.cfgKeywords}"){ + $("#intype").val("${cfg.httpResHdr.cfgKeywords}"); + }else if("${cfg.httpReqBody.cfgKeywords}"){ + $("#intype").val("${cfg.httpReqBody.cfgKeywords}"); + }else if("${cfg.httpResBody.cfgKeywords}"){ + $("#intype").val("${cfg.httpResBody.cfgKeywords}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -294,10 +306,14 @@ - <%-- - - - --%> + + + + + + + + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp index 04a5c199e..113700a08 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp @@ -11,6 +11,12 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.compileId}"){ $("#intype").val("${cfg.compileId}"); + }else if("${cfg.ipPort.srcIpAddress}"){ + $("#intype").val("${cfg.ipPort.srcIpAddress}"); + }else if("${cfg.ipPort.destIpAddress}"){ + $("#intype").val("${cfg.ipPort.destIpAddress}"); + }else if("${cfg.sslCfg.cfgKeywords}"){ + $("#intype").val("${cfg.sslCfg.cfgKeywords}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -148,10 +154,9 @@ - <%-- - - - --%> + + + diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp index 46ccd72ac..a101d8b01 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -135,10 +135,6 @@ - <%-- - - - --%>