curl POST请求相关策略修改

This commit is contained in:
hebingning
2021-02-04 19:54:18 +08:00
parent 08a4f2d7cf
commit 43085fde2c
18 changed files with 66 additions and 55 deletions

View File

@@ -485,7 +485,7 @@ Proxy-Policy-deny-00016
${addItemList} Create List ${objectId1} ${addItemList} Create List ${objectId1}
${objectDict1} Create Dictionary objectType=url isValid=${1} subObjectIds=${addItemList} ${objectDict1} Create Dictionary objectType=url isValid=${1} subObjectIds=${addItemList}
${rescode} ${objectId2} AddObjects ${1} ${objectDict1} ${rescode} ${objectId2} AddObjects ${1} ${objectDict1}
Comment #创建引用文件 Comment 创建引用文件
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
${profiledId} Get From Dictionary ${response} profileId ${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略 Comment Comment 创建拦截策略
@@ -513,7 +513,7 @@ Proxy-Policy-deny-00017
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*action ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent

View File

@@ -36,16 +36,16 @@ SecurityPolicy-Intercept-Http-00001
SecurityPolicy-Intercept-Http-00002 SecurityPolicy-Intercept-Http-00002
[Tags] cat右匹配 [Tags] cat右匹配
Comment 创建cat Comment 创建fqdn
# ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*nerdacy.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$mbzponton.org
# ${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建安全策略 Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Http-00002 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=109|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Http-00002 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=109|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict} log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId} ${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0] ${policyId} Set Variable ${policyId}[0]
#insert_policyId_to_file1 intercept_http_objectId1 ${objectId} insert_policyId_to_file1 intercept_http_objectId6 ${objectId}
insert_policyId_to_file1 intercept_http_policyId1 ${policyId} insert_policyId_to_file1 intercept_http_policyId1 ${policyId}
SecurityPolicy-Intercept-Http-00003 SecurityPolicy-Intercept-Http-00003

View File

@@ -249,12 +249,12 @@ SecurityPolicy-Monitor-Http-00013
insert_policyId_to_file1 monitor_http_policyId12 ${policyId} insert_policyId_to_file1 monitor_http_policyId12 ${policyId}
SecurityPolicy-Monitor-Http-00014 SecurityPolicy-Monitor-Http-00014
[Tags] 请求体字串匹配 update :请求体 [Tags] 请求体字串匹配 update policy:请求体
Comment 创建请求体 Comment 创建请求体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=zxcvb ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=monitortest141
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建请求体 Comment 创建请求体2
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=monitortest14 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=monitortest142
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建安全策略 Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Http-00014 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID} ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Http-00014 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
@@ -290,7 +290,7 @@ SecurityPolicy-Monitor-Http-00016
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*action ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
@@ -299,7 +299,7 @@ SecurityPolicy-Monitor-Http-00016
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
Comment 创建请求体 Comment 创建请求体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=mkiolp ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=monitorHttp0016
${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict}
Comment 创建安全策略 Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Http-00016 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"HTTP"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID} ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Http-00016 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"HTTP"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}

View File

@@ -405,13 +405,13 @@ Proxy-Policy-redirect-00014
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=action ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node
${rescode} ${objectId2} AddObject2 ${1} ${objectDict} ${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建请求体 Comment 创建请求体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=lksdf ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=testredirect0014001
${rescode} ${objectId3} AddObject2 ${1} ${objectDict} ${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
Comment 创建请求体2 Comment 创建请求体2
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=testredirect0014 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=testredirect0014002
${rescode} ${objectId4} AddObject2 ${1} ${objectDict} ${rescode} ${objectId4} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略 Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
@@ -439,7 +439,7 @@ Proxy-Policy-redirect-00015
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*action ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node.com
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
@@ -448,7 +448,7 @@ Proxy-Policy-redirect-00015
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
Comment 创建请求体 Comment 创建请求体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=tyuiop ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=testredirect0015
${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict}
Comment 创建redirect策略 Comment 创建redirect策略
${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00015 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"http://www.iceo.com.cn/renwu2013/","code":302,"protocol":"HTTP"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID} ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00015 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"http://www.iceo.com.cn/renwu2013/","code":302,"protocol":"HTTP"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}

View File

@@ -199,26 +199,26 @@ Proxy-Policy-deny-00014
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Not Found ... ELSE Create List Connection was reset
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略 Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_policyId13} policyName=Proxy-Policy-deny-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId54}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID} ${policyDict} Create Dictionary policyId=${deny_policyId13} policyName=Proxy-Policy-deny-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId54}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict} log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update ${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014_1.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=denyTest0014&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"denyTest0014","setcook":"12345678","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Not Found ... ELSE Create List Connection was reset
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-deny-00015 Proxy-Policy-deny-00015
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=12345678&contentType=content-type&resBody=ASDFG" http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"lkjh","setcook":"qeqew","contenttype": "content-type","responsebody": "ASDFG"}" http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Not Found ... ELSE Create List Connection was reset
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略 Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_policyId14} policyName=Proxy-Policy-deny-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId55}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID} ${policyDict} Create Dictionary policyId=${deny_policyId14} policyName=Proxy-Policy-deny-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId55}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
@@ -226,9 +226,9 @@ Proxy-Policy-deny-00015
${rescode} UpdatePolicies 1 ${policyDict} v2 update ${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=12345678&contentType=content-type&resBody=deny015" http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"lkjh","setcook":"qeqew","contenttype": "content-type","responsebody": "deny015"}" http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Not Found ... ELSE Create List Connection was reset
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-deny-00016 Proxy-Policy-deny-00016
@@ -245,7 +245,7 @@ Proxy-Policy-deny-00016
Proxy-Policy-deny-00017 Proxy-Policy-deny-00017
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00016.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00016.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=mnbv&setCookie=asdf&contentType=content-type&resBody=adzx" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"mnbv","setcook":"asdf","contenttype": "content-type","responsebody": "adzx"}" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found ${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found
... ELSE Create List Not Found ... ELSE Create List Not Found
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -181,19 +181,18 @@ SecurityPolicy-Monitor-Http-00013
SecurityPolicy-Monitor-Http-00014 SecurityPolicy-Monitor-Http-00014
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00014.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00014.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=zxcvb&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"monitortest141","setcook":"monitortest141","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com/go | iconv -f utf-8 -t gbk
${stringlist} run keyword if '${systemType}'=='Windows' Create List zxcvb ${stringlist} run keyword if '${systemType}'=='Windows' Create List monitortest141
... ELSE Create List zxcvb ... ELSE Create List monitortest141
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变监控策略 Comment 改变监控策略
${policyDict} Create Dictionary policyId=${monitor_http_policyId13} policyName=SecurityPolicy-Monitor-Http-00014-1 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"HTTP"} filterList=${monitor_http_objectId38}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID} ${policyDict} Create Dictionary policyId=${monitor_http_policyId13} policyName=SecurityPolicy-Monitor-Http-00014-1 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"HTTP"} filterList=${monitor_http_objectId38}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict} log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update ${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00014.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00014_1.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=monitortest14&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"monitortest142","setcook":"monitortest142","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com/go | iconv -f utf-8 -t gbk
${stringlist} run keyword if '${systemType}'=='Windows' Create List monitortest14 ${stringlist} run keyword if '${systemType}'=='Windows' Create List monitortest142
... ELSE Create List monitortest14 ... ELSE Create List monitortest142
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Monitor-Http-00015 SecurityPolicy-Monitor-Http-00015
@@ -216,9 +215,9 @@ SecurityPolicy-Monitor-Http-00015
SecurityPolicy-Monitor-Http-00016 SecurityPolicy-Monitor-Http-00016
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00016.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00016.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=mkiolp&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"monitorHttp0016\",\"setcook\":\"monitortest142\",\"contenttype\": \"content-type\",\"responsebody\": \"monitorHttp0016\"}" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List mkiolp ${stringlist} run keyword if '${systemType}'=='Windows' Create List monitorHttp0016
... ELSE Create List mkiolp ... ELSE Create List monitorHttp0016
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Monitor-Http-00017 SecurityPolicy-Monitor-Http-00017

View File

@@ -197,7 +197,7 @@ Proxy-Policy-redirect-00013
Proxy-Policy-redirect-00014 Proxy-Policy-redirect-00014
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00014.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00014.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lksdf&setCookie=kjhsxbn&contentType=content-type&resBody=opijn" -kv \ http://open.node.com/go ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"testredirect0014001","setcook":"monitortest142","contenttype": "content-type","responsebody": "testredirect0014001"}" -kv http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/
... ELSE Create List http://www.iceo.com.cn/renwu2013/ ... ELSE Create List http://www.iceo.com.cn/renwu2013/
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -207,7 +207,7 @@ Proxy-Policy-redirect-00014
${rescode} UpdatePolicies 1 ${policyDict} v2 update ${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00014.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00014.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=testredirect0014&setCookie=kjhsxbn&contentType=content-type&resBody=opijn" -kv \ http://open.node.com/go ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"testredirect0014002","setcook":"monitortest142","contenttype": "content-type","responsebody": "testredirect0014002"}" -kv http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/
... ELSE Create List http://www.iceo.com.cn/renwu2013/ ... ELSE Create List http://www.iceo.com.cn/renwu2013/
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -215,7 +215,7 @@ Proxy-Policy-redirect-00014
Proxy-Policy-redirect-00015 Proxy-Policy-redirect-00015
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00015.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00015.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "reqBody=tyuiop&contentType=content-type&resBody=adzx" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"testredirect0015\",\"setcook\":\"monitortest142\",\"contenttype\": \"content-type\",\"responsebody\": \"testredirect0014002\"}" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/
... ELSE Create List http://www.iceo.com.cn/renwu2013/ ... ELSE Create List http://www.iceo.com.cn/renwu2013/
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -25,7 +25,7 @@ SecurityPolicy-Intercept-Http-00001
SecurityPolicy-Intercept-Http-00002 SecurityPolicy-Intercept-Http-00002
#删除对象 #删除对象
#${objectids} set Variable ${intercept_http_objectId1} ${objectids} set Variable ${intercept_http_objectId6}
#删除策略 #删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_http_policyId1}]} ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_http_policyId1}]}
${s} Convert to String ${intercept_http_policyId1} ${s} Convert to String ${intercept_http_policyId1}

View File

@@ -1,6 +1 @@
curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"1234567\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"Response Body\"}" http://open.node.com/go | iconv -f utf-8 -t gbk curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"1234567\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"Response Body\"}" http://open.node.com/go | iconv -f utf-8 -t gbk
curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action

View File

@@ -0,0 +1 @@
curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"denyTest0014\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"Response Body\"}" http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -1 +1,4 @@
curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=qeqew&contentType=content-type&resBody=ASDFG" http://open.node.com/action | iconv -f utf-8 -t gbk curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"lkjh\",\"setcook\":\"qeqew\",\"contenttype\": \"content-type\",\"responsebody\": \"ASDFG\"}" http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1,4 @@
curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"lkjh\",\"setcook\":\"qeqew\",\"contenttype\": \"content-type\",\"responsebody\": \"deny015\"}" http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -2,3 +2,6 @@ curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody

View File

@@ -1 +1 @@
curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lksdf&setCookie=kjhsxbn&contentType=content-type&resBody=opijn" -kv http://open.node.com/go | iconv -f utf-8 -t gbk curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"testredirect0014001\",\"setcook\":\"monitortest142\",\"contenttype\": \"content-type\",\"responsebody\": \"testredirect0014001\"}" -kv http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"testredirect0014002\",\"setcook\":\"monitortest142\",\"contenttype\": \"content-type\",\"responsebody\": \"testredirect0014002\"}" -kv http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=zxcvb&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action | iconv -f utf-8 -t gbk curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"monitortest141\",\"setcook\":\"monitortest141\",\"contenttype\": \"content-type\",\"responsebody\": \"Response Body\"}" http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"monitortest142\",\"setcook\":\"monitortest142\",\"contenttype\": \"content-type\",\"responsebody\": \"Response Body\"}" http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -1 +1,5 @@
curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=mkiolp&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action | iconv -f utf-8 -t gbk curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"monitorHttp0016\",\"setcook\":\"monitortest142\",\"contenttype\": \"content-type\",\"responsebody\": \"monitorHttp0016\"}" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go | iconv -f utf-8 -t gbk