diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot new file mode 100644 index 0000000..8401f04 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot @@ -0,0 +1,431 @@ +*** Settings *** +Force Tags tsg_adc_wp adc_api proxy_policy +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_adc/FileOperation.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot + +*** Variables *** +${url} /v1/policy/profile/responsepages + +*** Test Cases *** +Proxy-Policy-deny-00001 + [Tags] fqdn + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$newsela.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00001 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"重新开始","code":403,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId ${objectId} + insert_policyId_to_file1 intercept_deny_policyId ${policyId1} + insert_policyId_to_file1 deny_policyId ${policyId2} + +Proxy-Policy-deny-00002 + [Tags] cat + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*mathoverflow.net + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment #创建引用文件 + ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages + ${profiledId} Get From Dictionary ${response} profileId + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00002 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":403,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_profileId ${profiledId} + insert_policyId_to_file1 deny_objectId1 ${objectId} + insert_policyId_to_file1 intercept_deny_policyId1 ${policyId1} + insert_policyId_to_file1 deny_policyId1 ${policyId2} + +Proxy-Policy-deny-00003 + [Tags] url + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*wmtransfer.com,*verifone.com,*bcg.com,*rolandberger.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.wmtransfer*,$ww.verifone.com/ru/ru/o-verifone,*country=RU,capabilities + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment #创建引用文件 + ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages + ${profiledId} Get From Dictionary ${response} profileId + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00003 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_profileId1 ${profiledId} + insert_policyId_to_file1 deny_objectId2 ${objectId} + insert_policyId_to_file1 deny_objectId3 ${objectId1} + insert_policyId_to_file1 intercept_deny_policyId2 ${policyId1} + insert_policyId_to_file1 deny_policyId2 ${policyId2} + +Proxy-Policy-deny-00004 + [Tags] 请求头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*nielsen.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=insights + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00004 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"qwertyuiop","code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId4 ${objectId} + insert_policyId_to_file1 deny_objectId5 ${objectId1} + insert_policyId_to_file1 deny_objectId6 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId3 ${policyId1} + insert_policyId_to_file1 deny_policyId3 ${policyId2} + +Proxy-Policy-deny-00005 + [Tags] 请求头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.thecolor.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=popularcoloringpages + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00005 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"онлайн фильмы","code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId7 ${objectId} + insert_policyId_to_file1 deny_objectId8 ${objectId1} + insert_policyId_to_file1 deny_objectId9 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId4 ${policyId1} + insert_policyId_to_file1 deny_policyId4 ${policyId2} + +Proxy-Policy-deny-00006 + [Tags] 请求头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$sciencebob.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=experiments + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00006 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"明天大涨","code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId10 ${objectId} + insert_policyId_to_file1 deny_objectId11 ${objectId1} + insert_policyId_to_file1 deny_objectId12 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId5 ${policyId1} + insert_policyId_to_file1 deny_policyId5 ${policyId2} + +Proxy-Policy-deny-00007 + [Tags] 请求头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.europages.com.ru + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=ezhegodnik + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00007 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"今天中奖","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId13 ${objectId} + insert_policyId_to_file1 deny_objectId14 ${objectId1} + insert_policyId_to_file1 deny_objectId15 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId6 ${policyId1} + insert_policyId_to_file1 deny_policyId6 ${policyId2} + +Proxy-Policy-deny-00008 + [Tags] 应答头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*6renyou.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=user_comment + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment #创建引用文件 + ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages + ${profiledId} Get From Dictionary ${response} profileId + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00008 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_profileId2 ${profiledId} + insert_policyId_to_file1 deny_objectId16 ${objectId} + insert_policyId_to_file1 deny_objectId17 ${objectId1} + insert_policyId_to_file1 deny_objectId18 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId7 ${policyId1} + insert_policyId_to_file1 deny_policyId7 ${policyId2} + +Proxy-Policy-deny-00009 + [Tags] 应答头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*ljale.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=webdir.html + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment #创建引用文件 + ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages + ${profiledId} Get From Dictionary ${response} profileId + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00009 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_profileId3 ${profiledId} + insert_policyId_to_file1 deny_objectId19 ${objectId} + insert_policyId_to_file1 deny_objectId20 ${objectId1} + insert_policyId_to_file1 deny_objectId21 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId8 ${policyId1} + insert_policyId_to_file1 deny_policyId8 ${policyId2} + +Proxy-Policy-deny-00010 + [Tags] 应答头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*duckduckmoose.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=learn + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment #创建引用文件 + ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages + ${profiledId} Get From Dictionary ${response} profileId + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00009 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_profileId4 ${profiledId} + insert_policyId_to_file1 deny_objectId22 ${objectId} + insert_policyId_to_file1 deny_objectId23 ${objectId1} + insert_policyId_to_file1 deny_objectId24 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId9 ${policyId1} + insert_policyId_to_file1 deny_policyId9 ${policyId2} + +Proxy-Policy-deny-00011 + [Tags] 应答头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*tutcandy.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=sketch-to + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment #创建引用文件 + ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages + ${profiledId} Get From Dictionary ${response} profileId + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00009 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_profileId5 ${profiledId} + insert_policyId_to_file1 deny_objectId25 ${objectId} + insert_policyId_to_file1 deny_objectId26 ${objectId1} + insert_policyId_to_file1 deny_objectId27 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId10 ${policyId1} + insert_policyId_to_file1 deny_policyId10 ${policyId2} + +Proxy-Policy-deny-00012 + [Tags] cookie + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.youqulu.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=zixun + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=saltkey|Cookie + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00007 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"123456789","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId28 ${objectId} + insert_policyId_to_file1 deny_objectId29 ${objectId1} + insert_policyId_to_file1 deny_objectId30 ${objectId2} + insert_policyId_to_file1 intercept_deny_policyId11 ${policyId1} + insert_policyId_to_file1 deny_policyId11 ${policyId2} + +Proxy-Policy-deny-00013 + [Tags] set-cookie + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.nypl.org,*webpronews.com,*ke.com,$nationalbank.kz + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建set-cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=___utmvbYOusXI*|Set-Cookie,*Secure|Set-Cookie,domain=.ke.com|Set-Cookie,irkzadmin_session*|Set-Cookie + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00007 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"一直相信","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId31 ${objectId} + insert_policyId_to_file1 deny_objectId32 ${objectId1} + insert_policyId_to_file1 intercept_deny_policyId12 ${policyId1} + insert_policyId_to_file1 deny_policyId12 ${policyId2} + +Proxy-Policy-deny-00014 + [Tags] 请求体 + Comment 创建请求体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=1234567 + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId1}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00007 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId33 ${objectId} + insert_policyId_to_file1 deny_objectId34 ${objectId1} + insert_policyId_to_file1 intercept_deny_policyId13 ${policyId1} + insert_policyId_to_file1 deny_policyId13 ${policyId2} + +Proxy-Policy-deny-00015 + [Tags] 应答体 + Comment 创建请求体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ASDFG + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00007 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId35 ${objectId} + insert_policyId_to_file1 deny_policyId14 ${policyId2} + +Proxy-Policy-deny-00016 + [Tags] 最大组合1 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com + ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*action + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent + ${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict} + Comment 创建应答头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type + ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} + Comment 创建请求体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=mnbv + ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00007 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"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=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId36 ${object_fqdn_Id} + insert_policyId_to_file1 deny_objectId37 ${object_url_Id} + insert_policyId_to_file1 deny_objectId38 ${object_qq_Id} + insert_policyId_to_file1 deny_objectId39 ${object_yd_Id} + insert_policyId_to_file1 deny_objectId40 ${object_body_Id} + insert_policyId_to_file1 deny_policyId15 ${policyId2} + +Proxy-Policy-deny-00017 + [Tags] 最大组合2 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.umusicpub.com + ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*sicpub.com/au/ + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + Comment 创建cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=timezoneoffset|Cookie + ${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict} + Comment 创建set-cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=visid_incap|Set-Cookie + ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} + Comment 创建应答体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Twitter + ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00007 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"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_RES_CONTENT isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 deny_objectId41 ${object_fqdn_Id} + insert_policyId_to_file1 deny_objectId42 ${object_url_Id} + insert_policyId_to_file1 deny_objectId43 ${object_qq_Id} + insert_policyId_to_file1 deny_objectId44 ${object_yd_Id} + insert_policyId_to_file1 deny_objectId45 ${object_body_Id} + insert_policyId_to_file1 intercept_deny_policyId14 ${policyId1} + insert_policyId_to_file1 deny_policyId16 ${policyId2} diff --git a/01-TestCase/tsg_adc/multi_step/a_Redirect_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Redirect_Tests.robot new file mode 100644 index 0000000..3110964 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/a_Redirect_Tests.robot @@ -0,0 +1,398 @@ +*** Settings *** +Force Tags tsg_adc_wp adc_api proxy_policy +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_adc/FileOperation.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot + +*** Test Cases *** +Proxy-Policy-redirect-00001 + [Tags] fqdn + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$newsela.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00001 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"重新开始","code":403,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId ${objectId} + insert_policyId_to_file1 intercept_redirect_policyId ${policyId1} + insert_policyId_to_file1 redirect_policyId ${policyId2} + +Proxy-Policy-redirect-00002 + [Tags] cat + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*mathoverflow.net + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00002 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","html_profile":${profiledId},"code":403,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_profileId ${profiledId} + insert_policyId_to_file1 redirect_objectId1 ${objectId} + insert_policyId_to_file1 intercept_redirect_policyId1 ${policyId1} + insert_policyId_to_file1 redirect_policyId1 ${policyId2} + +Proxy-Policy-redirect-00003 + [Tags] url + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*wmtransfer.com,*verifone.com,*bcg.com,*rolandberger.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.wmtransfer*,$ww.verifone.com/ru/ru/o-verifone,*country=RU,capabilities + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00003 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","html_profile":${profiledId},"code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_profileId1 ${profiledId} + insert_policyId_to_file1 redirect_objectId2 ${objectId} + insert_policyId_to_file1 redirect_objectId3 ${objectId1} + insert_policyId_to_file1 intercept_redirect_policyId2 ${policyId1} + insert_policyId_to_file1 redirect_policyId2 ${policyId2} + +Proxy-Policy-redirect-00004 + [Tags] 请求头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*nielsen.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=insights + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00004 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"qwertyuiop","code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId4 ${objectId} + insert_policyId_to_file1 redirect_objectId5 ${objectId1} + insert_policyId_to_file1 redirect_objectId6 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId3 ${policyId1} + insert_policyId_to_file1 redirect_policyId3 ${policyId2} + +Proxy-Policy-redirect-00005 + [Tags] 请求头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.thecolor.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=popularcoloringpages + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00005 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"онлайн фильмы","code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId7 ${objectId} + insert_policyId_to_file1 redirect_objectId8 ${objectId1} + insert_policyId_to_file1 redirect_objectId9 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId4 ${policyId1} + insert_policyId_to_file1 redirect_policyId4 ${policyId2} + +Proxy-Policy-redirect-00006 + [Tags] 请求头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$sciencebob.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=experiments + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00006 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"明天大涨","code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId10 ${objectId} + insert_policyId_to_file1 redirect_objectId11 ${objectId1} + insert_policyId_to_file1 redirect_objectId12 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId5 ${policyId1} + insert_policyId_to_file1 redirect_policyId5 ${policyId2} + +Proxy-Policy-redirect-00007 + [Tags] 请求头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.europages.com.ru + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=ezhegodnik + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00007 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"今天中奖","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId13 ${objectId} + insert_policyId_to_file1 redirect_objectId14 ${objectId1} + insert_policyId_to_file1 redirect_objectId15 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId6 ${policyId1} + insert_policyId_to_file1 redirect_policyId6 ${policyId2} + +Proxy-Policy-redirect-00008 + [Tags] 应答头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*6renyou.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=user_comment + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00008 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_profileId2 ${profiledId} + insert_policyId_to_file1 redirect_objectId16 ${objectId} + insert_policyId_to_file1 redirect_objectId17 ${objectId1} + insert_policyId_to_file1 redirect_objectId18 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId7 ${policyId1} + insert_policyId_to_file1 redirect_policyId7 ${policyId2} + +Proxy-Policy-redirect-00009 + [Tags] 应答头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*ljale.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=webdir.html + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00009 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_profileId3 ${profiledId} + insert_policyId_to_file1 redirect_objectId19 ${objectId} + insert_policyId_to_file1 redirect_objectId20 ${objectId1} + insert_policyId_to_file1 redirect_objectId21 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId8 ${policyId1} + insert_policyId_to_file1 redirect_policyId8 ${policyId2} + +Proxy-Policy-redirect-00010 + [Tags] 应答头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*duckduckmoose.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=learn + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00010 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_profileId4 ${profiledId} + insert_policyId_to_file1 redirect_objectId22 ${objectId} + insert_policyId_to_file1 redirect_objectId23 ${objectId1} + insert_policyId_to_file1 redirect_objectId24 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId9 ${policyId1} + insert_policyId_to_file1 redirect_policyId9 ${policyId2} + +Proxy-Policy-redirect-00011 + [Tags] 应答头 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*tutcandy.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=sketch-to + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00011 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_profileId5 ${profiledId} + insert_policyId_to_file1 redirect_objectId25 ${objectId} + insert_policyId_to_file1 redirect_objectId26 ${objectId1} + insert_policyId_to_file1 redirect_objectId27 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId10 ${policyId1} + insert_policyId_to_file1 redirect_policyId10 ${policyId2} + +Proxy-Policy-redirect-00012 + [Tags] cookie + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.youqulu.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=zixun + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=saltkey|Cookie + ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00012 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"123456789","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId28 ${objectId} + insert_policyId_to_file1 redirect_objectId29 ${objectId1} + insert_policyId_to_file1 redirect_objectId30 ${objectId2} + insert_policyId_to_file1 intercept_redirect_policyId11 ${policyId1} + insert_policyId_to_file1 redirect_policyId11 ${policyId2} + +Proxy-Policy-redirect-00013 + [Tags] set-cookie + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.nypl.org,*webpronews.com,*ke.com,$nationalbank.kz + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建set-cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=___utmvbYOusXI*|Set-Cookie,*Secure|Set-Cookie,domain=.ke.com|Set-Cookie,irkzadmin_session*|Set-Cookie + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00013 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"一直相信","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId31 ${objectId} + insert_policyId_to_file1 redirect_objectId32 ${objectId1} + insert_policyId_to_file1 intercept_redirect_policyId12 ${policyId1} + insert_policyId_to_file1 redirect_policyId12 ${policyId2} + +Proxy-Policy-redirect-00014 + [Tags] 请求体 + Comment 创建请求体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=1234567 + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId1}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00014 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId33 ${objectId} + insert_policyId_to_file1 redirect_objectId34 ${objectId1} + insert_policyId_to_file1 intercept_redirect_policyId13 ${policyId1} + insert_policyId_to_file1 redirect_policyId13 ${policyId2} + +Proxy-Policy-redirect-00015 + [Tags] 最大组合1 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com + ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*action + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent + ${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict} + Comment 创建应答头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type + ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} + Comment 创建请求体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=mnbv + ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00015 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"涨涨涨涨","code":404,"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=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId36 ${object_fqdn_Id} + insert_policyId_to_file1 redirect_objectId37 ${object_url_Id} + insert_policyId_to_file1 redirect_objectId38 ${object_qq_Id} + insert_policyId_to_file1 redirect_objectId39 ${object_yd_Id} + insert_policyId_to_file1 redirect_objectId40 ${object_body_Id} + insert_policyId_to_file1 redirect_policyId15 ${policyId2} + +Proxy-Policy-redirect-00016 + [Tags] 最大组合2 + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.umusicpub.com + ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*sicpub.com/au/ + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + Comment 创建cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=timezoneoffset|Cookie + ${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict} + Comment 创建set-cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=visid_incap|Set-Cookie + ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} + Comment 创建应答体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Twitter + ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + Comment 创建redirect策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00016 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"block","message":"涨涨涨涨","code":404,"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_RES_CONTENT isValid=${1} appIdObjects=2 + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + insert_policyId_to_file1 redirect_objectId41 ${object_fqdn_Id} + insert_policyId_to_file1 redirect_objectId42 ${object_url_Id} + insert_policyId_to_file1 redirect_objectId43 ${object_qq_Id} + insert_policyId_to_file1 redirect_objectId44 ${object_yd_Id} + insert_policyId_to_file1 redirect_objectId45 ${object_body_Id} + insert_policyId_to_file1 intercept_redirect_policyId14 ${policyId1} + insert_policyId_to_file1 redirect_policyId16 ${policyId2} diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot new file mode 100644 index 0000000..171791d --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot @@ -0,0 +1,312 @@ +*** Settings *** +Force Tags tsg_adc_wp proxy_policy adc_verify +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_adc/FileOperation.robot + +*** Test Cases *** +Proxy-Policy-deny-00001 + [Tags] fqdn + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00001.bat + ... ELSE set variable curl -kv \ https://newsela.com/about/content/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 重新开始 Tango Secure Gateway CA + ... ELSE Create List 重新开始 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime ${starttime} deny_endtime ${endtime} + +Proxy-Policy-deny-00002 + [Tags] cat + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00002.bat + ... ELSE set variable curl -kv \ https://mathoverflow.net/questions + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable Tango Secure Gateway CA + ... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime1 ${starttime} deny_endtime1 ${endtime} + +Proxy-Policy-deny-00003 + [Tags] url + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003.bat + ... ELSE set variable curl -kv \ https://www.wmtransfer.com/eng/business/accept-payments/online-shop/widget.shtml + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA + ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime2 ${starttime} deny_endtime2 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_1.bat + ... ELSE set variable curl -kv \ https://www.verifone.com/ru/ru/o-verifone + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA + ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime3 ${starttime} deny_endtime3 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_2.bat + ... ELSE set variable curl -kv \ https://www.bcg.com/ru-ru/capabilities/client-enablement/default.aspx + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA + ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime4 ${starttime} deny_endtime4 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_3.bat + ... ELSE set variable curl -kv \ https://www.rolandberger.com/ru/?country=RU + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA + ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime5 ${starttime} deny_endtime5 ${endtime} + +Proxy-Policy-deny-00004 + [Tags] 请求头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00004.bat + ... ELSE set variable curl -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 'https://www.baidu.com/' https://www.nielsen.com/ru/ru/insights/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List qwertyuiop Tango Secure Gateway CA + ... ELSE Create List qwertyuiop Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime6 ${starttime} deny_endtime6 ${endtime} + +Proxy-Policy-deny-00005 + [Tags] 请求头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00005.bat + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://www.thecolor.com/popularcoloringpages.aspx + ${stringlist} run keyword if '${systemType}'=='Windows' Create List онлайн фильмы Tango Secure Gateway CA + ... ELSE Create List онлайн фильмы Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime7 ${starttime} deny_endtime7 ${endtime} + +Proxy-Policy-deny-00006 + [Tags] 请求头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00006.bat + ... ELSE set variable curl -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 'https://www.baidu.com/' https://sciencebob.com/category/experiments/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 明天大涨 Tango Secure Gateway CA + ... ELSE Create List 明天大涨 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime8 ${starttime} deny_endtime8 ${endtime} + +Proxy-Policy-deny-00007 + [Tags] 请求头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00007.bat + ... ELSE set variable curl -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 'https://www.baidu.com/' https://www.europages.com.ru/ezhegodnik-predpriyatiya.html + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 今天中奖 Tango Secure Gateway CA + ... ELSE Create List 今天中奖 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime9 ${starttime} deny_endtime9 ${endtime} + +Proxy-Policy-deny-00008 + [Tags] 应答头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00008.bat + ... ELSE set variable curl http://www.6renyou.com/user_comment/index + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 + ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime10 ${starttime} deny_endtime10 ${endtime} + +Proxy-Policy-deny-00009 + [Tags] 应答头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00009.bat + ... ELSE set variable curl http://www.ljale.com/home/webdir.html + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 + ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime11 ${starttime} deny_endtime11 ${endtime} + +Proxy-Policy-deny-00010 + [Tags] 应答头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00010.bat + ... ELSE set variable curl http://www.duckduckmoose.com/learn/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime12 ${starttime} deny_endtime12 ${endtime} + +Proxy-Policy-deny-00011 + [Tags] 应答头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00011.bat + ... ELSE set variable curl http://tutcandy.com/2009/04/ai-sketch-to-vector-tutorial + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime13 ${starttime} deny_endtime13 ${endtime} + +Proxy-Policy-deny-00012 + [Tags] cookie + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00012.bat + ... ELSE set variable curl -kv --cookie "lQfQ_2132_saltkey=t8WY1oPe; lQfQ_2132_lastvisit=1595381790; lQfQ_2132_sid=vqXOg6; lQfQ_2132_lastact=1595385400%09forum.php%09image" --referer 'https://www.baidu.com/' \ https://www.youqulu.com/category/zixun + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 123456789 Tango Secure Gateway CA + ... ELSE Create List 123456789 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime14 ${starttime} deny_endtime14 ${endtime} + +Proxy-Policy-deny-00013 + [Tags] set-cookie + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013.bat + ... ELSE set variable curl -kv \ https://www.nypl.org/books-music-movies + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA + ... ELSE Create List 一直相信 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime15 ${starttime} deny_endtime15 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_1.bat + ... ELSE set variable curl -kv \ https://www.webpronews.com/subscribe/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA + ... ELSE Create List 一直相信 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime16 ${starttime} deny_endtime16 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_2.bat + ... ELSE set variable curl -kv \ https://bj.zu.ke.com/zufang + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA + ... ELSE Create List 一直相信 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime17 ${starttime} deny_endtime17 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_3.bat + ... ELSE set variable curl -kv \ https://nationalbank.kz/?&switch=kazakh + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA + ... ELSE Create List 一直相信 Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime18 ${starttime} deny_endtime18 ${endtime} + +Proxy-Policy-deny-00014 + [Tags] 请求体 + Comment 功能端验证HTTP验证 + ${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" https://open.node.com/action + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA + ... ELSE Create List Connection reset by peer Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime19 ${starttime} deny_endtime19 ${endtime} + +Proxy-Policy-deny-00015 + [Tags] 应答体 + Comment 功能端验证HTTP验证 + ${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" https://open.node.com/action + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA + ... ELSE &setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action Connection reset by peer Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime20 ${starttime} deny_endtime20 ${endtime} + +Proxy-Policy-deny-00016 + [Tags] 最大组合1 + Comment 功能端验证HTTP验证 + ${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=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 'https://www.baidu.com/' https://open.node.com/action + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA + ... ELSE Create List Connection reset by peer Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime21 ${starttime} deny_endtime21 ${endtime} + +Proxy-Policy-deny-00017 + [Tags] 最大组合2 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00017.bat + ... ELSE set variable curl -kv --cookie "test%20cookie=null; timezoneoffset=-480; ASP.NET_SessionId=sta2b3gxpxzqei3by1ka3qsa; visid_incap_1010467=Iu/pLzeoTnGn2VDjWdP9GpoBGF8AAAAAQUIPAAAAAADzSLZtZ1tZ/Rbjfct3Nq69" --referer 'https://www.baidu.com/' \ https://https://www.umusicpub.com/au/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA + ... ELSE Create List Connection reset by peer Tango Secure Gateway CA + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_starttime22 ${starttime} deny_endtime22 ${endtime} diff --git a/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot new file mode 100644 index 0000000..399a34c --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot @@ -0,0 +1,247 @@ +*** Settings *** +Test Teardown DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId} +Force Tags tsg_adc_wp adc_log proxy_policy +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../05-Other/AllFlowCaseVariable.txt +Resource ../../../02-Keyword/tsg_adc/FileOperation.robot +Resource ../../../05-Other/AllFlowCaseVariable1.txt + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} +${url} /v1/policy/profile/responsepages +${profiledId} ${EMPTY} + +*** Test Cases *** +Proxy-Policy-deny-00001 + [Tags] fqdn + #删除对象 + ${objectids} set Variable ${deny_objectId} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId} + GetLogList proxy_event_log ${deny_starttime} ${deny_endtime} ${testClentIP} ${s} http_host newsela.com + +Proxy-Policy-deny-00002 + [Tags] cat + #删除文件 + ${profiledId} set Variable ${deny_profileId} + #删除对象 + ${objectids} set Variable ${deny_objectId1} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId1}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId1}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId1} + GetLogList proxy_event_log ${deny_starttime1} ${deny_endtime1} ${testClentIP} ${s} http_host mathoverflow.net + +Proxy-Policy-deny-00003 + [Tags] url + #删除文件 + ${profiledId} set Variable ${deny_profileId1} + #删除对象 + ${objectids} set Variable ${deny_objectId2} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId3} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId2}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId2}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId2} + GetLogList proxy_event_log ${deny_starttime2} ${deny_endtime2} ${testClentIP} ${s} http_host www.wmtransfer.com + GetLogList proxy_event_log ${deny_starttime3} ${deny_endtime3} ${testClentIP} ${s} http_host www.verifone.com + GetLogList proxy_event_log ${deny_starttime4} ${deny_endtime4} ${testClentIP} ${s} http_host www.bcg.com + GetLogList proxy_event_log ${deny_starttime5} ${deny_endtime5} ${testClentIP} ${s} http_host www.rolandberger.com + +Proxy-Policy-deny-00004 + [Tags] 请求头 + #删除对象 + ${objectids} set Variable ${deny_objectId4} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId5} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId6} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId3}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId3} + GetLogList proxy_event_log ${deny_starttime6} ${deny_endtime6} ${testClentIP} ${s} http_host www.nielsen.com + +Proxy-Policy-deny-00005 + [Tags] 请求头 + #删除对象 + ${objectids} set Variable ${deny_objectId7} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId8} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId9} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId4}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId4}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId4} + GetLogList proxy_event_log ${deny_starttime7} ${deny_endtime7} ${testClentIP} ${s} http_host www.thecolor.com + +Proxy-Policy-deny-00006 + [Tags] 请求头 + #删除对象 + ${objectids} set Variable ${deny_objectId10} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId11} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId12} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId5}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId5}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId5} + GetLogList proxy_event_log ${deny_starttime8} ${deny_endtime8} ${testClentIP} ${s} http_host sciencebob.com + +Proxy-Policy-deny-00007 + [Tags] 请求头 + #删除对象 + ${objectids} set Variable ${deny_objectId13} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId14} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId15} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId6}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId6}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId6} + GetLogList proxy_event_log ${deny_starttime9} ${deny_endtime9} ${testClentIP} ${s} http_host www.europages.com.ru + +Proxy-Policy-deny-00008 + [Tags] 应答头 + #删除文件 + ${profiledId} set Variable ${deny_profileId2} + #删除对象 + ${objectids} set Variable ${deny_objectId16} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId17} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId18} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId7}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId7}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId7} + GetLogList proxy_event_log ${deny_starttime10} ${deny_endtime10} ${testClentIP} ${s} http_host www.6renyou.com + +Proxy-Policy-deny-00009 + [Tags] 应答头 + #删除文件 + ${profiledId} set Variable ${deny_profileId3} + #删除对象 + ${objectids} set Variable ${deny_objectId19} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId20} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId21} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId8}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId8}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId8} + GetLogList proxy_event_log ${deny_starttime11} ${deny_endtime11} ${testClentIP} ${s} http_host www.ljale.com + +Proxy-Policy-deny-00010 + [Tags] 应答头 + #删除文件 + ${profiledId} set Variable ${deny_profileId4} + #删除对象 + ${objectids} set Variable ${deny_objectId22} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId23} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId24} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId9}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId9}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId9} + GetLogList proxy_event_log ${deny_starttime12} ${deny_endtime12} ${testClentIP} ${s} http_host www.duckduckmoose.com + +Proxy-Policy-deny-00011 + [Tags] 应答头 + #删除文件 + ${profiledId} set Variable ${deny_profileId5} + #删除对象 + ${objectids} set Variable ${deny_objectId25} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId26} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId27} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId10}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId10}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId10} + GetLogList proxy_event_log ${deny_starttime13} ${deny_endtime13} ${testClentIP} ${s} http_host tutcandy.com + +Proxy-Policy-deny-00012 + [Tags] cookie + #删除对象 + ${objectids} set Variable ${deny_objectId28} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId29} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId30} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId11}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId11}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId11} + GetLogList proxy_event_log ${deny_starttime14} ${deny_endtime14} ${testClentIP} ${s} http_host www.youqulu.com + +Proxy-Policy-deny-00013 + [Tags] set-cookie + #删除对象 + ${objectids} set Variable ${deny_objectId31} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId32} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId12}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId12}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId12} + GetLogList proxy_event_log ${deny_starttime15} ${deny_endtime15} ${testClentIP} ${s} http_host www.nypl.org + GetLogList proxy_event_log ${deny_starttime16} ${deny_endtime16} ${testClentIP} ${s} http_host www.webpronews.com + GetLogList proxy_event_log ${deny_starttime17} ${deny_endtime17} ${testClentIP} ${s} http_host bj.zu.ke.com + GetLogList proxy_event_log ${deny_starttime18} ${deny_endtime18} ${testClentIP} ${s} http_host nationalbank.kz + +Proxy-Policy-deny-00014 + [Tags] 请求体 + #删除对象 + ${objectids} set Variable ${deny_objectId33} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId34} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId13}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId13}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId13} + GetLogList proxy_event_log ${deny_starttime19} ${deny_endtime19} ${testClentIP} ${s} http_host open.node.com + +Proxy-Policy-deny-00015 + [Tags] 应答体 + #删除对象 + ${objectids} set Variable ${deny_objectId35} + #删除策略 + ${policyIds} Create List {"policyType":"pxy_manipulation","policyIds":[${deny_policyId14}]} + ${s} Convert to String ${deny_policyId14} + GetLogList proxy_event_log ${deny_starttime20} ${deny_endtime20} ${testClentIP} ${s} http_host open.node.com + +Proxy-Policy-deny-00016 + [Tags] 最大组合1 + #删除对象 + ${objectids} set Variable ${deny_objectId36} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId37} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId38} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId39} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId40} + #删除策略 + ${policyIds} Create List {"policyType":"pxy_manipulation","policyIds":[${deny_policyId15}]} + ${s} Convert to String ${deny_policyId15} + GetLogList proxy_event_log ${deny_starttime21} ${deny_endtime21} ${testClentIP} ${s} http_host open.node.com + +Proxy-Policy-deny-00017 + [Tags] 最大组合2 + #删除对象 + ${objectids} set Variable ${deny_objectId41} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId42} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId43} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId44} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId45} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId14}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId16}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId12} + GetLogList proxy_event_log ${deny_starttime22} ${deny_endtime22} ${testClentIP} ${s} http_host www.umusicpub.com diff --git a/01-TestCase/tsg_adc/selfserver/Api_Proxy/Deny_Http_Tests.robot b/01-TestCase/tsg_adc/selfserver/Api_Proxy/Deny_Http_Tests.robot index a72ebc7..cb62ac2 100644 --- a/01-TestCase/tsg_adc/selfserver/Api_Proxy/Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/selfserver/Api_Proxy/Deny_Http_Tests.robot @@ -16,11 +16,15 @@ ${profiledId} ${EMPTY} *** Test Cases *** ProxyPolicy-Deny-Http-00001 - [Tags] selfserver ip - Comment 创建目标IP - ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0 - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} + [Tags] selfserver ip + Comment 创建IP + #object为IP→endpoint时的addItemList单个对象 + ${addItemList1} Create Dictionary isSession=endpoint ip=192.168.100.5-192.168.100.5 port=0-0 direction=0 protocol=0 isInitialize=0 + ${addItemLists} Create list ${addItemList1} + #objectList对象 + ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=${addItemLists} + ${rescode} ${objectId} AddObjects ${1} ${objectDict} + ${objectIds} Set Variable ${objectId} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} @@ -48,7 +52,7 @@ ProxyPolicy-Deny-Http-00001 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Deny-Http-00002 - [Tags] selfserver ip+fqdn完整匹配 + [Tags] selfserver ip+fqdn完整匹配 Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -80,7 +84,7 @@ ProxyPolicy-Deny-Http-00002 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Deny-Http-00003 - [Tags] selfserver ip+cat右匹配 + [Tags] selfserver ip+cat右匹配 Comment 创建cat ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -314,7 +318,6 @@ ProxyPolicy-Deny-Http-00009 ${s} Convert to String ${policyId3} GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - ProxyPolicy-Deny-Http-00010 [Tags] selfserver ip+请求头完整匹配 Comment 创建请求头 @@ -739,7 +742,7 @@ ProxyPolicy-Deny-Http-00022 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Deny-Http-00023 - [Tags] selfserver 最大组合 + [Tags] selfserver 最大组合 Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} @@ -785,7 +788,7 @@ ProxyPolicy-Deny-Http-00023 #日志验证 ${s} Convert to String ${policyId3} GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - + ProxyPolicy-Deny-Http-00024 [Tags] selfserver 修改 Comment 创建url @@ -837,7 +840,7 @@ ProxyPolicy-Deny-Http-00024 Sleep ${policyLogVerificationSleepSeconds}s ${endtime} Get Time GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - + ProxyPolicy-Deny-Http-00025 [Tags] selfserver ip+请求体and关系 Comment 创建请求体 diff --git a/02-Keyword/tsg_bfapi/PolicyObject.robot b/02-Keyword/tsg_bfapi/PolicyObject.robot index 7317ace..379a295 100644 --- a/02-Keyword/tsg_bfapi/PolicyObject.robot +++ b/02-Keyword/tsg_bfapi/PolicyObject.robot @@ -3,6 +3,7 @@ Resource ../../03-Variable/BifangApiVariable.txt Resource ../tsg_common/ManagePolicyBody.robot Resource ../tsg_common/ManageObjectBody.robot Resource ../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../02-Keyword/tsg_bfapi/policy_object/Object.robot Library REST http://${host}:${port} Library Collections Library RequestsLibrary @@ -10,30 +11,40 @@ Resource Common.robot *** Keywords *** AddLocalIPObject + #创建对象IP log to_AddLocalIPObject - #${localIP} set variable {"opAction":"add","returnData":1,"objectList":{"objectType":"ip","objectSubType":"endpoint","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"autotestLocalIPObject_${testClentIP}","objectDesc":"LocalIPObject_${testClentIP}自动化测试机IP","subObjectIds":[],"addItemList":[{"addrType":4,"protocol":0,"direction":0,"isSession":"endpoint","clientIp1":"${testClentIP}","clientIp2":"${testClentIP}","clientIpFormat":"range","clientPortFormat":"range","clientPort1":0,"clientPort2":0,"serverIpFormat":"range","serverIp1":"","serverIp2":"","serverPortFormat":"range","serverPort1":0,"serverPort2":0}],"updateItemList":[],"deleteItemIds":[]}} - #${rescodeip} ${objidip} AddObject ${localIP} - #${localSubIP} set variable {"opAction":"add","returnData":1,"objectList":{"objectType":"subscriberid","objectSubType":"","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"test57","objectDesc":"${testSubscriberID}","subObjectIds":[],"addItemList":[{"keywordArray":["${testSubscriberID}"],"itemId":"","isHexbin":0}],"updateItemList":[],"deleteItemIds":[]}} - #${rescodesub} ${subiid} AddObject ${localSubIP} + # ${localIP} set variable {"opAction":"add","returnData":1,"objectList":{"objectType":"ip","objectSubType":"endpoint","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"autotestLocalIPObject_${testClentIP}","objectDesc":"LocalIPObject_${testClentIP}自动化测试机IP","subObjectIds":[],"addItemList":[{"addrType":4,"protocol":0,"direction":0,"isSession":"endpoint","clientIp1":"${testClentIP}","clientIp2":"${testClentIP}","clientIpFormat":"range","clientPortFormat":"range","clientPort1":0,"clientPort2":0,"serverIpFormat":"range","serverIp1":"","serverIp2":"","serverPortFormat":"range","serverPort1":0,"serverPort2":0}],"updateItemList":[],"deleteItemIds":[]}} + # ${rescodeip} ${objidip} AddObject ${localIP} + # ${localSubIP} set variable {"opAction":"add","returnData":1,"objectList":{"objectType":"subscriberid","objectSubType":"","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"test57","objectDesc":"${testSubscriberID}","subObjectIds":[],"addItemList":[{"keywordArray":["${testSubscriberID}"],"itemId":"","isHexbin":0}],"updateItemList":[],"deleteItemIds":[]}} + # ${rescodesub} ${subiid} AddObject ${localSubIP} # 创建对象-IP - Create Dictionary + # Create Dictionary - ${objectDict} Create Dictionary - ... objectType=ip - ... objectSubType=${Default_ObjectSubType} - ... isInitialize=${Default_IsInitialize} - ... isExclusion=${Default_IsExclusion} - ... objectName=autotest_localIP_${testClentIP} - ... objectDesc=${Default_ObjectDesc} - ... subObjectIds=${Default_SubObjectIds} - ... isValid=${1} - ... addItemList=range|${testClentIP}|${testClentIP}|0/0&${Default_AddItem_ServerIpFormat}|${Default_AddItem_ServerIp1}|${Default_AddItem_ServerIp2}|${Default_AddItem_ServerPort}|${Default_AddItem_IsInitialize}|${Default_AddItem_ItemName}|${Default_AddItem_ItemDesc} - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - #log ${rescodeip} - log LocalIP:${objectId} - SET GLOBAL VARIABLE ${testClentID} ${objectId} + # ${objectDict} Create Dictionary + # ... objectType=ip + # ... objectSubType=${Default_ObjectSubType} + # ... isInitialize=${Default_IsInitialize} + # ... isExclusion=${Default_IsExclusion} + # ... objectName=autotest_localIP_${testClentIP} + # ... objectDesc=${Default_ObjectDesc} + # ... subObjectIds=${Default_SubObjectIds} + # ... isValid=${1} + # ... addItemList=range|${testClentIP}|${testClentIP}|0/0&${Default_AddItem_ServerIpFormat}|${Default_AddItem_ServerIp1}|${Default_AddItem_ServerIp2}|${Default_AddItem_ServerPort}|${Default_AddItem_IsInitialize}|${Default_AddItem_ItemName}|${Default_AddItem_ItemDesc} + # ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + # #log ${rescodeip} + # log LocalIP:${objectId} + + Comment 创建IP + #object为IP→endpoint时的addItemList单个对象 + ${addItemList1} Create Dictionary isSession=endpoint ip=${testClentIP}-${testClentIP} port=0-0 direction=0 protocol=0 isInitialize=0 + #可以添加多个 + ${addItemLists} Create list ${addItemList1} + #objectList对象 + ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=${addItemLists} + ${rescode} ${objectId1} AddObjects ${1} ${objectDict} + SET GLOBAL VARIABLE ${testClentID} ${objectId1} log to_AddLocalSubidObject ${objectDict} Create Dictionary ... objectType=subscriberid @@ -99,7 +110,8 @@ DeleteObjectbak AddPolicy [Arguments] ${body} - ${response} BasePostRequest /${version}/policy/compile body=${body} + # ${response} BasePostRequest /${version}/policy/compile body=${body} + ${response} BasePostRequest /${version2}/policy/compile body=${body} #log ${response} ${policyId} Set Variable ${response['data']['policyList'][0]['policyId']} ${rescode} Set Variable ${response['code']} @@ -190,6 +202,22 @@ DeleteProfile ${response} Convert to String ${response} log ${response} #Should Be Equal As Strings ${response} {'code': 200, 'msg': 'Success', 'success': True} + +# DeleteProfile_defeated + # [Arguments] ${typeUrl} ${profileIds} + # #删除对象 + # log DeleteProfile + # ${response} BaseDeleteRequest /${version}/policy/profile/${typeUrl} {"profileIds":[${profileIds}]} + # ${response_code} Get From Dictionary ${response} code + # #log aaaaaaaaaa:${response_code} + # Should Be Equal As Strings ${response_code} 40090030 + # #Integer ${response_code} 200 + # ${response} Convert to String ${response} + # log ${response} + # #Should Be Equal As Strings ${response} {'code': 200, 'msg': 'Success', 'success': True} + + + DeleteProfiles [Arguments] ${profiles} FOR ${profile} IN @{profiles} diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00001.bat b/05-Other/curl/command/ProxyPolicy_Deny_00001.bat new file mode 100644 index 0000000..3e6d4e1 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00001.bat @@ -0,0 +1 @@ +curl -kv https://newsela.com/about/content/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00002.bat b/05-Other/curl/command/ProxyPolicy_Deny_00002.bat new file mode 100644 index 0000000..24734fa --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00002.bat @@ -0,0 +1 @@ +curl -kv https://mathoverflow.net/questions | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00003.bat b/05-Other/curl/command/ProxyPolicy_Deny_00003.bat new file mode 100644 index 0000000..ed3ca09 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00003.bat @@ -0,0 +1 @@ +curl -kv https://www.wmtransfer.com/eng/business/accept-payments/online-shop/widget.shtml | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00003_1.bat b/05-Other/curl/command/ProxyPolicy_Deny_00003_1.bat new file mode 100644 index 0000000..c24bd27 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00003_1.bat @@ -0,0 +1 @@ +curl -kv https://www.verifone.com/ru/ru/o-verifone | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00003_2.bat b/05-Other/curl/command/ProxyPolicy_Deny_00003_2.bat new file mode 100644 index 0000000..1899437 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00003_2.bat @@ -0,0 +1 @@ +curl -kv https://www.bcg.com/ru-ru/capabilities/client-enablement/default.aspx | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00003_3.bat b/05-Other/curl/command/ProxyPolicy_Deny_00003_3.bat new file mode 100644 index 0000000..2713f63 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00003_3.bat @@ -0,0 +1 @@ +curl -kv https://www.rolandberger.com/ru/?country=RU | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00004.bat b/05-Other/curl/command/ProxyPolicy_Deny_00004.bat new file mode 100644 index 0000000..c765485 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00004.bat @@ -0,0 +1 @@ +curl -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 'https://www.baidu.com/' https://www.nielsen.com/ru/ru/insights/tent/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00005.bat b/05-Other/curl/command/ProxyPolicy_Deny_00005.bat new file mode 100644 index 0000000..71652a9 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00005.bat @@ -0,0 +1 @@ +curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://www.thecolor.com/popularcoloringpages.aspx | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00006.bat b/05-Other/curl/command/ProxyPolicy_Deny_00006.bat new file mode 100644 index 0000000..3366d5e --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00006.bat @@ -0,0 +1 @@ +curl -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 'https://www.baidu.com/' https://sciencebob.com/category/experiments/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00007.bat b/05-Other/curl/command/ProxyPolicy_Deny_00007.bat new file mode 100644 index 0000000..b47ee04 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00007.bat @@ -0,0 +1 @@ +curl -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 'https://www.baidu.com/' https://www.europages.com.ru/ezhegodnik-predpriyatiya.html | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00008.bat b/05-Other/curl/command/ProxyPolicy_Deny_00008.bat new file mode 100644 index 0000000..748a562 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00008.bat @@ -0,0 +1 @@ +curl http://www.6renyou.com/user_comment/index | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00009.bat b/05-Other/curl/command/ProxyPolicy_Deny_00009.bat new file mode 100644 index 0000000..c280f43 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00009.bat @@ -0,0 +1 @@ +curl http://www.ljale.com/home/webdir.html | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00010.bat b/05-Other/curl/command/ProxyPolicy_Deny_00010.bat new file mode 100644 index 0000000..caeda77 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00010.bat @@ -0,0 +1 @@ +curl http://www.duckduckmoose.com/learn/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00011.bat b/05-Other/curl/command/ProxyPolicy_Deny_00011.bat new file mode 100644 index 0000000..00d5cb6 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00011.bat @@ -0,0 +1 @@ +curl http://tutcandy.com/2009/04/ai-sketch-to-vector-tutorial | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00012.bat b/05-Other/curl/command/ProxyPolicy_Deny_00012.bat new file mode 100644 index 0000000..e47d5c9 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00012.bat @@ -0,0 +1 @@ +curl -kv --cookie "lQfQ_2132_saltkey=t8WY1oPe; lQfQ_2132_lastvisit=1595381790; lQfQ_2132_sid=vqXOg6; lQfQ_2132_lastact=1595385400%09forum.php%09image" --referer 'https://www.baidu.com/' \ https://www.youqulu.com/category/zixun | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00013-3.bat b/05-Other/curl/command/ProxyPolicy_Deny_00013-3.bat new file mode 100644 index 0000000..1dcf705 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00013-3.bat @@ -0,0 +1 @@ +curl -kv https://nationalbank.kz/?&switch=kazakh | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00013.bat b/05-Other/curl/command/ProxyPolicy_Deny_00013.bat new file mode 100644 index 0000000..6c999a3 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00013.bat @@ -0,0 +1 @@ +curl -kv https://www.nypl.org/books-music-movies | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00013_1.bat b/05-Other/curl/command/ProxyPolicy_Deny_00013_1.bat new file mode 100644 index 0000000..e3e6ef8 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00013_1.bat @@ -0,0 +1 @@ +curl -kv https://www.webpronews.com/subscribe/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00013_2.bat b/05-Other/curl/command/ProxyPolicy_Deny_00013_2.bat new file mode 100644 index 0000000..86c3707 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00013_2.bat @@ -0,0 +1 @@ +curl -kv https://bj.zu.ke.com/zufang | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00014.bat b/05-Other/curl/command/ProxyPolicy_Deny_00014.bat new file mode 100644 index 0000000..71c4e08 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00014.bat @@ -0,0 +1 @@ +curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00015.bat b/05-Other/curl/command/ProxyPolicy_Deny_00015.bat new file mode 100644 index 0000000..8d4c082 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00015.bat @@ -0,0 +1 @@ +curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=12345678&contentType=content-type&resBody=ASDFG" https://open.node.com/action | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00016.bat b/05-Other/curl/command/ProxyPolicy_Deny_00016.bat new file mode 100644 index 0000000..058954e --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00016.bat @@ -0,0 +1 @@ +curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=mnbv&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 'https://www.baidu.com/' https://open.node.com/action | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00017.bat b/05-Other/curl/command/ProxyPolicy_Deny_00017.bat new file mode 100644 index 0000000..dfc7872 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00017.bat @@ -0,0 +1 @@ +curl -kv --cookie "test%20cookie=null; timezoneoffset=-480; ASP.NET_SessionId=sta2b3gxpxzqei3by1ka3qsa; visid_incap_1010467=Iu/pLzeoTnGn2VDjWdP9GpoBGF8AAAAAQUIPAAAAAADzSLZtZ1tZ/Rbjfct3Nq69" --referer 'https://www.baidu.com/' \ https://https://www.umusicpub.com/au/ | iconv -f utf-8 -t gbk \ No newline at end of file