应对策略之间相互影响bug做出的用例修改

This commit is contained in:
hebingning
2021-02-22 10:43:44 +08:00
parent bb8df7b30f
commit eb9884f8c8
40 changed files with 497 additions and 171 deletions

View File

@@ -120,7 +120,7 @@ SecurityPolicy-Deny-Http-00008
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008.bat
... ELSE set variable curl http://www.cmbchina.com/CmbQuesInfo/index.aspx
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略
@@ -130,7 +130,7 @@ SecurityPolicy-Deny-Http-00008
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008.bat
... ELSE set variable curl http://www.cmbchina.com/CmbQuesInfo/index.aspx
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Http-00009
@@ -204,25 +204,32 @@ SecurityPolicy-Deny-Http-00014
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"testDenyHttp0014","setcook":"12345678","contenttype": "content-type","responsebody": "testDenyHttp0014"}" http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List Timed out
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_http_policyId13} policyName=SecurityPolicy-Deny-Http-00014_1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} filterList=${deny_http_objectId40}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 10
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014.bat
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014_1.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"biubiubiud","setcook":"12345678","contenttype": "content-type","responsebody": "biubiubiud"}" http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
sleep 5
Comment 用后失效
${policyDict} Create Dictionary policyId=${deny_http_policyId13} policyName=SecurityPolicy-Deny-Http-00014_1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} filterList=${deny_http_objectId40}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
SecurityPolicy-Deny-Http-00015
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00015.bat
... ELSE set variable curl http://www.huatonggs.com/about.html#gsjj
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_http_policyId14} policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId41}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
@@ -231,31 +238,33 @@ SecurityPolicy-Deny-Http-00015
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00015.bat
... ELSE set variable curl http://www.huatonggs.com/about.html#gsjj
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Http-00016
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00016.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"DenyHttp0016","setcook":"asdf","contenttype": "charsetDeny0016","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 000
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List 000
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 失效阻断策略,高优先级策略存在相同网址使用情况时候应在使用之后将策略失效
${policyDict} Create Dictionary policyId=${deny_http_policyId15} policyName=SecurityPolicy-Deny-Http-00016 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId23}|TSG_FIELD_HTTP_HOST,${deny_http_objectId24}|TSG_FIELD_HTTP_URL,${deny_http_objectId25}|TSG_FIELD_HTTP_REQ_HDR,${deny_http_objectId26}|TSG_FIELD_HTTP_RES_HDR,${deny_http_objectId27}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
SecurityPolicy-Deny-Http-00017
Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00017.bat
# ... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://smspunch.net/send-free-sms.aspx -w %{http_code}
# sleep 3
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00017.bat
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://smspunch.net/send-free-sms.aspx -w %{http_code}
sleep 3
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00017.bat
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://smspunch.net/send-free-sms.aspx -w %{http_code}
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
sleep 5
SecurityPolicy-Deny-Http-00018
Comment 功能端验证HTTP验证