为在Linux下运行全流程做出修改

This commit is contained in:
hebingning
2021-04-20 10:37:27 +08:00
parent 0fa575a563
commit d0d44bb45e
26 changed files with 954 additions and 1518 deletions

View File

@@ -26,7 +26,7 @@ SecurityPolicy-Deny-Http-00001
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00001.bat
... ELSE set variable curl -m 10 http://www.lkong.net/forum.php
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection was reset
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Http-00002
@@ -119,7 +119,7 @@ SecurityPolicy-Deny-Http-00007
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 -m 10 http://www.cmbchina.com/CmbQuesInfo/index.aspx
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -130,7 +130,7 @@ SecurityPolicy-Deny-Http-00008
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008.bat
... ELSE set variable curl -m 10 http://www.cmbchina.com/CmbQuesInfo/index.aspx
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -184,27 +184,27 @@ SecurityPolicy-Deny-Http-00012
SecurityPolicy-Deny-Http-00013
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -w %{http_code} www.ziroom.com/life/index -o /dev/null
... ELSE set variable curl --connect-timeout 5 -m 10 www.ziroom.com/life/index -o /dev/null
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013_1.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -w %{http_code} blog.cnstock.com
... ELSE set variable curl --connect-timeout 5 -m 10 blog.cnstock.com
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013_2.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -w %{http_code} www.sinovision.net/portal.php?mod=center
... ELSE set variable curl --connect-timeout 5 -m 10 www.sinovision.net/portal.php?mod=center
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013_3.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -w %{http_code}
... ELSE set variable curl --connect-timeout 5 -m 10 nlr.ru/nlr_visit/RA549/novosti
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 策略验证之后关闭Deny策略若开启可以与monitor_http_001验证条件优先级
${policyDict} Create Dictionary policyId=${deny_http_policyId12} policyName=SecurityPolicy-Deny-Http-00013 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId20}|TSG_FIELD_HTTP_RES_HDR isValid=${0} appIdObjects=${HTTP_ID}
@@ -213,7 +213,7 @@ SecurityPolicy-Deny-Http-00013
SecurityPolicy-Deny-Http-00014
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_objectId43}|TSG_FIELD_HTTP_HOST,${deny_http_objectId21}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
${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_objectId431}|TSG_FIELD_HTTP_HOST,${deny_http_objectId21}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 8
@@ -224,7 +224,7 @@ SecurityPolicy-Deny-Http-00014
... 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_objectId43}|TSG_FIELD_HTTP_HOST,${deny_http_objectId40}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
${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_objectId431}|TSG_FIELD_HTTP_HOST,${deny_http_objectId40}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 10
@@ -282,7 +282,7 @@ SecurityPolicy-Deny-Http-00017
# ... 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 -m 10 -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}
... ELSE set variable curl -m 10 -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
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -291,9 +291,9 @@ SecurityPolicy-Deny-Http-00017
SecurityPolicy-Deny-Http-00018
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00018.bat
... ELSE set variable curl http://www.hebbank.com/
... ELSE set variable curl -m 10 http://www.hebbank.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Http-00019
@@ -312,4 +312,17 @@ SecurityPolicy-Deny-Http-00019
${policyDict} Create Dictionary policyId=${deny_http_policyId18} policyName=SecurityPolicy-Deny-Http-00019-2 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep ${policyModifySleepSeconds}
sleep ${policyModifySleepSeconds}
# curl -kv --cookie "wdcid=69d512097f7e021c; uid=6fe4a07479b44464b2fc6aaea84dcc85; wdlast=1618453760" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" --referer 'https://www.baidu.com/' \ http://www.xinhuanet.com/
# http://sports.xinhuanet.com/index.htm
SecurityPolicy-Deny-Http-00020
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00020.bat
... ELSE set variable curl -kv --cookie "wdcid=69d512097f7e021c; uid=6fe4a07479b44464b2fc6aaea84dcc85; wdlast=1618453760" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" --referer 'https://www.baidu.com/' \ http://www.xinhuanet.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}