This commit is contained in:
朱明明
2020-08-03 15:20:15 +08:00
141 changed files with 6802 additions and 240 deletions

View File

@@ -29,5 +29,5 @@ SecurityPolicy-Allow-Http-00002
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Http-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Http-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict} log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_http_objectId1 ${objectId} insert_policyId_to_file1 allow_http_objectId ${objectId}
insert_policyId_to_file1 allow_http_policyId1 ${policyId} insert_policyId_to_file1 allow_http_policyId ${policyId}

View File

@@ -0,0 +1,346 @@
*** 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-allow-00001
[Tags] fqdn
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$mp.pipix.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00001 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId ${objectId}
insert_policyId_to_file1 intercept_allow_policyId ${policyId1}
insert_policyId_to_file1 allow_policyId ${policyId2}
Proxy-Policy-allow-00002
[Tags] cat
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*feishu.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00002 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId1 ${objectId}
insert_policyId_to_file1 intercept_allow_policyId1 ${policyId1}
insert_policyId_to_file1 allow_policyId1 ${policyId2}
Proxy-Policy-allow-00003
[Tags] url
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*smzdm.com,*bilibili.com,*cheapair.com,*surfline.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=passport.bilibili.com/l*,$www.smzdm.com/jingxuan/,*air.com/hotels/,premium
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00003 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId2 ${objectId}
insert_policyId_to_file1 allow_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_allow_policyId2 ${policyId1}
insert_policyId_to_file1 allow_policyId2 ${policyId2}
Proxy-Policy-allow-00004
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*expeditionportal.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=al.com/4wd/
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00004 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId4 ${objectId}
insert_policyId_to_file1 allow_objectId5 ${objectId1}
insert_policyId_to_file1 allow_objectId6 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId3 ${policyId1}
insert_policyId_to_file1 allow_policyId3 ${policyId2}
Proxy-Policy-allow-00005
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.motel6.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=motel6.com/#/home
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00005 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId7 ${objectId}
insert_policyId_to_file1 allow_objectId8 ${objectId1}
insert_policyId_to_file1 allow_objectId9 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId4 ${policyId1}
insert_policyId_to_file1 allow_policyId4 ${policyId2}
Proxy-Policy-allow-00006
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.choicehotels.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=quality-inn
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00006 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId10 ${objectId}
insert_policyId_to_file1 allow_objectId11 ${objectId1}
insert_policyId_to_file1 allow_objectId12 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId5 ${policyId1}
insert_policyId_to_file1 allow_policyId5 ${policyId2}
Proxy-Policy-allow-00007
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.clubmed.us
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=Sandpiper-Bay/y
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00007 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId13 ${objectId}
insert_policyId_to_file1 allow_objectId14 ${objectId1}
insert_policyId_to_file1 allow_objectId15 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId6 ${policyId1}
insert_policyId_to_file1 allow_policyId6 ${policyId2}
Proxy-Policy-allow-00008
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*sse.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=market/overview/
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00008 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId16 ${objectId}
insert_policyId_to_file1 allow_objectId17 ${objectId1}
insert_policyId_to_file1 allow_objectId18 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId7 ${policyId1}
insert_policyId_to_file1 allow_policyId7 ${policyId2}
Proxy-Policy-allow-00009
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*szse.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=lawrules
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00009 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId19 ${objectId}
insert_policyId_to_file1 allow_objectId20 ${objectId1}
insert_policyId_to_file1 allow_objectId21 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId8 ${policyId1}
insert_policyId_to_file1 allow_policyId8 ${policyId2}
Proxy-Policy-allow-00010
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*gf.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=about/intro
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00010 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId22 ${objectId}
insert_policyId_to_file1 allow_objectId23 ${objectId1}
insert_policyId_to_file1 allow_objectId24 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId9 ${policyId1}
insert_policyId_to_file1 allow_policyId9 ${policyId2}
Proxy-Policy-allow-00011
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*chinastock.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=yhwz/investbank
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00011 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId25 ${objectId}
insert_policyId_to_file1 allow_objectId26 ${objectId1}
insert_policyId_to_file1 allow_objectId27 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId10 ${policyId1}
insert_policyId_to_file1 allow_policyId10 ${policyId2}
Proxy-Policy-allow-00012
[Tags] cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.virtuoso.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=destinations
${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-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00012 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId28 ${objectId}
insert_policyId_to_file1 allow_objectId29 ${objectId1}
insert_policyId_to_file1 allow_objectId30 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId11 ${policyId1}
insert_policyId_to_file1 allow_policyId11 ${policyId2}
Proxy-Policy-allow-00013
[Tags] set-cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$russia.payu.com,*925mm.com,*qunar.com,$www.vitalsource.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=pll_language=ru*|Set-Cookie,*Domain=qunar.com;Path=/|Set-Cookie,frontLang=zh-cn|Set-Cookie,_stargate_session*|Set-Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow 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 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00013 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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 allow_objectId31 ${objectId}
insert_policyId_to_file1 allow_objectId32 ${objectId1}
insert_policyId_to_file1 intercept_allow_policyId12 ${policyId1}
insert_policyId_to_file1 allow_policyId12 ${policyId2}
Proxy-Policy-allow-00014
[Tags] 最大组合1
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*sutori.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*teachers
${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 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=__stripe_sid|cookie
${rescode} ${object_ck_Id} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=domain=.sutori.com|set-cookie
${rescode} ${object_sk_Id} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow 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
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00014 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","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_ck_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_sk_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId33 ${object_fqdn_Id}
insert_policyId_to_file1 allow_objectId34 ${object_url_Id}
insert_policyId_to_file1 allow_objectId35 ${object_qq_Id}
insert_policyId_to_file1 allow_objectId36 ${object_yd_Id}
insert_policyId_to_file1 allow_objectId37 ${object_ck_Id}
insert_policyId_to_file1 allow_objectId38 ${object_sk_Id}
insert_policyId_to_file1 intercept_allow_policyId13 ${policyId1}
insert_policyId_to_file1 allow_policyId13 ${policyId2}

View File

@@ -31,7 +31,7 @@ Proxy-Policy-deny-00001
Proxy-Policy-deny-00002 Proxy-Policy-deny-00002
[Tags] cat [Tags] cat
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*mathoverflow.net ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*villaday.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment #创建引用文件 Comment #创建引用文件
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
@@ -52,10 +52,10 @@ Proxy-Policy-deny-00002
Proxy-Policy-deny-00003 Proxy-Policy-deny-00003
[Tags] url [Tags] url
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*wmtransfer.com,*verifone.com,*bcg.com,*rolandberger.com ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*wmtransfer.com,*banbaowang.com,*qidian.com,*rolandberger.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.wmtransfer*,$ww.verifone.com/ru/ru/o-verifone,*country=RU,capabilities ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.wmtransfer*,$www.banbaowang.com/shouchaobao/,*qidian.com/rank,country=RU
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment #创建引用文件 Comment #创建引用文件
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
@@ -102,10 +102,10 @@ Proxy-Policy-deny-00004
Proxy-Policy-deny-00005 Proxy-Policy-deny-00005
[Tags] 请求头 [Tags] 请求头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.thecolor.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$americantesol.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=popularcoloringpages ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=tesol-register
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 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 ${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
@@ -127,10 +127,10 @@ Proxy-Policy-deny-00005
Proxy-Policy-deny-00006 Proxy-Policy-deny-00006
[Tags] 请求头 [Tags] 请求头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$sciencebob.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.playgroundsessions.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=experiments ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=software-features
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent
@@ -212,7 +212,7 @@ Proxy-Policy-deny-00009
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=webdir.html ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=webdir.html
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=utf-8|Content-Type
${rescode} ${objectId2} AddObject2 ${1} ${objectDict} ${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment #创建引用文件 Comment #创建引用文件
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
@@ -251,7 +251,7 @@ Proxy-Policy-deny-00010
log ${policyDict} log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建deny策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00010 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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_profileId4 ${profiledId} insert_policyId_to_file1 deny_profileId4 ${profiledId}
@@ -280,7 +280,7 @@ Proxy-Policy-deny-00011
log ${policyDict} log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建deny策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00011 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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_profileId5 ${profiledId} insert_policyId_to_file1 deny_profileId5 ${profiledId}
@@ -306,7 +306,7 @@ Proxy-Policy-deny-00012
log ${policyDict} log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建deny策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00012 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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_objectId28 ${objectId} insert_policyId_to_file1 deny_objectId28 ${objectId}
@@ -321,14 +321,14 @@ Proxy-Policy-deny-00013
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.nypl.org,*webpronews.com,*ke.com,$nationalbank.kz ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.nypl.org,*webpronews.com,*ke.com,$nationalbank.kz
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie 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 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=incap_ses*|Set-Cookie,*Secure|Set-Cookie,domain=.ke.com|Set-Cookie,irkzadmin_session*|Set-Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
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 ${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} log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建deny策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00013 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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_objectId31 ${objectId} insert_policyId_to_file1 deny_objectId31 ${objectId}
@@ -345,11 +345,11 @@ Proxy-Policy-deny-00014
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略 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 ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict} log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建deny策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00014 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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_objectId33 ${objectId} insert_policyId_to_file1 deny_objectId33 ${objectId}
@@ -359,11 +359,11 @@ Proxy-Policy-deny-00014
Proxy-Policy-deny-00015 Proxy-Policy-deny-00015
[Tags] 应答体 [Tags] 应答体
Comment 创建请求 Comment 创建应答
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ASDFG ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ASDFG
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建deny策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00015 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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_objectId35 ${objectId} insert_policyId_to_file1 deny_objectId35 ${objectId}
@@ -387,7 +387,7 @@ Proxy-Policy-deny-00016
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=mnbv ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=mnbv
${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict}
Comment 创建deny策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00016 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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_objectId36 ${object_fqdn_Id} insert_policyId_to_file1 deny_objectId36 ${object_fqdn_Id}
@@ -409,17 +409,17 @@ Proxy-Policy-deny-00017
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=timezoneoffset|Cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=timezoneoffset|Cookie
${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=visid_incap|Set-Cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Domain=.umusicpub.com|Set-Cookie
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
Comment 创建应答体 Comment 创建应答体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Twitter ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=unsuccessful
${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict}
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=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3 ${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} log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建deny策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00017 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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_objectId41 ${object_fqdn_Id} insert_policyId_to_file1 deny_objectId41 ${object_fqdn_Id}

View File

@@ -0,0 +1,414 @@
*** 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/hijackfiles
*** Test Cases ***
Proxy-Policy-hijack-00001
[Tags] fqdn
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.flyertalk.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=sponsored
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test.apk hijack {"isValid":1,"contentType":"application/vnd.android.package-archive","opAction":"add","profileName":"test1","contentName":"Create-Hijack Files-test.apk","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00001 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 hijack_profileId ${profiledId}
insert_policyId_to_file1 hijack_objectId ${objectId}
insert_policyId_to_file1 hijack_objectId39 ${objectId1}
insert_policyId_to_file1 intercept_hijack_policyId ${policyId1}
insert_policyId_to_file1 hijack_policyId ${policyId2}
Proxy-Policy-hijack-00002
[Tags] cat
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*cruisecritic.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=cruiseto/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00002 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 hijack_profileId1 ${profiledId}
insert_policyId_to_file1 hijack_objectId1 ${objectId}
insert_policyId_to_file1 hijack_objectId40 ${objectId1}
insert_policyId_to_file1 intercept_hijack_policyId1 ${policyId1}
insert_policyId_to_file1 hijack_policyId1 ${policyId2}
Proxy-Policy-hijack-00003
[Tags] url
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*vegas.com,*bytedance.com,*toutiao.com,*douyin.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.vegas.com/lasve*,$job.bytedance.com/society/product,*/ch/news_hot/,com/site/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-1.exe hijack {"isValid":1,"contentType":"application/x-msdos-program","opAction":"add","profileName":"test2","contentName":"Create-Hijack Files-test-1.exe","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00003 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 hijack_profileId2 ${profiledId}
insert_policyId_to_file1 hijack_objectId2 ${objectId}
insert_policyId_to_file1 hijack_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_hijack_policyId2 ${policyId1}
insert_policyId_to_file1 hijack_policyId2 ${policyId2}
Proxy-Policy-hijack-00004
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*huoshan.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=greenlive
${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 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00004 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId3 ${profiledId}
insert_policyId_to_file1 hijack_objectId4 ${objectId}
insert_policyId_to_file1 hijack_objectId5 ${objectId1}
insert_policyId_to_file1 hijack_objectId6 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId3 ${policyId1}
insert_policyId_to_file1 hijack_policyId3 ${policyId2}
Proxy-Policy-hijack-00005
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.ixigua.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=channel/dianying/
${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 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-5.png hijack {"isValid":1,"contentType":"image/png","opAction":"add","profileName":"test4","contentName":"Create-Hijack Files-test-5.png","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00005 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId4 ${profiledId}
insert_policyId_to_file1 hijack_objectId7 ${objectId}
insert_policyId_to_file1 hijack_objectId8 ${objectId1}
insert_policyId_to_file1 hijack_objectId9 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId4 ${policyId1}
insert_policyId_to_file1 hijack_policyId4 ${policyId2}
Proxy-Policy-hijack-00006
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.dcdapp.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=dongchediapp
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-4.jpeg hijack {"isValid":1,"contentType":"image/jpeg","opAction":"add","profileName":"test5","contentName":"Create-Hijack Files-test-4.jpeg","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00006 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId5 ${profiledId}
insert_policyId_to_file1 hijack_objectId10 ${objectId}
insert_policyId_to_file1 hijack_objectId11 ${objectId1}
insert_policyId_to_file1 hijack_objectId12 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId5 ${policyId1}
insert_policyId_to_file1 hijack_policyId5 ${policyId2}
Proxy-Policy-hijack-00007
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.gogokid.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=cn/teacher
${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 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-2.gif hijack {"isValid":1,"contentType":"image/gif","opAction":"add","profileName":"test6","contentName":"Create-Hijack Files-test-2.gif","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00007 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId6 ${profiledId}
insert_policyId_to_file1 hijack_objectId13 ${objectId}
insert_policyId_to_file1 hijack_objectId14 ${objectId1}
insert_policyId_to_file1 hijack_objectId15 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId6 ${policyId1}
insert_policyId_to_file1 hijack_policyId6 ${policyId2}
Proxy-Policy-hijack-00008
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*mafengwo.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=wo.cn/mdd/
${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 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00008 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId7 ${profiledId}
insert_policyId_to_file1 hijack_objectId16 ${objectId}
insert_policyId_to_file1 hijack_objectId17 ${objectId1}
insert_policyId_to_file1 hijack_objectId18 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId7 ${policyId1}
insert_policyId_to_file1 hijack_policyId7 ${policyId2}
Proxy-Policy-hijack-00009
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*sacred-destinations.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=italy/assisi
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00009 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId8 ${profiledId}
insert_policyId_to_file1 hijack_objectId19 ${objectId}
insert_policyId_to_file1 hijack_objectId20 ${objectId1}
insert_policyId_to_file1 hijack_objectId21 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId8 ${policyId1}
insert_policyId_to_file1 hijack_policyId8 ${policyId2}
Proxy-Policy-hijack-00010
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*tianya.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=list-39-1.shtml
${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 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00010 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId9 ${profiledId}
insert_policyId_to_file1 hijack_objectId22 ${objectId}
insert_policyId_to_file1 hijack_objectId23 ${objectId1}
insert_policyId_to_file1 hijack_objectId24 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId9 ${policyId1}
insert_policyId_to_file1 hijack_policyId9 ${policyId2}
Proxy-Policy-hijack-00011
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*mydrivers.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=class/801/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-1.exe hijack {"isValid":1,"contentType":"application/x-msdos-program","opAction":"add","profileName":"test2","contentName":"Create-Hijack Files-test-1.exe","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00011 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId10 ${profiledId}
insert_policyId_to_file1 hijack_objectId25 ${objectId}
insert_policyId_to_file1 hijack_objectId26 ${objectId1}
insert_policyId_to_file1 hijack_objectId27 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId10 ${policyId1}
insert_policyId_to_file1 hijack_policyId10 ${policyId2}
Proxy-Policy-hijack-00012
[Tags] cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$vagabondish.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=vagabondish.com
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=saltkey|Cookie
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-5.png hijack {"isValid":1,"contentType":"image/png","opAction":"add","profileName":"test4","contentName":"Create-Hijack Files-test-5.png","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00012 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId11 ${profiledId}
insert_policyId_to_file1 hijack_objectId28 ${objectId}
insert_policyId_to_file1 hijack_objectId29 ${objectId1}
insert_policyId_to_file1 hijack_objectId30 ${objectId2}
insert_policyId_to_file1 intercept_hijack_policyId11 ${policyId1}
insert_policyId_to_file1 hijack_policyId11 ${policyId2}
Proxy-Policy-hijack-00013
[Tags] set-cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$nsscreencast.com,*edreams.net,*boutiquehotel.me,$www.everymantravel.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_nsscreencast_session_*|Set-Cookie,*Domain=.everymantravel.com;Path=/|Set-Cookie,Domain=.boutiquehotel.me|Set-Cookie,ADRUM_BTa*|Set-Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-4.jpeg hijack {"isValid":1,"contentType":"image/jpeg","opAction":"add","profileName":"test5","contentName":"Create-Hijack Files-test-4.jpeg","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00013 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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 hijack_profileId12 ${profiledId}
insert_policyId_to_file1 hijack_objectId31 ${objectId}
insert_policyId_to_file1 hijack_objectId32 ${objectId1}
insert_policyId_to_file1 intercept_hijack_policyId12 ${policyId1}
insert_policyId_to_file1 hijack_policyId12 ${policyId2}
Proxy-Policy-hijack-00014
[Tags] 最大组合1
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*visitphilly.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*covid-19-resources-for-greater-philadelphia/
${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 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=__stripe_sid|cookie
${rescode} ${object_ck_Id} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=domain=.www.visitphilly.com|set-cookie
${rescode} ${object_sk_Id} AddObject2 ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-2.gif hijack {"isValid":1,"contentType":"image/gif","opAction":"add","profileName":"test6","contentName":"Create-Hijack Files-test-2.gif","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-00014 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"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_ck_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_sk_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 hijack_profileId13 ${profiledId}
insert_policyId_to_file1 hijack_objectId33 ${object_fqdn_Id}
insert_policyId_to_file1 hijack_objectId34 ${object_url_Id}
insert_policyId_to_file1 hijack_objectId35 ${object_qq_Id}
insert_policyId_to_file1 hijack_objectId36 ${object_yd_Id}
insert_policyId_to_file1 hijack_objectId37 ${object_ck_Id}
insert_policyId_to_file1 hijack_objectId38 ${object_sk_Id}
insert_policyId_to_file1 intercept_hijack_policyId13 ${policyId1}
insert_policyId_to_file1 hijack_policyId13 ${policyId2}

View File

@@ -0,0 +1,409 @@
*** 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/insertscripts
*** Test Cases ***
Proxy-Policy-insert-00001
[Tags] fqdn
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.costcotravel.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=costcotravel
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00001 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 insert_profileId ${profiledId}
insert_policyId_to_file1 insert_objectId ${objectId}
insert_policyId_to_file1 insert_objectId39 ${objectId1}
insert_policyId_to_file1 intercept_insert_policyId ${policyId1}
insert_policyId_to_file1 insert_policyId ${policyId2}
Proxy-Policy-insert-00002
[Tags] cat
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*cruisingpower.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=cruisingpower
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00002 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 insert_profileId1 ${profiledId}
insert_policyId_to_file1 insert_objectId1 ${objectId}
insert_policyId_to_file1 insert_objectId40 ${objectId1}
insert_policyId_to_file1 intercept_insert_policyId1 ${policyId1}
insert_policyId_to_file1 insert_policyId1 ${policyId2}
Proxy-Policy-insert-00003
[Tags] url
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*uncorneredmarket.com,*alltrails.com,*atlasobscura.com,*anguilla-beaches.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=uncorneredmarket.com/work*,$www.alltrails.com/signup?ref=header,*experiences,anguilla-villas.html
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00003 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 insert_profileId2 ${profiledId}
insert_policyId_to_file1 insert_objectId2 ${objectId}
insert_policyId_to_file1 insert_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_insert_policyId2 ${policyId1}
insert_policyId_to_file1 insert_policyId2 ${policyId2}
Proxy-Policy-insert-00004
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*viator.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=login_redirect
${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 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00004 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId3 ${profiledId}
insert_policyId_to_file1 insert_objectId4 ${objectId}
insert_policyId_to_file1 insert_objectId5 ${objectId1}
insert_policyId_to_file1 insert_objectId6 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId3 ${policyId1}
insert_policyId_to_file1 insert_policyId3 ${policyId2}
Proxy-Policy-insert-00005
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$matadornetwork.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=destinations
${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 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00005 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId4 ${profiledId}
insert_policyId_to_file1 insert_objectId7 ${objectId}
insert_policyId_to_file1 insert_objectId8 ${objectId1}
insert_policyId_to_file1 insert_objectId9 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId4 ${policyId1}
insert_policyId_to_file1 insert_policyId4 ${policyId2}
Proxy-Policy-insert-00006
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.farecompare.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=hotels/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00006 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId5 ${profiledId}
insert_policyId_to_file1 insert_objectId10 ${objectId}
insert_policyId_to_file1 insert_objectId11 ${objectId1}
insert_policyId_to_file1 insert_objectId12 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId5 ${policyId1}
insert_policyId_to_file1 insert_policyId5 ${policyId2}
Proxy-Policy-insert-00007
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.tripit.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=tripit
${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 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00007 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId6 ${profiledId}
insert_policyId_to_file1 insert_objectId13 ${objectId}
insert_policyId_to_file1 insert_objectId14 ${objectId1}
insert_policyId_to_file1 insert_objectId15 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId6 ${policyId1}
insert_policyId_to_file1 insert_policyId6 ${policyId2}
Proxy-Policy-insert-00008
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*waikikibeachwalk.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=Shops.htm
${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 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00008 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId7 ${profiledId}
insert_policyId_to_file1 insert_objectId16 ${objectId}
insert_policyId_to_file1 insert_objectId17 ${objectId1}
insert_policyId_to_file1 insert_objectId18 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId7 ${policyId1}
insert_policyId_to_file1 insert_policyId7 ${policyId2}
Proxy-Policy-insert-00009
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*guides.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=nevada/las-vegas/
${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 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00009 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId8 ${profiledId}
insert_policyId_to_file1 insert_objectId19 ${objectId}
insert_policyId_to_file1 insert_objectId20 ${objectId1}
insert_policyId_to_file1 insert_objectId21 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId8 ${policyId1}
insert_policyId_to_file1 insert_policyId8 ${policyId2}
Proxy-Policy-insert-00010
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*cnstock.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=ck.com/kcb
${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 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00010 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId9 ${profiledId}
insert_policyId_to_file1 insert_objectId22 ${objectId}
insert_policyId_to_file1 insert_objectId23 ${objectId1}
insert_policyId_to_file1 insert_objectId24 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId9 ${policyId1}
insert_policyId_to_file1 insert_policyId9 ${policyId2}
Proxy-Policy-insert-00011
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*newone.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=cwyw
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00011 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId10 ${profiledId}
insert_policyId_to_file1 insert_objectId25 ${objectId}
insert_policyId_to_file1 insert_objectId26 ${objectId1}
insert_policyId_to_file1 insert_objectId27 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId10 ${policyId1}
insert_policyId_to_file1 insert_policyId10 ${policyId2}
Proxy-Policy-insert-00012
[Tags] cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.eastbay.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=womens.html
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=saltkey|Cookie
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00012 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId11 ${profiledId}
insert_policyId_to_file1 insert_objectId28 ${objectId}
insert_policyId_to_file1 insert_objectId29 ${objectId1}
insert_policyId_to_file1 insert_objectId30 ${objectId2}
insert_policyId_to_file1 intercept_insert_policyId11 ${policyId1}
insert_policyId_to_file1 insert_policyId11 ${policyId2}
Proxy-Policy-insert-00013
[Tags] set-cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.shermanstravel.com,*wyndhamhotels.com,*travelnow.com,$www.smithsonianjourneys.org
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=django_language=en*|Set-Cookie,*Domain=us.travelnow.com|Set-Cookie,device_type=desktop|Set-Cookie,__st_session=*|Set-Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-insert 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 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00013 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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 insert_profileId12 ${profiledId}
insert_policyId_to_file1 insert_objectId31 ${objectId}
insert_policyId_to_file1 insert_objectId32 ${objectId1}
insert_policyId_to_file1 intercept_insert_policyId12 ${policyId1}
insert_policyId_to_file1 insert_policyId12 ${policyId2}
Proxy-Policy-insert-00014
[Tags] 最大组合1
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*intervalworld.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*world.com/web/my/home
${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 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=__stripe_sid|cookie
${rescode} ${object_ck_Id} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Domain=.intervalworld.com|set-cookie
${rescode} ${object_sk_Id} AddObject2 ${1} ${objectDict}
Comment 创建insert文件
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
${profiledId} Get From Dictionary ${response} profileId
Comment 创建insert策略
${policyDict} Create Dictionary policyName=Proxy-Policy-insert-00014 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${profiledId},"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_ck_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_sk_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 insert_profileId13 ${profiledId}
insert_policyId_to_file1 insert_objectId33 ${object_fqdn_Id}
insert_policyId_to_file1 insert_objectId34 ${object_url_Id}
insert_policyId_to_file1 insert_objectId35 ${object_qq_Id}
insert_policyId_to_file1 insert_objectId36 ${object_yd_Id}
insert_policyId_to_file1 insert_objectId37 ${object_ck_Id}
insert_policyId_to_file1 insert_objectId38 ${object_sk_Id}
insert_policyId_to_file1 insert_policyId13 ${policyId2}

View File

@@ -0,0 +1,430 @@
*** 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 ***
*** Test Cases ***
Proxy-Policy-monitor-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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00001 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 monitor_objectId ${objectId}
insert_policyId_to_file1 intercept_monitor_policyId ${policyId1}
insert_policyId_to_file1 monitor_policyId ${policyId2}
Proxy-Policy-monitor-00002
[Tags] cat
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*villaday.com
${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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00002 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 monitor_profileId ${profiledId}
insert_policyId_to_file1 monitor_objectId1 ${objectId}
insert_policyId_to_file1 intercept_monitor_policyId1 ${policyId1}
insert_policyId_to_file1 monitor_policyId1 ${policyId2}
Proxy-Policy-monitor-00003
[Tags] url
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*wmtransfer.com,*banbaowang.com,*qidian.com,*rolandberger.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.wmtransfer*,$www.banbaowang.com/shouchaobao/,*qidian.com/rank,country=RU
${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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00003 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 monitor_profileId1 ${profiledId}
insert_policyId_to_file1 monitor_objectId2 ${objectId}
insert_policyId_to_file1 monitor_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_monitor_policyId2 ${policyId1}
insert_policyId_to_file1 monitor_policyId2 ${policyId2}
Proxy-Policy-monitor-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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00004 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId4 ${objectId}
insert_policyId_to_file1 monitor_objectId5 ${objectId1}
insert_policyId_to_file1 monitor_objectId6 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId3 ${policyId1}
insert_policyId_to_file1 monitor_policyId3 ${policyId2}
Proxy-Policy-monitor-00005
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$americantesol.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=tesol-register
${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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00005 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId7 ${objectId}
insert_policyId_to_file1 monitor_objectId8 ${objectId1}
insert_policyId_to_file1 monitor_objectId9 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId4 ${policyId1}
insert_policyId_to_file1 monitor_policyId4 ${policyId2}
Proxy-Policy-monitor-00006
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.playgroundsessions.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=software-features
${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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00006 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId10 ${objectId}
insert_policyId_to_file1 monitor_objectId11 ${objectId1}
insert_policyId_to_file1 monitor_objectId12 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId5 ${policyId1}
insert_policyId_to_file1 monitor_policyId5 ${policyId2}
Proxy-Policy-monitor-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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00007 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId13 ${objectId}
insert_policyId_to_file1 monitor_objectId14 ${objectId1}
insert_policyId_to_file1 monitor_objectId15 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId6 ${policyId1}
insert_policyId_to_file1 monitor_policyId6 ${policyId2}
Proxy-Policy-monitor-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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00008 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_profileId2 ${profiledId}
insert_policyId_to_file1 monitor_objectId16 ${objectId}
insert_policyId_to_file1 monitor_objectId17 ${objectId1}
insert_policyId_to_file1 monitor_objectId18 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId7 ${policyId1}
insert_policyId_to_file1 monitor_policyId7 ${policyId2}
Proxy-Policy-monitor-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; charset=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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00009 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_profileId3 ${profiledId}
insert_policyId_to_file1 monitor_objectId19 ${objectId}
insert_policyId_to_file1 monitor_objectId20 ${objectId1}
insert_policyId_to_file1 monitor_objectId21 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId8 ${policyId1}
insert_policyId_to_file1 monitor_policyId8 ${policyId2}
Proxy-Policy-monitor-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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00010 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_profileId4 ${profiledId}
insert_policyId_to_file1 monitor_objectId22 ${objectId}
insert_policyId_to_file1 monitor_objectId23 ${objectId1}
insert_policyId_to_file1 monitor_objectId24 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId9 ${policyId1}
insert_policyId_to_file1 monitor_policyId9 ${policyId2}
Proxy-Policy-monitor-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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00011 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_profileId5 ${profiledId}
insert_policyId_to_file1 monitor_objectId25 ${objectId}
insert_policyId_to_file1 monitor_objectId26 ${objectId1}
insert_policyId_to_file1 monitor_objectId27 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId10 ${policyId1}
insert_policyId_to_file1 monitor_policyId10 ${policyId2}
Proxy-Policy-monitor-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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00012 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId28 ${objectId}
insert_policyId_to_file1 monitor_objectId29 ${objectId1}
insert_policyId_to_file1 monitor_objectId30 ${objectId2}
insert_policyId_to_file1 intercept_monitor_policyId11 ${policyId1}
insert_policyId_to_file1 monitor_policyId11 ${policyId2}
Proxy-Policy-monitor-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=incap_ses*|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-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00013 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId31 ${objectId}
insert_policyId_to_file1 monitor_objectId32 ${objectId1}
insert_policyId_to_file1 intercept_monitor_policyId12 ${policyId1}
insert_policyId_to_file1 monitor_policyId12 ${policyId2}
Proxy-Policy-monitor-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-monitor policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00014 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId33 ${objectId}
insert_policyId_to_file1 monitor_objectId34 ${objectId1}
insert_policyId_to_file1 intercept_monitor_policyId13 ${policyId1}
insert_policyId_to_file1 monitor_policyId13 ${policyId2}
Proxy-Policy-monitor-00015
[Tags] 应答体
Comment 创建应答体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ASDFG
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00015 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId35 ${objectId}
insert_policyId_to_file1 monitor_policyId14 ${policyId2}
Proxy-Policy-monitor-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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00016 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId36 ${object_fqdn_Id}
insert_policyId_to_file1 monitor_objectId37 ${object_url_Id}
insert_policyId_to_file1 monitor_objectId38 ${object_qq_Id}
insert_policyId_to_file1 monitor_objectId39 ${object_yd_Id}
insert_policyId_to_file1 monitor_objectId40 ${object_body_Id}
insert_policyId_to_file1 monitor_policyId15 ${policyId2}
Proxy-Policy-monitor-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=Domain=.umusicpub.com|Set-Cookie
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
Comment 创建应答体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=unsuccessful
${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-monitor 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 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00017 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","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 monitor_objectId41 ${object_fqdn_Id}
insert_policyId_to_file1 monitor_objectId42 ${object_url_Id}
insert_policyId_to_file1 monitor_objectId43 ${object_qq_Id}
insert_policyId_to_file1 monitor_objectId44 ${object_yd_Id}
insert_policyId_to_file1 monitor_objectId45 ${object_body_Id}
insert_policyId_to_file1 intercept_monitor_policyId14 ${policyId1}
insert_policyId_to_file1 monitor_policyId16 ${policyId2}

View File

@@ -11,14 +11,14 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
Proxy-Policy-redirect-00001 Proxy-Policy-redirect-00001
[Tags] fqdn [Tags] fqdn
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$newsela.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.abercrombiekent.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${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 ${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} log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建redirect策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00001 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"https://deseretbook.com/t/ebooks/biography-autobiography","code":302,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 redirect_objectId ${objectId} insert_policyId_to_file1 redirect_objectId ${objectId}
@@ -28,17 +28,16 @@ Proxy-Policy-redirect-00001
Proxy-Policy-redirect-00002 Proxy-Policy-redirect-00002
[Tags] cat [Tags] cat
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*mathoverflow.net ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*summitpost.org
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略 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 ${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} log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建redirect策略 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 ${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00002 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"userRegion={"method":"redirect","to":"https://deseretbook.com/t/ebooks/biography-autobiography","code":302,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 redirect_profileId ${profiledId}
insert_policyId_to_file1 redirect_objectId1 ${objectId} insert_policyId_to_file1 redirect_objectId1 ${objectId}
insert_policyId_to_file1 intercept_redirect_policyId1 ${policyId1} insert_policyId_to_file1 intercept_redirect_policyId1 ${policyId1}
insert_policyId_to_file1 redirect_policyId1 ${policyId2} insert_policyId_to_file1 redirect_policyId1 ${policyId2}
@@ -46,10 +45,10 @@ Proxy-Policy-redirect-00002
Proxy-Policy-redirect-00003 Proxy-Policy-redirect-00003
[Tags] url [Tags] url
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*wmtransfer.com,*verifone.com,*bcg.com,*rolandberger.com ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*gobackpacking.com,*visitguam.com,*skift.com,*eviivo.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.wmtransfer*,$ww.verifone.com/ru/ru/o-verifone,*country=RU,capabilities ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=gobackpacking.com/planning*,$wwww.visitguam.com/travel-trade/itineraries/,*ift.com/news/,/products/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略 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 ${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
@@ -59,7 +58,6 @@ Proxy-Policy-redirect-00003
${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 ${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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${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_objectId2 ${objectId}
insert_policyId_to_file1 redirect_objectId3 ${objectId1} insert_policyId_to_file1 redirect_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_redirect_policyId2 ${policyId1} insert_policyId_to_file1 intercept_redirect_policyId2 ${policyId1}
@@ -68,10 +66,10 @@ Proxy-Policy-redirect-00003
Proxy-Policy-redirect-00004 Proxy-Policy-redirect-00004
[Tags] 请求头 [Tags] 请求头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*nielsen.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*dealbase.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=insights ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=flights-search
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
@@ -93,10 +91,10 @@ Proxy-Policy-redirect-00004
Proxy-Policy-redirect-00005 Proxy-Policy-redirect-00005
[Tags] 请求头 [Tags] 请求头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.thecolor.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.portofstockton.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=popularcoloringpages ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=docs-pdfs/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 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 ${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
@@ -118,10 +116,10 @@ Proxy-Policy-redirect-00005
Proxy-Policy-redirect-00006 Proxy-Policy-redirect-00006
[Tags] 请求头 [Tags] 请求头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$sciencebob.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.marriottvacationclub.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=experiments ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=timeshare-ownership/about/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent
@@ -143,10 +141,10 @@ Proxy-Policy-redirect-00006
Proxy-Policy-redirect-00007 Proxy-Policy-redirect-00007
[Tags] 请求头 [Tags] 请求头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.europages.com.ru ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.bulgarihotels.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=ezhegodnik ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=bulgarihotels.com/zh_CN/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
@@ -168,10 +166,10 @@ Proxy-Policy-redirect-00007
Proxy-Policy-redirect-00008 Proxy-Policy-redirect-00008
[Tags] 应答头 [Tags] 应答头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*6renyou.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*essence.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=user_comment ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=business/fixed
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type
@@ -184,7 +182,6 @@ Proxy-Policy-redirect-00008
${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 ${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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${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_objectId16 ${objectId}
insert_policyId_to_file1 redirect_objectId17 ${objectId1} insert_policyId_to_file1 redirect_objectId17 ${objectId1}
insert_policyId_to_file1 redirect_objectId18 ${objectId2} insert_policyId_to_file1 redirect_objectId18 ${objectId2}
@@ -194,10 +191,10 @@ Proxy-Policy-redirect-00008
Proxy-Policy-redirect-00009 Proxy-Policy-redirect-00009
[Tags] 应答头 [Tags] 应答头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*ljale.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*west95582.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=webdir.html ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=/jdw/index.html
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type
@@ -210,7 +207,6 @@ Proxy-Policy-redirect-00009
${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 ${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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${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_objectId19 ${objectId}
insert_policyId_to_file1 redirect_objectId20 ${objectId1} insert_policyId_to_file1 redirect_objectId20 ${objectId1}
insert_policyId_to_file1 redirect_objectId21 ${objectId2} insert_policyId_to_file1 redirect_objectId21 ${objectId2}
@@ -220,10 +216,10 @@ Proxy-Policy-redirect-00009
Proxy-Policy-redirect-00010 Proxy-Policy-redirect-00010
[Tags] 应答头 [Tags] 应答头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*duckduckmoose.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*hazq.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=learn ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=main/aboutus/index.shtml
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type
@@ -236,7 +232,6 @@ Proxy-Policy-redirect-00010
${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 ${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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${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_objectId22 ${objectId}
insert_policyId_to_file1 redirect_objectId23 ${objectId1} insert_policyId_to_file1 redirect_objectId23 ${objectId1}
insert_policyId_to_file1 redirect_objectId24 ${objectId2} insert_policyId_to_file1 redirect_objectId24 ${objectId2}
@@ -246,10 +241,10 @@ Proxy-Policy-redirect-00010
Proxy-Policy-redirect-00011 Proxy-Policy-redirect-00011
[Tags] 应答头 [Tags] 应答头
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*tutcandy.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*cs.ecitic.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=sketch-to ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=newsite/business/bank/tzyh_ywjs/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头 Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
@@ -262,7 +257,6 @@ Proxy-Policy-redirect-00011
${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 ${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} log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 ${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_objectId25 ${objectId}
insert_policyId_to_file1 redirect_objectId26 ${objectId1} insert_policyId_to_file1 redirect_objectId26 ${objectId1}
insert_policyId_to_file1 redirect_objectId27 ${objectId2} insert_policyId_to_file1 redirect_objectId27 ${objectId2}
@@ -272,10 +266,10 @@ Proxy-Policy-redirect-00011
Proxy-Policy-redirect-00012 Proxy-Policy-redirect-00012
[Tags] cookie [Tags] cookie
Comment 创建fqdn Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.youqulu.com ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$polb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=zixun ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=environment/shore-power#shore-power-program-details
${rescode} ${objectId1} AddObject2 ${1} ${objectDict} ${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建cookie Comment 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=saltkey|Cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=saltkey|Cookie

View File

@@ -0,0 +1,355 @@
*** 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-replace-00001
[Tags] fqdn
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$destidotcom.wordpress.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=wordpress.com/contact/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00001 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_body","find":"History","replace_with":"明天你好"}],"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 replace_objectId ${objectId}
insert_policyId_to_file1 replace_objectId39 ${objectId1}
insert_policyId_to_file1 intercept_replace_policyId ${policyId1}
insert_policyId_to_file1 replace_policyId ${policyId2}
Proxy-Policy-replace-00002
[Tags] cat
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*trip.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=trains/china/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00002 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_req_uri","find":"trains/china/","replace_with":"cars/"}],"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 replace_objectId1 ${objectId}
insert_policyId_to_file1 replace_objectId40 ${objectId1}
insert_policyId_to_file1 intercept_replace_policyId1 ${policyId1}
insert_policyId_to_file1 replace_policyId1 ${policyId2}
Proxy-Policy-replace-00003
[Tags] url
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*smartertravel.com,*chinese.hostelworld.com,*hotelplanner.com,*nycgo.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.smartertravel.com/privacy*,$www.chinese.hostelworld.com/minsu,*Group-Rate/,press-and-media/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00003 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 replace_objectId2 ${objectId}
insert_policyId_to_file1 replace_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_replace_policyId2 ${policyId1}
insert_policyId_to_file1 replace_policyId2 ${policyId2}
Proxy-Policy-replace-00004
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*kualoa.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=kualoa-life/
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00004 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId4 ${objectId}
insert_policyId_to_file1 replace_objectId5 ${objectId1}
insert_policyId_to_file1 replace_objectId6 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId3 ${policyId1}
insert_policyId_to_file1 replace_policyId3 ${policyId2}
Proxy-Policy-replace-00005
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.bestwestern.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=estern.com/en_US.html
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00005 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId7 ${objectId}
insert_policyId_to_file1 replace_objectId8 ${objectId1}
insert_policyId_to_file1 replace_objectId9 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId4 ${policyId1}
insert_policyId_to_file1 replace_policyId4 ${policyId2}
Proxy-Policy-replace-00006
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.wollmanskatingrink.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=tingrink.com/hours
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00006 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId10 ${objectId}
insert_policyId_to_file1 replace_objectId11 ${objectId1}
insert_policyId_to_file1 replace_objectId12 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId5 ${policyId1}
insert_policyId_to_file1 replace_policyId5 ${policyId2}
Proxy-Policy-replace-00007
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$packages.webjet.com.au
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=webjet.com.au/packages/
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00007 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId13 ${objectId}
insert_policyId_to_file1 replace_objectId14 ${objectId1}
insert_policyId_to_file1 replace_objectId15 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId6 ${policyId1}
insert_policyId_to_file1 replace_policyId6 ${policyId2}
Proxy-Policy-replace-00008
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*www.ghzq.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=ghzq/index.html
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00008 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId16 ${objectId}
insert_policyId_to_file1 replace_objectId17 ${objectId1}
insert_policyId_to_file1 replace_objectId18 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId7 ${policyId1}
insert_policyId_to_file1 replace_policyId7 ${policyId2}
Proxy-Policy-replace-00009
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*zts.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=consult/consult.aspx
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00009 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId19 ${objectId}
insert_policyId_to_file1 replace_objectId20 ${objectId1}
insert_policyId_to_file1 replace_objectId21 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId8 ${policyId1}
insert_policyId_to_file1 replace_policyId8 ${policyId2}
Proxy-Policy-replace-00010
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=action
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00010 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"hello","replace_with":"111111"}],"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 replace_objectId22 ${objectId}
insert_policyId_to_file1 replace_objectId23 ${objectId1}
insert_policyId_to_file1 replace_objectId24 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId9 ${policyId1}
insert_policyId_to_file1 replace_policyId9 ${policyId2}
Proxy-Policy-replace-00011
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*shfe.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=products/au/
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00011 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId25 ${objectId}
insert_policyId_to_file1 replace_objectId26 ${objectId1}
insert_policyId_to_file1 replace_objectId27 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId10 ${policyId1}
insert_policyId_to_file1 replace_policyId10 ${policyId2}
Proxy-Policy-replace-00012
[Tags] cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.national-park.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=welcome-to-canyonlands-national-park/
${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-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00012 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId28 ${objectId}
insert_policyId_to_file1 replace_objectId29 ${objectId1}
insert_policyId_to_file1 replace_objectId30 ${objectId2}
insert_policyId_to_file1 intercept_replace_policyId11 ${policyId1}
insert_policyId_to_file1 replace_policyId11 ${policyId2}
Proxy-Policy-replace-00013
[Tags] set-cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.classicvacations.com,*expediacruises.com,*expediagroup.com,$www.expedia.co.uk
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AWSALB*|Set-Cookie,*Domain=.expedia.co.uk; Secure; SameSite=None|Set-Cookie,AWSALBCORS=|Set-Cookie,CurentCulture=en-US*|Set-Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00013 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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 replace_objectId31 ${objectId}
insert_policyId_to_file1 replace_objectId32 ${objectId1}
insert_policyId_to_file1 intercept_replace_policyId12 ${policyId1}
insert_policyId_to_file1 replace_policyId12 ${policyId2}
Proxy-Policy-replace-00014
[Tags] 最大组合1
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*hotelplanner.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*/Group-Rate/
${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 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=__stripe_sid|cookie
${rescode} ${object_ck_Id} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=CURRENCY=USD|set-cookie
${rescode} ${object_sk_Id} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-replace 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 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00014 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"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_ck_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_sk_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 replace_objectId33 ${object_fqdn_Id}
insert_policyId_to_file1 replace_objectId34 ${object_url_Id}
insert_policyId_to_file1 replace_objectId35 ${object_qq_Id}
insert_policyId_to_file1 replace_objectId36 ${object_yd_Id}
insert_policyId_to_file1 replace_objectId37 ${object_ck_Id}
insert_policyId_to_file1 replace_objectId38 ${object_sk_Id}
insert_policyId_to_file1 intercept_replace_policyId13 ${policyId1}
insert_policyId_to_file1 replace_policyId13 ${policyId2}

View File

@@ -0,0 +1,270 @@
*** 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-allow-00001
[Tags] fqdn
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00001.bat
... ELSE set variable curl -kv https://mp.pipix.com/extra/user_agreement
${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 allow_starttime ${starttime} allow_endtime ${endtime}
Proxy-Policy-allow-00002
[Tags] cat
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00002.bat
... ELSE set variable curl -kv https://www.feishu.cn/solutions/scenarios/remote-work
${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 allow_starttime1 ${starttime} allow_endtime1 ${endtime}
Proxy-Policy-allow-00003
[Tags] url
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003.bat
... ELSE set variable curl -kv \ https://www.smzdm.com/jingxuan/
${stringlist} run keyword if '${systemType}'=='Windows' Create List PC所有AB测试集合 Tango Secure Gateway CA
... ELSE Create List PC所有AB测试集合 Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime2 ${starttime} allow_endtime2 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_1.bat
... ELSE set variable curl -kv \ https://passport.bilibili.com/login
${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 allow_starttime3 ${starttime} allow_endtime3 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_2.bat
... ELSE set variable curl -kv \ https://www.cheapair.com/hotels/
${stringlist} run keyword if '${systemType}'=='Windows' Create List search cheap hotels Tango Secure Gateway CA
... ELSE Create List search cheap hotels Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime4 ${starttime} allow_endtime4 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_3.bat
... ELSE set variable curl -kv https://www.surfline.com/category/premium
${stringlist} run keyword if '${systemType}'=='Windows' Create List premium journalism. Get breaking news in all things surf Tango Secure Gateway CA
... ELSE Create List premium journalism. Get breaking news in all things surf Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime5 ${starttime} allow_endtime5 ${endtime}
Proxy-Policy-allow-00004
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_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://expeditionportal.com/4wd/
${stringlist} run keyword if '${systemType}'=='Windows' Create List as images are available in the DOM Tango Secure Gateway CA
... ELSE Create List as images are available in the DOM Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime6 ${starttime} allow_endtime6 ${endtime}
Proxy-Policy-allow-00005
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_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.motel6.com/#/home
${stringlist} run keyword if '${systemType}'=='Windows' Create List This site might not work properly in this browser Tango Secure Gateway CA
... ELSE Create List This site might not work properly in this browser Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime7 ${starttime} allow_endtime7 ${endtime}
Proxy-Policy-allow-00006
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_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://www.choicehotels.com/quality-inn
${stringlist} run keyword if '${systemType}'=='Windows' Create List stores locale settings for multiple country sites Tango Secure Gateway CA
... ELSE Create List stores locale settings for multiple country sites Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime8 ${starttime} allow_endtime8 ${endtime}
Proxy-Policy-allow-00007
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_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.clubmed.us/r/Sandpiper-Bay/y
${stringlist} run keyword if '${systemType}'=='Windows' Create List per night per adult based Tango Secure Gateway CA
... ELSE Create List per night per adult based Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime9 ${starttime} allow_endtime9 ${endtime}
Proxy-Policy-allow-00008
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00008.bat
... ELSE set variable curl http://www.sse.com.cn/market/overview/
${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 allow_starttime10 ${starttime} allow_endtime10 ${endtime}
Proxy-Policy-allow-00009
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00009.bat
... ELSE set variable curl http://www.szse.cn/lawrules/index.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 allow_starttime11 ${starttime} allow_endtime11 ${endtime}
Proxy-Policy-allow-00010
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00010.bat
... ELSE set variable curl http://www.gf.com.cn/about/intro
${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 allow_starttime12 ${starttime} allow_endtime12 ${endtime}
Proxy-Policy-allow-00011
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00011.bat
... ELSE set variable curl http://www.chinastock.com.cn/yhwz/investbank/index.shtml
${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 allow_starttime13 ${starttime} allow_endtime13 ${endtime}
Proxy-Policy-allow-00012
[Tags] cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_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.virtuoso.com/destinations
${stringlist} run keyword if '${systemType}'=='Windows' Create List Object moved to Tango Secure Gateway CA
... ELSE Create List Object moved to Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime14 ${starttime} allow_endtime14 ${endtime}
Proxy-Policy-allow-00013
[Tags] set-cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00013.bat
... ELSE set variable curl -kv https://russia.payu.com/orange-data/
${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 allow_starttime15 ${starttime} allow_endtime15 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00013_1.bat
... ELSE set variable curl -kv https://tytbz.925mm.com/page/about.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 allow_starttime16 ${starttime} allow_endtime16 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00013_2.bat
... ELSE set variable curl -kv https://dujia.qunar.com/?ex_track=auto_52b3f121
${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 allow_starttime17 ${starttime} allow_endtime17 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00013_3.bat
... ELSE set variable curl -kv https://www.vitalsource.com/textbooks
${stringlist} run keyword if '${systemType}'=='Windows' Create List VitalSource Technologies Inc Tango Secure Gateway CA
... ELSE Create List VitalSource Technologies Inc Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime18 ${starttime} allow_endtime18 ${endtime}
Proxy-Policy-allow-00014
[Tags] 最大组合
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00017.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" \ --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.sutori.com/teachers
${stringlist} run keyword if '${systemType}'=='Windows' Create List The best instructional and presentation tool Tango Secure Gateway CA
... ELSE Create List The best instructional and presentation tool Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 allow_starttime19 ${starttime} allow_endtime19 ${endtime}

View File

@@ -287,7 +287,7 @@ SecurityPolicy-Deny-Http-00016
[Tags] 最大组合1 [Tags] 最大组合1
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00016.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00016.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=qazxsw&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=qazxs&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer ... ELSE Create List Connection reset by peer
${starttime} Get Time ${starttime} Get Time

View File

@@ -25,7 +25,7 @@ Proxy-Policy-deny-00002
[Tags] cat [Tags] cat
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00002.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00002.bat
... ELSE set variable curl -kv \ https://mathoverflow.net/questions ... ELSE set variable curl -kv \ \ https://www.villaday.com/villageList
${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 ${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 ... 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 ${starttime} Get Time
@@ -50,7 +50,7 @@ Proxy-Policy-deny-00003
insert_time_to_file1 deny_starttime2 ${starttime} deny_endtime2 ${endtime} insert_time_to_file1 deny_starttime2 ${starttime} deny_endtime2 ${endtime}
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_1.bat ${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 ... ELSE set variable curl -kv \ https://www.banbaowang.com/shouchaobao/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
${starttime} Get Time ${starttime} Get Time
@@ -61,7 +61,7 @@ Proxy-Policy-deny-00003
insert_time_to_file1 deny_starttime3 ${starttime} deny_endtime3 ${endtime} insert_time_to_file1 deny_starttime3 ${starttime} deny_endtime3 ${endtime}
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_2.bat ${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 ... ELSE set variable curl -kv \ https://www.qidian.com/rank
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
${starttime} Get Time ${starttime} Get Time
@@ -100,7 +100,7 @@ Proxy-Policy-deny-00005
[Tags] 请求头 [Tags] 请求头
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00005.bat ${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 ... 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://americantesol.com/tesol-register.html
${stringlist} run keyword if '${systemType}'=='Windows' Create List онлайн фильмы Tango Secure Gateway CA ${stringlist} run keyword if '${systemType}'=='Windows' Create List онлайн фильмы Tango Secure Gateway CA
... ELSE Create List онлайн фильмы Tango Secure Gateway CA ... ELSE Create List онлайн фильмы Tango Secure Gateway CA
${starttime} Get Time ${starttime} Get Time
@@ -114,7 +114,7 @@ Proxy-Policy-deny-00006
[Tags] 请求头 [Tags] 请求头
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00006.bat ${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/ ... 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.playgroundsessions.com/about/software-features
${stringlist} run keyword if '${systemType}'=='Windows' Create List 明天大涨 Tango Secure Gateway CA ${stringlist} run keyword if '${systemType}'=='Windows' Create List 明天大涨 Tango Secure Gateway CA
... ELSE Create List 明天大涨 Tango Secure Gateway CA ... ELSE Create List 明天大涨 Tango Secure Gateway CA
${starttime} Get Time ${starttime} Get Time
@@ -245,7 +245,7 @@ Proxy-Policy-deny-00013
insert_time_to_file1 deny_starttime17 ${starttime} deny_endtime17 ${endtime} insert_time_to_file1 deny_starttime17 ${starttime} deny_endtime17 ${endtime}
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_3.bat ${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 ... ELSE set variable curl -kv \ https://nationalbank.kz/?switch=kazakh
${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA
... ELSE Create List 一直相信 Tango Secure Gateway CA ... ELSE Create List 一直相信 Tango Secure Gateway CA
${starttime} Get Time ${starttime} Get Time
@@ -259,9 +259,9 @@ Proxy-Policy-deny-00014
[Tags] 请求体 [Tags] 请求体
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer Tango Secure Gateway CA ... ELSE Create List Connection reset by peer
${starttime} Get Time ${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -273,9 +273,9 @@ Proxy-Policy-deny-00015
[Tags] 应答体 [Tags] 应答体
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=12345678&contentType=content-type&resBody=ASDFG" https://open.node.com/action ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=12345678&contentType=content-type&resBody=ASDFG" http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE &setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action Connection reset by peer Tango Secure Gateway CA ... ELSE Create List Connection reset by peer
${starttime} Get Time ${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -287,9 +287,9 @@ Proxy-Policy-deny-00016
[Tags] 最大组合1 [Tags] 最大组合1
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00016.bat ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00016.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=mnbv&setCookie=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 ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=mnbv&setCookie=asdf&contentType=content-type&resBody=adzx" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA ${stringlist} run keyword if '${systemType}'=='Windows' Create List 涨涨涨涨
... ELSE Create List Connection reset by peer Tango Secure Gateway CA ... ELSE Create List 涨涨涨涨
${starttime} Get Time ${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist} ${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -301,7 +301,7 @@ Proxy-Policy-deny-00017
[Tags] 最大组合2 [Tags] 最大组合2
Comment 功能端验证HTTP验证 Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00017.bat ${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/ ... 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://www.umusicpub.com/au/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA ${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 ... ELSE Create List Connection reset by peer Tango Secure Gateway CA
${starttime} Get Time ${starttime} Get Time

View File

@@ -0,0 +1,270 @@
*** 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-hijack-00001
[Tags] fqdn
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00001.bat
... ELSE set variable curl -kv \ https://www.flyertalk.com/sponsored/?prx_t=m-MFA4ydEAkfMQA
${stringlist} run keyword if '${systemType}'=='Windows' Create List 6b72:f91d:6f81:bfcd:5b0f:e81d:f827:e075 Tango Secure Gateway CA
... ELSE Create List 6b72:f91d:6f81:bfcd:5b0f:e81d:f827:e075 Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime ${starttime} hijack_endtime ${endtime}
Proxy-Policy-hijack-00002
[Tags] cat
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00002.bat
... ELSE set variable curl -kv https://www.cruisecritic.com/cruiseto/
${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 hijack_starttime1 ${starttime} hijack_endtime1 ${endtime}
Proxy-Policy-hijack-00003
[Tags] url
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00003.bat
... ELSE set variable curl -kv https://www.vegas.com/lasvegastraveldeals/
${stringlist} run keyword if '${systemType}'=='Windows' Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac Tango Secure Gateway CA
... ELSE Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime2 ${starttime} hijack_endtime2 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00003_1.bat
... ELSE set variable curl -kv https://job.bytedance.com/society/product
${stringlist} run keyword if '${systemType}'=='Windows' Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac Tango Secure Gateway CA
... ELSE Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime3 ${starttime} hijack_endtime3 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00003_2.bat
... ELSE set variable curl -kv https://www.toutiao.com/ch/news_hot/
${stringlist} run keyword if '${systemType}'=='Windows' Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac Tango Secure Gateway CA
... ELSE Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime4 ${starttime} hijack_endtime4 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00003_3.bat
... ELSE set variable curl -kv https://e.douyin.com/site/
${stringlist} run keyword if '${systemType}'=='Windows' Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac Tango Secure Gateway CA
... ELSE Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime5 ${starttime} hijack_endtime5 ${endtime}
Proxy-Policy-hijack-00004
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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.huoshan.com/greenlive/union_hall/
${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 hijack_starttime6 ${starttime} hijack_endtime6 ${endtime}
Proxy-Policy-hijack-00005
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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.ixigua.com/channel/dianying/
${stringlist} run keyword if '${systemType}'=='Windows' Create List bFiles-test-5.png Tango Secure Gateway CA
... ELSE Create List bFiles-test-5.png Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime7 ${starttime} hijack_endtime7 ${endtime}
Proxy-Policy-hijack-00006
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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://www.dcdapp.com/?zt=dongchediapp
${stringlist} run keyword if '${systemType}'=='Windows' Create List test-4.jpeg Tango Secure Gateway CA
... ELSE Create List test-4.jpeg Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime8 ${starttime} hijack_endtime8 ${endtime}
Proxy-Policy-hijack-00007
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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.gogokid.com.cn/teacher
${stringlist} run keyword if '${systemType}'=='Windows' Create List test-2.gif Tango Secure Gateway CA
... ELSE Create List test-2.gif Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime9 ${starttime} hijack_endtime9 ${endtime}
Proxy-Policy-hijack-00008
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00008.bat
... ELSE set variable curl http://www.mafengwo.cn/mdd/
${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 hijack_starttime10 ${starttime} hijack_endtime10 ${endtime}
Proxy-Policy-hijack-00009
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00009.bat
... ELSE set variable curl http://www.sacred-destinations.com/italy/assisi
${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 hijack_starttime11 ${starttime} hijack_endtime11 ${endtime}
Proxy-Policy-hijack-00010
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00010.bat
... ELSE set variable curl http://bbs.tianya.cn/list-39-1.shtml
${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 hijack_starttime12 ${starttime} hijack_endtime12 ${endtime}
Proxy-Policy-hijack-00011
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00011.bat
... ELSE set variable curl http://hardware.mydrivers.com/class/801/
${stringlist} run keyword if '${systemType}'=='Windows' Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac
... ELSE Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime13 ${starttime} hijack_endtime13 ${endtime}
Proxy-Policy-hijack-00012
[Tags] cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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://vagabondish.com/category/features/
${stringlist} run keyword if '${systemType}'=='Windows' Create List bFiles-test-5.png Tango Secure Gateway CA
... ELSE Create List bFiles-test-5.png Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime14 ${starttime} hijack_endtime14 ${endtime}
Proxy-Policy-hijack-00013
[Tags] set-cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00013.bat
... ELSE set variable curl -kv https://nsscreencast.com/episodes
${stringlist} run keyword if '${systemType}'=='Windows' Create List test-4.jpeg Tango Secure Gateway CA
... ELSE Create List test-4.jpeg Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime15 ${starttime} hijack_endtime15 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00013_1.bat
... ELSE set variable curl -kv https://www.edreams.net/merch/trends/
${stringlist} run keyword if '${systemType}'=='Windows' Create List test-4.jpeg Tango Secure Gateway CA
... ELSE Create List test-4.jpeg Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime16 ${starttime} hijack_endtime16 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00013_2.bat
... ELSE set variable curl -kv https://boutiquehotel.me/paris/
${stringlist} run keyword if '${systemType}'=='Windows' Create List test-4.jpeg Tango Secure Gateway CA
... ELSE Create List test-4.jpeg Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime17 ${starttime} hijack_endtime17 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00013_3.bat
... ELSE set variable curl -kv https://www.everymantravel.com/terms?qo=footerLinkss/
${stringlist} run keyword if '${systemType}'=='Windows' Create List test-4.jpeg Tango Secure Gateway CA
... ELSE Create List test-4.jpeg Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime18 ${starttime} hijack_endtime18 ${endtime}
Proxy-Policy-hijack-00014
[Tags] 最大组合
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00017.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" \ --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.visitphilly.com/covid-19-resources-for-greater-philadelphia/
${stringlist} run keyword if '${systemType}'=='Windows' Create List test-2.gif Tango Secure Gateway CA
... ELSE Create List test-2.gif Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 hijack_starttime19 ${starttime} hijack_endtime19 ${endtime}

View File

@@ -0,0 +1,270 @@
*** 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-insert-00001
[Tags] fqdn
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00001.bat
... ELSE set variable curl -kv https://www.costcotravel.com/Vacation-Packages
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime ${starttime} insert_endtime ${endtime}
Proxy-Policy-insert-00002
[Tags] cat
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00002.bat
... ELSE set variable curl -kv https://secure.cruisingpower.com/public/registration/choose.do
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime1 ${starttime} insert_endtime1 ${endtime}
Proxy-Policy-insert-00003
[Tags] url
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00003.bat
... ELSE set variable curl -kv https://uncorneredmarket.com/work-with-us/tourism-strategy/
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime2 ${starttime} insert_endtime2 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00003_1.bat
... ELSE set variable curl -kv https://www.alltrails.com/signup?ref=header
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime3 ${starttime} insert_endtime3 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00003_2.bat
... ELSE set variable curl -kv https://www.atlasobscura.com/experiences
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime4 ${starttime} insert_endtime4 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00003_3.bat
... ELSE set variable curl -kv https://www.anguilla-beaches.com/anguilla-villas.html
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime5 ${starttime} insert_endtime5 ${endtime}
Proxy-Policy-insert-00004
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_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.viator.com/login?login_redirect=%2Faccount%2Fbookings
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime6 ${starttime} insert_endtime6 ${endtime}
Proxy-Policy-insert-00005
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_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://matadornetwork.com/destinations/north-america/united-states/
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime7 ${starttime} insert_endtime7 ${endtime}
Proxy-Policy-insert-00006
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_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://www.farecompare.com/hotels/
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime8 ${starttime} insert_endtime8 ${endtime}
Proxy-Policy-insert-00007
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_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.tripit.com/web
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime9 ${starttime} insert_endtime9 ${endtime}
Proxy-Policy-insert-00008
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00008.bat
... ELSE set variable curl http://www.waikikibeachwalk.com/Shops.htm
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime10 ${starttime} insert_endtime10 ${endtime}
Proxy-Policy-insert-00009
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00009.bat
... ELSE set variable curl http://www.world-guides.com/north-america/usa/nevada/las-vegas/
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime11 ${starttime} insert_endtime11 ${endtime}
Proxy-Policy-insert-00010
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00010.bat
... ELSE set variable curl http://news.cnstock.com/kcb
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime12 ${starttime} insert_endtime12 ${endtime}
Proxy-Policy-insert-00011
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00011.bat
... ELSE set variable curl http://otc.newone.com.cn/cwyw
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime13 ${starttime} insert_endtime13 ${endtime}
Proxy-Policy-insert-00012
[Tags] cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_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.eastbay.com/category/womens.html
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime14 ${starttime} insert_endtime14 ${endtime}
Proxy-Policy-insert-00013
[Tags] set-cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00013.bat
... ELSE set variable curl -kv https://www.shermanstravel.com/interests/deals-now-travel-later-1
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime15 ${starttime} insert_endtime15 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00013_1.bat
... ELSE set variable curl -kv https://www.wyndhamhotels.com/laquinta
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime16 ${starttime} insert_endtime16 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00013_2.bat
... ELSE set variable curl -kv https://us.travelnow.com/profile/findbookings.html
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime17 ${starttime} insert_endtime17 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00013_3.bat
... ELSE set variable curl -kv https://www.smithsonianjourneys.org/tours/tripfinder/
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime18 ${starttime} insert_endtime18 ${endtime}
Proxy-Policy-insert-00014
[Tags] 最大组合2
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00017.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" \ --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.intervalworld.com/web/my/home
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 insert_starttime19 ${starttime} insert_endtime19 ${endtime}

View File

@@ -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-monitor-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 monitor_starttime ${starttime} monitor_endtime ${endtime}
Proxy-Policy-monitor-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://www.villaday.com/villageList
${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 monitor_starttime1 ${starttime} monitor_endtime1 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime2 ${starttime} monitor_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.banbaowang.com/shouchaobao/
${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 monitor_starttime3 ${starttime} monitor_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.qidian.com/rank
${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 monitor_starttime4 ${starttime} monitor_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 monitor_starttime5 ${starttime} monitor_endtime5 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime6 ${starttime} monitor_endtime6 ${endtime}
Proxy-Policy-monitor-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://americantesol.com/tesol-register.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 monitor_starttime7 ${starttime} monitor_endtime7 ${endtime}
Proxy-Policy-monitor-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://www.playgroundsessions.com/about/software-features
${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 monitor_starttime8 ${starttime} monitor_endtime8 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime9 ${starttime} monitor_endtime9 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime10 ${starttime} monitor_endtime10 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime11 ${starttime} monitor_endtime11 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime12 ${starttime} monitor_endtime12 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime13 ${starttime} monitor_endtime13 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime14 ${starttime} monitor_endtime14 ${endtime}
Proxy-Policy-monitor-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 monitor_starttime15 ${starttime} monitor_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 monitor_starttime16 ${starttime} monitor_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 monitor_starttime17 ${starttime} monitor_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 monitor_starttime18 ${starttime} monitor_endtime18 ${endtime}
Proxy-Policy-monitor-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" http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 monitor_starttime19 ${starttime} monitor_endtime19 ${endtime}
Proxy-Policy-monitor-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" http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 monitor_starttime20 ${starttime} monitor_endtime20 ${endtime}
Proxy-Policy-monitor-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=asdf&contentType=content-type&resBody=adzx" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action
${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 monitor_starttime21 ${starttime} monitor_endtime21 ${endtime}
Proxy-Policy-monitor-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://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 monitor_starttime22 ${starttime} monitor_endtime22 ${endtime}

View File

@@ -0,0 +1,298 @@
*** 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-redirect-00001
[Tags] fqdn
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00001.bat
... ELSE set variable curl -kv https://www.abercrombiekent.com/travel-destinations
${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 redirect_starttime ${starttime} redirect_endtime ${endtime}
Proxy-Policy-redirect-00002
[Tags] cat
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00002.bat
... ELSE set variable curl -kv https://www.summitpost.org/mountain/rock/
${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 redirect_starttime1 ${starttime} redirect_endtime1 ${endtime}
Proxy-Policy-redirect-00003
[Tags] url
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00003.bat
... ELSE set variable curl -kv https://gobackpacking.com/planning/accommodations/
${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 redirect_starttime2 ${starttime} redirect_endtime2 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00003_1.bat
... ELSE set variable curl -kv https://www.visitguam.com/travel-trade/itineraries/
${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 redirect_starttime3 ${starttime} redirect_endtime3 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00003_2.bat
... ELSE set variable curl -kv https://skift.com/news/
${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 redirect_starttime4 ${starttime} redirect_endtime4 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00003_3.bat
... ELSE set variable curl -kv https://eviivo.com/products/
${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 redirect_starttime5 ${starttime} redirect_endtime5 ${endtime}
Proxy-Policy-redirect-00004
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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.dealbase.com/#flights-search
${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 redirect_starttime6 ${starttime} redirect_endtime6 ${endtime}
Proxy-Policy-redirect-00005
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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.portofstockton.com/docs-pdfs/
${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 redirect_starttime7 ${starttime} redirect_endtime7 ${endtime}
Proxy-Policy-redirect-00006
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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://www.marriottvacationclub.com/timeshare-ownership/about/
${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 redirect_starttime8 ${starttime} redirect_endtime8 ${endtime}
Proxy-Policy-redirect-00007
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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.bulgarihotels.com/zh_CN/
${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 redirect_starttime9 ${starttime} redirect_endtime9 ${endtime}
Proxy-Policy-redirect-00008
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00008.bat
... ELSE set variable curl http://www.essence.com.cn/business/fixed
${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 redirect_starttime10 ${starttime} redirect_endtime10 ${endtime}
Proxy-Policy-redirect-00009
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00009.bat
... ELSE set variable curl http://www.west95582.com/jdw/index.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 redirect_starttime11 ${starttime} redirect_endtime11 ${endtime}
Proxy-Policy-redirect-00010
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00010.bat
... ELSE set variable curl http://www.hazq.com/main/aboutus/index.shtml
${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 redirect_starttime12 ${starttime} redirect_endtime12 ${endtime}
Proxy-Policy-redirect-00011
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00011.bat
... ELSE set variable curl http://www.cs.ecitic.com/newsite/business/bank/tzyh_ywjs/
${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 redirect_starttime13 ${starttime} redirect_endtime13 ${endtime}
Proxy-Policy-redirect-00012
[Tags] cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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.polb.com/environment/shore-power#shore-power-program-details
${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 redirect_starttime14 ${starttime} redirect_endtime14 ${endtime}
Proxy-Policy-redirect-00013
[Tags] set-cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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 redirect_starttime15 ${starttime} redirect_endtime15 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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 redirect_starttime16 ${starttime} redirect_endtime16 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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 redirect_starttime17 ${starttime} redirect_endtime17 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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 redirect_starttime18 ${starttime} redirect_endtime18 ${endtime}
Proxy-Policy-redirect-00014
[Tags] 请求体
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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 redirect_starttime19 ${starttime} redirect_endtime19 ${endtime}
Proxy-Policy-redirect-00015
[Tags] 最大组合1
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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 redirect_starttime19 ${starttime} redirect_endtime19 ${endtime}
Proxy-Policy-redirect-00016
[Tags] 最大组合2
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_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 redirect_starttime19 ${starttime} redirect_endtime19 ${endtime}

View File

@@ -0,0 +1,270 @@
*** 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-replace-00001
[Tags] fqdn
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00001.bat
... ELSE set variable curl -kv https://destidotcom.wordpress.com/contact/
${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 replace_starttime ${starttime} replace_endtime ${endtime}
Proxy-Policy-replace-00002
[Tags] cat
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00002.bat
... ELSE set variable curl -kv https://www.trip.com/trains/china/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Search Cars Tango Secure Gateway CA
... ELSE Create List Search Cars Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime1 ${starttime} replace_endtime1 ${endtime}
Proxy-Policy-replace-00003
[Tags] url
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00003.bat
... ELSE set variable curl -kv https://www.smartertravel.com/privacy-policy/
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime2 ${starttime} replace_endtime2 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00003_1.bat
... ELSE set variable curl -kv https://www.chinese.hostelworld.com/minsu
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime3 ${starttime} replace_endtime3 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00003_2.bat
... ELSE set variable curl -kv https://www.hotelplanner.com/Group-Rate/
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime4 ${starttime} replace_endtime4 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00003_3.bat
... ELSE set variable curl -kv https://business.nycgo.com/press-and-media/
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime5 ${starttime} replace_endtime5 ${endtime}
Proxy-Policy-replace-00004
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_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.kualoa.com/kualoa-life/
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime6 ${starttime} replace_endtime6 ${endtime}
Proxy-Policy-replace-00005
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_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.bestwestern.com/en_US.html
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime7 ${starttime} replace_endtime7 ${endtime}
Proxy-Policy-replace-00006
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_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://www.wollmanskatingrink.com/hours
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime8 ${starttime} replace_endtime8 ${endtime}
Proxy-Policy-replace-00007
[Tags] 请求头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_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://packages.webjet.com.au/packages/
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime9 ${starttime} replace_endtime9 ${endtime}
Proxy-Policy-replace-00008
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00008.bat
... ELSE set variable curl http://www.ghzq.com.cn/ghzq/index.html
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json
... ELSE Create List text/json
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime10 ${starttime} replace_endtime10 ${endtime}
Proxy-Policy-replace-00009
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00009.bat
... ELSE set variable curl http://www.zts.com.cn/consult/consult.aspx
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json
... ELSE Create List text/json
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime11 ${starttime} replace_endtime11 ${endtime}
Proxy-Policy-replace-00010
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00010.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=hello&setCookie=hjbnm&contentType=content-type&resBody=05691" -kv \ http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List 111111
... ELSE Create List 111111
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime12 ${starttime} replace_endtime12 ${endtime}
Proxy-Policy-replace-00011
[Tags] 应答头
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00011.bat
... ELSE set variable curl http://www.shfe.com.cn/products/au/
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json
... ELSE Create List text/json
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime13 ${starttime} replace_endtime13 ${endtime}
Proxy-Policy-replace-00012
[Tags] cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_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.national-park.com/welcome-to-canyonlands-national-park/
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime14 ${starttime} replace_endtime14 ${endtime}
Proxy-Policy-replace-00013
[Tags] set-cookie
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00013.bat
... ELSE set variable curl -kv https://www.expedia.co.uk/?pwaLob=wizard-hotel-pwa-v2
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime15 ${starttime} replace_endtime15 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00013_1.bat
... ELSE set variable curl -kv https://welcome.expediagroup.com/en?joinexpedia
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime16 ${starttime} replace_endtime16 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00013_2.bat
... ELSE set variable curl -kv https://www.expediacruises.com/en-US/corporate
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime17 ${starttime} replace_endtime17 ${endtime}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00013_3.bat
... ELSE set variable curl -kv https://www.classicvacations.com/collections/all-inclusive
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime18 ${starttime} replace_endtime18 ${endtime}
Proxy-Policy-replace-00014
[Tags] 最大组合2
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00017.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" \ --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.hotelplanner.com/Group-Rate/
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json Tango Secure Gateway CA
... ELSE Create List text/json Tango Secure Gateway CA
${starttime} Get Time
Sleep ${policyVerificationSleepSeconds}s
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
${endtime} Get Time
insert_time_to_file1 replace_starttime19 ${starttime} replace_endtime19 ${endtime}

View File

@@ -0,0 +1,200 @@
*** Settings ***
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
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}
*** Test Cases ***
Proxy-Policy-allow-00001
[Tags] fqdn
#删除对象
${objectids} set Variable ${allow_objectId}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId}
GetLogList proxy_event_log ${allow_starttime} ${allow_endtime} ${testClentIP} ${s} http_host mp.pipix.com
Proxy-Policy-allow-00002
[Tags] cat
#删除对象
${objectids} set Variable ${allow_objectId1}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId1}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId1}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId1}
GetLogList proxy_event_log ${allow_starttime1} ${allow_endtime1} ${testClentIP} ${s} http_host feishu.cn
Proxy-Policy-allow-00003
[Tags] url
#删除对象
${objectids} set Variable ${allow_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId2}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId2}
GetLogList proxy_event_log ${allow_starttime2} ${allow_endtime2} ${testClentIP} ${s} http_host smzdm.com
GetLogList proxy_event_log ${allow_starttime3} ${allow_endtime3} ${testClentIP} ${s} http_host bilibili.com
GetLogList proxy_event_log ${allow_starttime4} ${allow_endtime4} ${testClentIP} ${s} http_host cheapair.com
GetLogList proxy_event_log ${allow_starttime5} ${allow_endtime5} ${testClentIP} ${s} http_host surfline.com
Proxy-Policy-allow-00004
[Tags] 请求头
#删除对象
${objectids} set Variable ${allow_objectId4}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId5}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId6}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId3}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId3}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId3}
GetLogList proxy_event_log ${allow_starttime6} ${allow_endtime6} ${testClentIP} ${s} http_host expeditionportal.com
Proxy-Policy-allow-00005
[Tags] 请求头
#删除对象
${objectids} set Variable ${allow_objectId7}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId8}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId9}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId4}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId4}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId4}
GetLogList proxy_event_log ${allow_starttime7} ${allow_endtime7} ${testClentIP} ${s} http_host www.motel6.com
Proxy-Policy-allow-00006
[Tags] 请求头
#删除对象
${objectids} set Variable ${allow_objectId10}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId11}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId12}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId5}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId5}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId5}
GetLogList proxy_event_log ${allow_starttime8} ${allow_endtime8} ${testClentIP} ${s} http_host www.choicehotels.com
Proxy-Policy-allow-00007
[Tags] 请求头
#删除对象
${objectids} set Variable ${allow_objectId13}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId14}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId15}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId6}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId6}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId6}
GetLogList proxy_event_log ${allow_starttime9} ${allow_endtime9} ${testClentIP} ${s} http_host www.clubmed.us
Proxy-Policy-allow-00008
[Tags] 应答头
#删除对象
${objectids} set Variable ${allow_objectId16}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId17}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId18}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId7}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId7}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId7}
GetLogList proxy_event_log ${allow_starttime10} ${allow_endtime10} ${testClentIP} ${s} http_host sse.com.cn
Proxy-Policy-allow-00009
[Tags] 应答头
#删除对象
${objectids} set Variable ${allow_objectId19}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId20}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId21}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId8}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId8}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId8}
GetLogList proxy_event_log ${allow_starttime11} ${allow_endtime11} ${testClentIP} ${s} http_host szse.cn
Proxy-Policy-allow-00010
[Tags] 应答头
#删除对象
${objectids} set Variable ${allow_objectId22}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId23}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId24}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId9}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId9}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId9}
GetLogList proxy_event_log ${allow_starttime12} ${allow_endtime12} ${testClentIP} ${s} http_host gf.com.cn
Proxy-Policy-allow-00011
[Tags] 应答头
#删除对象
${objectids} set Variable ${allow_objectId25}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId26}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId27}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId10}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId10}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId10}
GetLogList proxy_event_log ${allow_starttime13} ${allow_endtime13} ${testClentIP} ${s} http_host chinastock.com.cn
Proxy-Policy-allow-00012
[Tags] cookie
#删除对象
${objectids} set Variable ${allow_objectId28}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId29}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId30}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId11}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId11}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId11}
GetLogList proxy_event_log ${allow_starttime14} ${allow_endtime14} ${testClentIP} ${s} http_host www.virtuoso.com
Proxy-Policy-allow-00013
[Tags] set-cookie
#删除对象
${objectids} set Variable ${allow_objectId31}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId32}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId12}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId12}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId12}
GetLogList proxy_event_log ${allow_starttime15} ${allow_endtime15} ${testClentIP} ${s} http_host russia.payu.com
GetLogList proxy_event_log ${allow_starttime16} ${allow_endtime16} ${testClentIP} ${s} http_host tytbz.925mm.com
GetLogList proxy_event_log ${allow_starttime17} ${allow_endtime17} ${testClentIP} ${s} http_host dujia.qunar.com
GetLogList proxy_event_log ${allow_starttime18} ${allow_endtime18} ${testClentIP} ${s} http_host www.vitalsource.com
Proxy-Policy-allow-00014
[Tags] 最大组合
#删除对象
${objectids} set Variable ${allow_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId34}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId35}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId36}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId37}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId38}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId13}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId13}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId13}
GetLogList proxy_event_log ${allow_starttime19} ${allow_endtime19} ${testClentIP} ${s} http_host www.sutori.com

View File

@@ -38,7 +38,7 @@ Proxy-Policy-deny-00002
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId1}]} ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId1}]}
${policyIds} Create List ${policyId1} ${policyId2} ${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${deny_policyId1} ${s} Convert to String ${deny_policyId1}
GetLogList proxy_event_log ${deny_starttime1} ${deny_endtime1} ${testClentIP} ${s} http_host mathoverflow.net GetLogList proxy_event_log ${deny_starttime1} ${deny_endtime1} ${testClentIP} ${s} http_host villaday.com
Proxy-Policy-deny-00003 Proxy-Policy-deny-00003
[Tags] url [Tags] url
@@ -53,8 +53,8 @@ Proxy-Policy-deny-00003
${policyIds} Create List ${policyId1} ${policyId2} ${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${deny_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_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_starttime3} ${deny_endtime3} ${testClentIP} ${s} http_host www.banbaowang.com
GetLogList proxy_event_log ${deny_starttime4} ${deny_endtime4} ${testClentIP} ${s} http_host www.bcg.com GetLogList proxy_event_log ${deny_starttime4} ${deny_endtime4} ${testClentIP} ${s} http_host www.qidian.com
GetLogList proxy_event_log ${deny_starttime5} ${deny_endtime5} ${testClentIP} ${s} http_host www.rolandberger.com GetLogList proxy_event_log ${deny_starttime5} ${deny_endtime5} ${testClentIP} ${s} http_host www.rolandberger.com
Proxy-Policy-deny-00004 Proxy-Policy-deny-00004
@@ -81,7 +81,7 @@ Proxy-Policy-deny-00005
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId4}]} ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId4}]}
${policyIds} Create List ${policyId1} ${policyId2} ${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${deny_policyId4} ${s} Convert to String ${deny_policyId4}
GetLogList proxy_event_log ${deny_starttime7} ${deny_endtime7} ${testClentIP} ${s} http_host www.thecolor.com GetLogList proxy_event_log ${deny_starttime7} ${deny_endtime7} ${testClentIP} ${s} http_host americantesol.com
Proxy-Policy-deny-00006 Proxy-Policy-deny-00006
[Tags] 请求头 [Tags] 请求头
@@ -94,7 +94,7 @@ Proxy-Policy-deny-00006
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId5}]} ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId5}]}
${policyIds} Create List ${policyId1} ${policyId2} ${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${deny_policyId5} ${s} Convert to String ${deny_policyId5}
GetLogList proxy_event_log ${deny_starttime8} ${deny_endtime8} ${testClentIP} ${s} http_host sciencebob.com GetLogList proxy_event_log ${deny_starttime8} ${deny_endtime8} ${testClentIP} ${s} http_host www.playgroundsessions.com
Proxy-Policy-deny-00007 Proxy-Policy-deny-00007
[Tags] 请求头 [Tags] 请求头
@@ -243,5 +243,5 @@ Proxy-Policy-deny-00017
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId14}]} ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId14}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId16}]} ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId16}]}
${policyIds} Create List ${policyId1} ${policyId2} ${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${deny_policyId12} ${s} Convert to String ${deny_policyId16}
GetLogList proxy_event_log ${deny_starttime22} ${deny_endtime22} ${testClentIP} ${s} http_host www.umusicpub.com GetLogList proxy_event_log ${deny_starttime22} ${deny_endtime22} ${testClentIP} ${s} http_host www.umusicpub.com

View File

@@ -0,0 +1,232 @@
*** 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/hijackfiles
${profiledId} ${EMPTY}
*** Test Cases ***
Proxy-Policy-hijack-00001
[Tags] fqdn
#删除文件
${profiledId} set Variable ${hijack_profileId}
#删除对象
${objectids} set Variable ${hijack_objectId}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId39}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId}
GetLogList proxy_event_log ${hijack_starttime} ${hijack_endtime} ${testClentIP} ${s} http_host www.flyertalk.com
Proxy-Policy-hijack-00002
[Tags] cat
#删除文件
${profiledId} set Variable ${hijack_profileId1}
#删除对象
${objectids} set Variable ${hijack_objectId1}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId40}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId1}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId1}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId1}
GetLogList proxy_event_log ${hijack_starttime1} ${hijack_endtime1} ${testClentIP} ${s} http_host cruisecritic.com
Proxy-Policy-hijack-00003
[Tags] url
#删除文件
${profiledId} set Variable ${hijack_profileId2}
#删除对象
${objectids} set Variable ${hijack_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId2}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId2}
GetLogList proxy_event_log ${hijack_starttime2} ${hijack_endtime2} ${testClentIP} ${s} http_host vegas.com
GetLogList proxy_event_log ${hijack_starttime3} ${hijack_endtime3} ${testClentIP} ${s} http_host bytedance.com
GetLogList proxy_event_log ${hijack_starttime4} ${hijack_endtime4} ${testClentIP} ${s} http_host toutiao.com
GetLogList proxy_event_log ${hijack_starttime5} ${hijack_endtime5} ${testClentIP} ${s} http_host douyin.com
Proxy-Policy-hijack-00004
[Tags] 请求头
#删除文件
${profiledId} set Variable ${hijack_profileId3}
#删除对象
${objectids} set Variable ${hijack_objectId4}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId5}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId6}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId3}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId3}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId3}
GetLogList proxy_event_log ${hijack_starttime6} ${hijack_endtime6} ${testClentIP} ${s} http_host huoshan.com
Proxy-Policy-hijack-00005
[Tags] 请求头
#删除文件
${profiledId} set Variable ${hijack_profileId4}
#删除对象
${objectids} set Variable ${hijack_objectId7}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId8}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId9}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId4}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId4}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId4}
GetLogList proxy_event_log ${hijack_starttime7} ${hijack_endtime7} ${testClentIP} ${s} http_host www.ixigua.com
Proxy-Policy-hijack-00006
[Tags] 请求头
#删除文件
${profiledId} set Variable ${hijack_profileId5}
#删除对象
${objectids} set Variable ${hijack_objectId10}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId11}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId12}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId5}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId5}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId5}
GetLogList proxy_event_log ${hijack_starttime8} ${hijack_endtime8} ${testClentIP} ${s} http_host www.dcdapp.com
Proxy-Policy-hijack-00007
[Tags] 请求头
#删除文件
${profiledId} set Variable ${hijack_profileId6}
#删除对象
${objectids} set Variable ${hijack_objectId13}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId14}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId15}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId6}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId6}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId6}
GetLogList proxy_event_log ${hijack_starttime9} ${hijack_endtime9} ${testClentIP} ${s} http_host www.gogokid.com.cn
Proxy-Policy-hijack-00008
[Tags] 应答头
#删除文件
${profiledId} set Variable ${hijack_profileId7}
#删除对象
${objectids} set Variable ${hijack_objectId16}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId17}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId18}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId7}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId7}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId7}
GetLogList proxy_event_log ${hijack_starttime10} ${hijack_endtime10} ${testClentIP} ${s} http_host mafengwo.cn
Proxy-Policy-hijack-00009
[Tags] 应答头
#删除文件
${profiledId} set Variable ${hijack_profileId8}
#删除对象
${objectids} set Variable ${hijack_objectId19}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId20}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId21}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId8}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId8}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId8}
GetLogList proxy_event_log ${hijack_starttime11} ${hijack_endtime11} ${testClentIP} ${s} http_host sacred-destinations.com
Proxy-Policy-hijack-00010
[Tags] 应答头
#删除文件
${profiledId} set Variable ${hijack_profileId9}
#删除对象
${objectids} set Variable ${hijack_objectId22}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId23}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId24}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId9}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId9}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId9}
GetLogList proxy_event_log ${hijack_starttime12} ${hijack_endtime12} ${testClentIP} ${s} http_host tianya.cn
Proxy-Policy-hijack-00011
[Tags] 应答头
#删除文件
${profiledId} set Variable ${hijack_profileId10}
#删除对象
${objectids} set Variable ${hijack_objectId25}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId26}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId27}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId10}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId10}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId10}
GetLogList proxy_event_log ${hijack_starttime13} ${hijack_endtime13} ${testClentIP} ${s} http_host mydrivers.com
Proxy-Policy-hijack-00012
[Tags] cookie
#删除文件
${profiledId} set Variable ${hijack_profileId11}
#删除对象
${objectids} set Variable ${hijack_objectId28}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId29}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId30}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId11}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId11}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId11}
GetLogList proxy_event_log ${hijack_starttime14} ${hijack_endtime14} ${testClentIP} ${s} http_host vagabondish.com
Proxy-Policy-hijack-00013
[Tags] set-cookie
#删除文件
${profiledId} set Variable ${hijack_profileId12}
#删除对象
${objectids} set Variable ${hijack_objectId31}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId32}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId12}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId12}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId12}
GetLogList proxy_event_log ${hijack_starttime15} ${hijack_endtime15} ${testClentIP} ${s} http_host nsscreencast.com
GetLogList proxy_event_log ${hijack_starttime16} ${hijack_endtime16} ${testClentIP} ${s} http_host www.edreams.net
GetLogList proxy_event_log ${hijack_starttime17} ${hijack_endtime17} ${testClentIP} ${s} http_host boutiquehotel.me
GetLogList proxy_event_log ${hijack_starttime18} ${hijack_endtime18} ${testClentIP} ${s} http_host www.everymantravel.com
Proxy-Policy-hijack-00014
[Tags] 最大组合
#删除文件
${profiledId} set Variable ${hijack_profileId13}
#删除对象
${objectids} set Variable ${hijack_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId34}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId35}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId36}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId37}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId38}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId13}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId13}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId13}
GetLogList proxy_event_log ${hijack_starttime19} ${hijack_endtime19} ${testClentIP} ${s} http_host www.visitphilly.com

View File

@@ -0,0 +1,232 @@
*** 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/insertscripts
${profiledId} ${EMPTY}
*** Test Cases ***
Proxy-Policy-insert-00001
[Tags] fqdn
#删除文件
${profiledId} set Variable ${insert_profileId}
#删除对象
${objectids} set Variable ${insert_objectId}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId39}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId}
GetLogList proxy_event_log ${insert_starttime} ${insert_endtime} ${testClentIP} ${s} http_host www.costcotravel.com
Proxy-Policy-insert-00002
[Tags] cat
#删除文件
${profiledId} set Variable ${insert_profileId1}
#删除对象
${objectids} set Variable ${insert_objectId1}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId40}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId1}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId1}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId1}
GetLogList proxy_event_log ${insert_starttime1} ${insert_endtime1} ${testClentIP} ${s} http_host cruisingpower.com
Proxy-Policy-insert-00003
[Tags] url
#删除文件
${profiledId} set Variable ${insert_profileId2}
#删除对象
${objectids} set Variable ${insert_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId2}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId2}
GetLogList proxy_event_log ${insert_starttime2} ${insert_endtime2} ${testClentIP} ${s} http_host uncorneredmarket.com
GetLogList proxy_event_log ${insert_starttime3} ${insert_endtime3} ${testClentIP} ${s} http_host alltrails.com
GetLogList proxy_event_log ${insert_starttime4} ${insert_endtime4} ${testClentIP} ${s} http_host atlasobscura.com
GetLogList proxy_event_log ${insert_starttime5} ${insert_endtime5} ${testClentIP} ${s} http_host anguilla-beaches.com
Proxy-Policy-insert-00004
[Tags] 请求头
#删除文件
${profiledId} set Variable ${insert_profileId3}
#删除对象
${objectids} set Variable ${insert_objectId4}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId5}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId6}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId3}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId3}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId3}
GetLogList proxy_event_log ${insert_starttime6} ${insert_endtime6} ${testClentIP} ${s} http_host viator.com
Proxy-Policy-insert-00005
[Tags] 请求头
#删除文件
${profiledId} set Variable ${insert_profileId4}
#删除对象
${objectids} set Variable ${insert_objectId7}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId8}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId9}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId4}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId4}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId4}
GetLogList proxy_event_log ${insert_starttime7} ${insert_endtime7} ${testClentIP} ${s} http_host matadornetwork.com
Proxy-Policy-insert-00006
[Tags] 请求头
#删除文件
${profiledId} set Variable ${insert_profileId5}
#删除对象
${objectids} set Variable ${insert_objectId10}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId11}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId12}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId5}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId5}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId5}
GetLogList proxy_event_log ${insert_starttime8} ${insert_endtime8} ${testClentIP} ${s} http_host www.farecompare.com
Proxy-Policy-insert-00007
[Tags] 请求头
#删除文件
${profiledId} set Variable ${insert_profileId6}
#删除对象
${objectids} set Variable ${insert_objectId13}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId14}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId15}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId6}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId6}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId6}
GetLogList proxy_event_log ${insert_starttime9} ${insert_endtime9} ${testClentIP} ${s} http_host www.tripit.com
Proxy-Policy-insert-00008
[Tags] 应答头
#删除文件
${profiledId} set Variable ${insert_profileId7}
#删除对象
${objectids} set Variable ${insert_objectId16}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId17}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId18}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId7}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId7}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId7}
GetLogList proxy_event_log ${insert_starttime10} ${insert_endtime10} ${testClentIP} ${s} http_host waikikibeachwalk.com
Proxy-Policy-insert-00009
[Tags] 应答头
#删除文件
${profiledId} set Variable ${insert_profileId8}
#删除对象
${objectids} set Variable ${insert_objectId19}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId20}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId21}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId8}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId8}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId8}
GetLogList proxy_event_log ${insert_starttime11} ${insert_endtime11} ${testClentIP} ${s} http_host guides.com
Proxy-Policy-insert-00010
[Tags] 应答头
#删除文件
${profiledId} set Variable ${insert_profileId9}
#删除对象
${objectids} set Variable ${insert_objectId22}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId23}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId24}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId9}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId9}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId9}
GetLogList proxy_event_log ${insert_starttime12} ${insert_endtime12} ${testClentIP} ${s} http_host cnstock.com
Proxy-Policy-insert-00011
[Tags] 应答头
#删除文件
${profiledId} set Variable ${insert_profileId10}
#删除对象
${objectids} set Variable ${insert_objectId25}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId26}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId27}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId10}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId10}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId10}
GetLogList proxy_event_log ${insert_starttime13} ${insert_endtime13} ${testClentIP} ${s} http_host newone.com.cn
Proxy-Policy-insert-00012
[Tags] cookie
#删除文件
${profiledId} set Variable ${insert_profileId11}
#删除对象
${objectids} set Variable ${insert_objectId28}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId29}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId30}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId11}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId11}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId11}
GetLogList proxy_event_log ${insert_starttime14} ${insert_endtime14} ${testClentIP} ${s} http_host www.eastbay.com
Proxy-Policy-insert-00013
[Tags] set-cookie
#删除文件
${profiledId} set Variable ${insert_profileId12}
#删除对象
${objectids} set Variable ${insert_objectId31}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId32}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId12}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId12}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId12}
GetLogList proxy_event_log ${insert_starttime15} ${insert_endtime15} ${testClentIP} ${s} http_host www.shermanstravel.com
GetLogList proxy_event_log ${insert_starttime16} ${insert_endtime16} ${testClentIP} ${s} http_host www.wyndhamhotels.com
GetLogList proxy_event_log ${insert_starttime17} ${insert_endtime17} ${testClentIP} ${s} http_host us.travelnow.com
GetLogList proxy_event_log ${insert_starttime18} ${insert_endtime18} ${testClentIP} ${s} http_host www.smithsonianjourneys.org
Proxy-Policy-insert-00014
[Tags] 最大组合
#删除文件
${profiledId} set Variable ${insert_profileId13}
#删除对象
${objectids} set Variable ${insert_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId34}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId35}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId36}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId37}
${objectids} Catenate SEPARATOR=, ${objectids} ${insert_objectId38}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_insert_policyId13}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${insert_policyId13}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${insert_policyId13}
GetLogList proxy_event_log ${insert_starttime19} ${insert_endtime19} ${testClentIP} ${s} http_host www.intervalworld.com

View File

@@ -0,0 +1,233 @@
*** Settings ***
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
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}
*** Test Cases ***
Proxy-Policy-monitor-00001
[Tags] fqdn
#删除对象
${objectids} set Variable ${monitor_objectId}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId}
GetLogList proxy_event_log ${monitor_starttime} ${monitor_endtime} ${testClentIP} ${s} http_host newsela.com
Proxy-Policy-monitor-00002
[Tags] cat
#删除对象
${objectids} set Variable ${monitor_objectId1}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId1}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId1}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId1}
GetLogList proxy_event_log ${monitor_starttime1} ${monitor_endtime1} ${testClentIP} ${s} http_host villaday.com
Proxy-Policy-monitor-00003
[Tags] url
#删除对象
${objectids} set Variable ${monitor_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId2}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId2}
GetLogList proxy_event_log ${monitor_starttime2} ${monitor_endtime2} ${testClentIP} ${s} http_host www.wmtransfer.com
GetLogList proxy_event_log ${monitor_starttime3} ${monitor_endtime3} ${testClentIP} ${s} http_host www.banbaowang.com
GetLogList proxy_event_log ${monitor_starttime4} ${monitor_endtime4} ${testClentIP} ${s} http_host www.qidian.com
GetLogList proxy_event_log ${monitor_starttime5} ${monitor_endtime5} ${testClentIP} ${s} http_host www.rolandberger.com
Proxy-Policy-monitor-00004
[Tags] 请求头
#删除对象
${objectids} set Variable ${monitor_objectId4}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId5}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId6}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId3}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId3}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId3}
GetLogList proxy_event_log ${monitor_starttime6} ${monitor_endtime6} ${testClentIP} ${s} http_host www.nielsen.com
Proxy-Policy-monitor-00005
[Tags] 请求头
#删除对象
${objectids} set Variable ${monitor_objectId7}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId8}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId9}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId4}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId4}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId4}
GetLogList proxy_event_log ${monitor_starttime7} ${monitor_endtime7} ${testClentIP} ${s} http_host americantesol.com
Proxy-Policy-monitor-00006
[Tags] 请求头
#删除对象
${objectids} set Variable ${monitor_objectId10}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId11}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId12}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId5}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId5}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId5}
GetLogList proxy_event_log ${monitor_starttime8} ${monitor_endtime8} ${testClentIP} ${s} http_host www.playgroundsessions.com
Proxy-Policy-monitor-00007
[Tags] 请求头
#删除对象
${objectids} set Variable ${monitor_objectId13}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId14}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId15}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId6}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId6}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId6}
GetLogList proxy_event_log ${monitor_starttime9} ${monitor_endtime9} ${testClentIP} ${s} http_host www.europages.com.ru
Proxy-Policy-monitor-00008
[Tags] 应答头
#删除对象
${objectids} set Variable ${monitor_objectId16}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId17}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId18}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId7}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId7}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId7}
GetLogList proxy_event_log ${monitor_starttime10} ${monitor_endtime10} ${testClentIP} ${s} http_host www.6renyou.com
Proxy-Policy-monitor-00009
[Tags] 应答头
#删除对象
${objectids} set Variable ${monitor_objectId19}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId20}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId21}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId8}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId8}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId8}
GetLogList proxy_event_log ${monitor_starttime11} ${monitor_endtime11} ${testClentIP} ${s} http_host www.ljale.com
Proxy-Policy-monitor-00010
[Tags] 应答头
#删除对象
${objectids} set Variable ${monitor_objectId22}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId23}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId24}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId9}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId9}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId9}
GetLogList proxy_event_log ${monitor_starttime12} ${monitor_endtime12} ${testClentIP} ${s} http_host www.duckduckmoose.com
Proxy-Policy-monitor-00011
[Tags] 应答头
#删除对象
${objectids} set Variable ${monitor_objectId25}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId26}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId27}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId10}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId10}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId10}
GetLogList proxy_event_log ${monitor_starttime13} ${monitor_endtime13} ${testClentIP} ${s} http_host tutcandy.com
Proxy-Policy-monitor-00012
[Tags] cookie
#删除对象
${objectids} set Variable ${monitor_objectId28}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId29}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId30}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId11}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId11}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId11}
GetLogList proxy_event_log ${monitor_starttime14} ${monitor_endtime14} ${testClentIP} ${s} http_host www.youqulu.com
Proxy-Policy-monitor-00013
[Tags] set-cookie
#删除对象
${objectids} set Variable ${monitor_objectId31}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId32}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId12}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId12}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId12}
GetLogList proxy_event_log ${monitor_starttime15} ${monitor_endtime15} ${testClentIP} ${s} http_host www.nypl.org
GetLogList proxy_event_log ${monitor_starttime16} ${monitor_endtime16} ${testClentIP} ${s} http_host www.webpronews.com
GetLogList proxy_event_log ${monitor_starttime17} ${monitor_endtime17} ${testClentIP} ${s} http_host bj.zu.ke.com
GetLogList proxy_event_log ${monitor_starttime18} ${monitor_endtime18} ${testClentIP} ${s} http_host nationalbank.kz
Proxy-Policy-monitor-00014
[Tags] 请求体
#删除对象
${objectids} set Variable ${monitor_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId34}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId13}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId13}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId13}
GetLogList proxy_event_log ${monitor_starttime19} ${monitor_endtime19} ${testClentIP} ${s} http_host open.node.com
Proxy-Policy-monitor-00015
[Tags] 应答体
#删除对象
${objectids} set Variable ${monitor_objectId35}
#删除策略
${policyIds} Create List {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId14}]}
${s} Convert to String ${monitor_policyId14}
GetLogList proxy_event_log ${monitor_starttime20} ${monitor_endtime20} ${testClentIP} ${s} http_host open.node.com
Proxy-Policy-monitor-00016
[Tags] 最大组合1
#删除对象
${objectids} set Variable ${monitor_objectId36}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId37}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId38}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId39}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId40}
#删除策略
${policyIds} Create List {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId15}]}
${s} Convert to String ${monitor_policyId15}
GetLogList proxy_event_log ${monitor_starttime21} ${monitor_endtime21} ${testClentIP} ${s} http_host open.node.com
Proxy-Policy-monitor-00017
[Tags] 最大组合2
#删除对象
${objectids} set Variable ${monitor_objectId41}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId42}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId43}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId44}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId45}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId14}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId16}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${monitor_policyId16}
GetLogList proxy_event_log ${monitor_starttime22} ${monitor_endtime22} ${testClentIP} ${s} http_host www.umusicpub.com

View File

@@ -0,0 +1,198 @@
*** Settings ***
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
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}
*** Test Cases ***
Proxy-Policy-redirect-00001
[Tags] fqdn
#删除对象
${objectids} set Variable ${redirect_objectId}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId}
GetLogList proxy_event_log ${redirect_starttime} ${redirect_endtime} ${testClentIP} ${s} http_host www.abercrombiekent.com
Proxy-Policy-redirect-00002
[Tags] cat
#删除对象
${objectids} set Variable ${redirect_objectId1}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId1}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId1}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId1}
GetLogList proxy_event_log ${redirect_starttime1} ${redirect_endtime1} ${testClentIP} ${s} http_host www.summitpost.org
Proxy-Policy-redirect-00003
[Tags] url
#删除对象
${objectids} set Variable ${redirect_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId2}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId2}
GetLogList proxy_event_log ${redirect_starttime2} ${redirect_endtime2} ${testClentIP} ${s} http_host gobackpacking.com
GetLogList proxy_event_log ${redirect_starttime3} ${redirect_endtime3} ${testClentIP} ${s} http_host www.visitguam.com
GetLogList proxy_event_log ${redirect_starttime4} ${redirect_endtime4} ${testClentIP} ${s} http_host skift.com
GetLogList proxy_event_log ${redirect_starttime5} ${redirect_endtime5} ${testClentIP} ${s} http_host eviivo.com
Proxy-Policy-redirect-00004
[Tags] 请求头
#删除对象
${objectids} set Variable ${redirect_objectId4}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId5}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId6}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId3}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId3}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId3}
GetLogList proxy_event_log ${redirect_starttime6} ${redirect_endtime6} ${testClentIP} ${s} http_host www.dealbase.com
Proxy-Policy-redirect-00005
[Tags] 请求头
#删除对象
${objectids} set Variable ${redirect_objectId7}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId8}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId9}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId4}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId4}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId4}
GetLogList proxy_event_log ${redirect_starttime7} ${redirect_endtime7} ${testClentIP} ${s} http_host www.portofstockton.com
Proxy-Policy-redirect-00006
[Tags] 请求头
#删除对象
${objectids} set Variable ${redirect_objectId10}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId11}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId12}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId5}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId5}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId5}
GetLogList proxy_event_log ${redirect_starttime8} ${redirect_endtime8} ${testClentIP} ${s} http_host www.marriottvacationclub.com
Proxy-Policy-redirect-00007
[Tags] 请求头
#删除对象
${objectids} set Variable ${redirect_objectId13}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId14}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId15}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId6}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId6}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId6}
GetLogList proxy_event_log ${redirect_starttime9} ${redirect_endtime9} ${testClentIP} ${s} http_host www.bulgarihotels.com
Proxy-Policy-redirect-00008
[Tags] 应答头
#删除对象
${objectids} set Variable ${redirect_objectId16}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId17}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId18}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId7}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId7}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId7}
GetLogList proxy_event_log ${redirect_starttime10} ${redirect_endtime10} ${testClentIP} ${s} http_host www.essence.com.cn
Proxy-Policy-redirect-00009
[Tags] 应答头
#删除对象
${objectids} set Variable ${redirect_objectId19}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId20}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId21}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId8}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId8}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId8}
GetLogList proxy_event_log ${redirect_starttime11} ${redirect_endtime11} ${testClentIP} ${s} http_host www.west95582.com
Proxy-Policy-redirect-00010
[Tags] 应答头
#删除对象
${objectids} set Variable ${redirect_objectId22}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId23}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId24}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId9}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId9}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId9}
GetLogList proxy_event_log ${redirect_starttime12} ${redirect_endtime12} ${testClentIP} ${s} http_host www.hazq.com
Proxy-Policy-redirect-00011
[Tags] 应答头
#删除对象
${objectids} set Variable ${redirect_objectId25}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId26}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId27}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId10}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId10}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId10}
GetLogList proxy_event_log ${redirect_starttime13} ${redirect_endtime13} ${testClentIP} ${s} http_host www.cs.ecitic.com
Proxy-Policy-redirect-00012
[Tags] cookie
#删除对象
${objectids} set Variable ${redirect_objectId28}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId29}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId30}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId11}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId11}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId11}
GetLogList proxy_event_log ${redirect_starttime14} ${redirect_endtime14} ${testClentIP} ${s} http_host www.polb.com
Proxy-Policy-redirect-00013
[Tags] set-cookie
#删除对象
${objectids} set Variable ${redirect_objectId31}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId32}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId12}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId12}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId12}
GetLogList proxy_event_log ${redirect_starttime15} ${redirect_endtime15} ${testClentIP} ${s} http_host www.nypl.org
GetLogList proxy_event_log ${redirect_starttime16} ${redirect_endtime16} ${testClentIP} ${s} http_host www.webpronews.com
GetLogList proxy_event_log ${redirect_starttime17} ${redirect_endtime17} ${testClentIP} ${s} http_host bj.zu.ke.com
GetLogList proxy_event_log ${redirect_starttime18} ${redirect_endtime18} ${testClentIP} ${s} http_host nationalbank.kz
Proxy-Policy-redirect-00014
[Tags] 最大组合
#删除对象
${objectids} set Variable ${redirect_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId34}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId35}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId36}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId13}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId13}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId13}
GetLogList proxy_event_log ${redirect_starttime19} ${redirect_endtime19} ${testClentIP} ${s} http_host www.umusicpub.com

View File

@@ -0,0 +1,202 @@
*** Settings ***
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
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}
*** Test Cases ***
Proxy-Policy-replace-00001
[Tags] fqdn
#删除对象
${objectids} set Variable ${replace_objectId}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId39}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId}
GetLogList proxy_event_log ${replace_starttime} ${replace_endtime} ${testClentIP} ${s} http_host destidotcom.wordpress.com
Proxy-Policy-replace-00002
[Tags] cat
#删除对象
${objectids} set Variable ${replace_objectId1}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId40}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId1}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId1}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId1}
GetLogList proxy_event_log ${replace_starttime1} ${replace_endtime1} ${testClentIP} ${s} http_host www.trip.com
Proxy-Policy-replace-00003
[Tags] url
#删除对象
${objectids} set Variable ${replace_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId2}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId2}
GetLogList proxy_event_log ${replace_starttime2} ${replace_endtime2} ${testClentIP} ${s} http_host www.smartertravel.com
GetLogList proxy_event_log ${replace_starttime3} ${replace_endtime3} ${testClentIP} ${s} http_host www.chinese.hostelworld.com
GetLogList proxy_event_log ${replace_starttime4} ${replace_endtime4} ${testClentIP} ${s} http_host www.hotelplanner.com
GetLogList proxy_event_log ${replace_starttime5} ${replace_endtime5} ${testClentIP} ${s} http_host business.nycgo.com
Proxy-Policy-replace-00004
[Tags] 请求头
#删除对象
${objectids} set Variable ${replace_objectId4}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId5}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId6}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId3}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId3}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId3}
GetLogList proxy_event_log ${replace_starttime6} ${replace_endtime6} ${testClentIP} ${s} http_host www.kualoa.com
Proxy-Policy-replace-00005
[Tags] 请求头
#删除对象
${objectids} set Variable ${replace_objectId7}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId8}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId9}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId4}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId4}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId4}
GetLogList proxy_event_log ${replace_starttime7} ${replace_endtime7} ${testClentIP} ${s} http_host www.bestwestern.com
Proxy-Policy-replace-00006
[Tags] 请求头
#删除对象
${objectids} set Variable ${replace_objectId10}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId11}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId12}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId5}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId5}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId5}
GetLogList proxy_event_log ${replace_starttime8} ${replace_endtime8} ${testClentIP} ${s} http_host www.wollmanskatingrink.com
Proxy-Policy-replace-00007
[Tags] 请求头
#删除对象
${objectids} set Variable ${replace_objectId13}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId14}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId15}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId6}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId6}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId6}
GetLogList proxy_event_log ${replace_starttime9} ${replace_endtime9} ${testClentIP} ${s} http_host packages.webjet.com.au
Proxy-Policy-replace-00008
[Tags] 应答头
#删除对象
${objectids} set Variable ${replace_objectId16}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId17}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId18}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId7}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId7}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId7}
GetLogList proxy_event_log ${replace_starttime10} ${replace_endtime10} ${testClentIP} ${s} http_host www.ghzq.com.cn
Proxy-Policy-replace-00009
[Tags] 应答头
#删除对象
${objectids} set Variable ${replace_objectId19}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId20}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId21}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId8}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId8}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId8}
GetLogList proxy_event_log ${replace_starttime11} ${replace_endtime11} ${testClentIP} ${s} http_host www.zts.com.cn
Proxy-Policy-replace-00010
[Tags] 应答头
#删除对象
${objectids} set Variable ${replace_objectId22}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId23}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId24}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId9}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId9}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId9}
GetLogList proxy_event_log ${replace_starttime12} ${replace_endtime12} ${testClentIP} ${s} http_host www.csrc.gov.cn
Proxy-Policy-replace-00011
[Tags] 应答头
#删除对象
${objectids} set Variable ${replace_objectId25}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId26}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId27}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId10}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId10}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId10}
GetLogList proxy_event_log ${replace_starttime13} ${replace_endtime13} ${testClentIP} ${s} http_host www.shfe.com.cn
Proxy-Policy-replace-00012
[Tags] cookie
#删除对象
${objectids} set Variable ${replace_objectId28}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId29}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId30}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId11}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId11}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId11}
GetLogList proxy_event_log ${replace_starttime14} ${replace_endtime14} ${testClentIP} ${s} http_host www.national-park.com
Proxy-Policy-replace-00013
[Tags] set-cookie
#删除对象
${objectids} set Variable ${replace_objectId31}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId32}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId12}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId12}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId12}
GetLogList proxy_event_log ${replace_starttime15} ${replace_endtime15} ${testClentIP} ${s} http_host www.expedia.co.uk
GetLogList proxy_event_log ${replace_starttime16} ${replace_endtime16} ${testClentIP} ${s} http_host welcome.expediagroup.com
GetLogList proxy_event_log ${replace_starttime17} ${replace_endtime17} ${testClentIP} ${s} http_host www.expediacruises.com
GetLogList proxy_event_log ${replace_starttime18} ${replace_endtime18} ${testClentIP} ${s} http_host www.classicvacations.com
Proxy-Policy-replace-00014
[Tags] 最大组合
#删除对象
${objectids} set Variable ${replace_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId34}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId35}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId36}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId37}
${objectids} Catenate SEPARATOR=, ${objectids} ${replace_objectId38}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_replace_policyId13}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${replace_policyId13}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${replace_policyId13}
GetLogList proxy_event_log ${replace_starttime19} ${replace_endtime19} ${testClentIP} ${s} http_host www.hotelplanner.com

View File

@@ -0,0 +1,740 @@
*** Settings ***
Test Teardown DeletePolicyAndObject ${policyIds} ${objectIds} ${group}
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
Library json
Library DateTime
*** Variables ***
@{policyIds}
@{profiles}
${objectIds} ${EMPTY}
${group} ${EMPTY}
*** Test Cases ***
Allow-test-001
#新建allow协议单选http
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary policyName=新建allow单选协 action=allow source=${objectId1}|TSG_SECURITY_SOURCE_ADDR userRegion={"protocol":"HTTP"} isValid=${1} appIdObjects=2
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-002
#新建allow协议单选ssl
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建allow单选协议
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"SSL"}
... isValid=${1}
... appIdObjects=3
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-003
#新建allow协议单选dns
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建allow单选协议
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"DNS"}
... isValid=${1}
... appIdObjects=4
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-004
#新建allow协议单选mail
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建allow单选协议
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"MAIL"}
... isValid=${1}
... appIdObjects=5
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-005
#新建allow协议单选ftp
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建allow单选协议
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"FTP"}
... isValid=${1}
... appIdObjects=6
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-006
#新建allow协议单选quic
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建allow单选协议
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"QUIC"}
... isValid=${1}
... appIdObjects=7
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-007
#新建allow协议单选quic
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建allow多选协议
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... isValid=${1}
... userRegion={}
... appIdObjects=2,3,4,5,6,7
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-008
#新建allowApplication选择HTTPfilter选择host中的fqdn右匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的fqdn右匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-009
#新建allowApplication选择HTTPfilter选择host中的fqdn完全匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的fqdn完全匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-010
#新建allowApplication选择HTTPfilter选择host中的fqdn-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*.com
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId0},${objectId},${objectId1}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId} ${objectId0}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"fqdn","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId2} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的fqdn-group
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId2}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-011
#新建allowApplication选择HTTPfilter选择host中的category右匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category右匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-012
#新建allowApplication选择HTTPfilter选择host中的category完全匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category完全匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-013
#新建allowApplication选择HTTPfilter选择host中的fqdn_category-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*.com
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId0},${objectId},${objectId1}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId} ${objectId0}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"fqdn_category","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId2} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
...
... userRegion={"protocol":"HTTP"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId2}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-014
#新建allowApplication选择SSLfilter选择SNI中的fqdn右匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择SSLfilter选择SNI中的fqdn右匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"SSL"}
... isValid=${1}
... appIdObjects=3
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_SSL_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-015
#新建allowApplication选择SSLfilter选择SNI中的fqdn完全匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择SSLfilter选择SNI中的fqdn完全匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"SSL"}
... isValid=${1}
... appIdObjects=3
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_SSL_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-016
#新建allowApplication选择SSLfilter选择SNI中的fqdn-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*.com
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId0},${objectId},${objectId1}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId} ${objectId0}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"fqdn","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId2} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择SSLfilter选择SNI中的fqdn-group
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"SSL"}
... isValid=${1}
... appIdObjects=3
... policyDesc=autotest
... filterList=${objectId2}|TSG_FIELD_SSL_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-017
#新建allowApplication选择SSLfilter选择SNI中的category右匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择SSLfilter选择SNI中的category右匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"SSL"}
... isValid=${1}
... appIdObjects=3
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_SSL_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-018
#新建allowApplication选择SSLfilter选择SNI中的category完全匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择SNI中的category完全匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"SSL"}
... isValid=${1}
... appIdObjects=3
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_SSL_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-019
#新建allowApplication选择SSLfilter选择SNI中的fqdn_category-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*.com
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId0},${objectId},${objectId1}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId} ${objectId0}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"fqdn_category","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId2} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择SSLfilter选择SNI中的category-group
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
...
... userRegion={"protocol":"SSL"}
... isValid=${1}
... appIdObjects=3
... policyDesc=autotest
... filterList=${objectId2}|TSG_FIELD_SSL_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-020
#新建allowApplication选择QUICfilter选择SNI中的fqdn右匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的fqdn右匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"QUIC"}
... isValid=${1}
... appIdObjects=7
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_QUIC_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-021
#新建allowApplication选择QUICfilter选择SNI中的fqdn完全匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择QUICfilter选择SNI中的fqdn完全匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"QUIC"}
... isValid=${1}
... appIdObjects=7
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_QUIC_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-022
#新建allowApplication选择QUICfilter选择SNI中的fqdn-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*.com
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId0},${objectId},${objectId1}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId} ${objectId0}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"fqdn","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId2} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择QUICfilter选择SNI中的fqdn-group
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"QUIC"}
... isValid=${1}
... appIdObjects=7
... policyDesc=autotest
... filterList=${objectId2}|TSG_FIELD_QUIC_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-023
#新建allowApplication选择QUICfilter选择SNI中的category右匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择QUICfilter选择SNI中的category右匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"QUIC"}
... isValid=${1}
... appIdObjects=7
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_QUIC_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-024
#新建allowApplication选择QUICfilter选择SNI中的category完全匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择QUICfilter选择SNI中的category完全匹配
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"QUIC"}
... isValid=${1}
... appIdObjects=7
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_QUIC_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
Allow-test-025
#新建allowApplication选择QUICfilter选择SNI中的fqdn_category-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*.com
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId0},${objectId},${objectId1}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId} ${objectId0}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"fqdn_category","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId2} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择QUICfilter选择SNI中的category-group
... policyType=tsg_security
... action=allow
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"QUIC"}
... isValid=${1}
... appIdObjects=7
... policyDesc=autotest
... filterList=${objectId2}|TSG_FIELD_QUIC_SNI
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}

View File

@@ -0,0 +1,701 @@
*** Settings ***
Test Teardown DeletePolicyAndObject ${policyIds} ${objectIds} ${group}
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
Library json
Library DateTime
*** Variables ***
@{policyIds}
@{profiles}
${objectIds} ${EMPTY}
${group} ${EMPTY}
*** Test Cases ***
deny-test-001
#新建deny协议单选http
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary policyName=新建deny单选协 action=deny source=${objectId1}|TSG_SECURITY_SOURCE_ADDR userRegion={"protocol":"HTTP","method":"drop"} isValid=${1} appIdObjects=2
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-002
#新建deny协议单选ssl
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建deny单选协议
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"SSL","method":"drop"}
... isValid=${1}
... appIdObjects=3
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-003
#新建deny协议单选dns
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建deny单选协议
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"DNS","method":"drop"}
... isValid=${1}
... appIdObjects=4
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-004
#新建deny协议单选mail
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建deny单选协议
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"MAIL","method":"drop"}
... isValid=${1}
... appIdObjects=5
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-005
#新建deny协议单选ftp
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建deny单选协议
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"FTP","method":"drop"}
... isValid=${1}
... appIdObjects=6
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-006
#新建deny协议单选quic
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建deny单选协议
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"QUIC","method":"drop"}
... isValid=${1}
... appIdObjects=7
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-007
#新建deny协议单选quic
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=新建deny多选协议
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... isValid=${1}
... userRegion={"method":"drop"}
... appIdObjects=2,3,4,5,6,7
... policyDesc=autotest
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-008
#新建denyApplication选择HTTPfilter选择host中的fqdn右匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的fqdn右匹配
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-009
#新建denyApplication选择HTTPfilter选择host中的fqdn完全匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的fqdn完全匹配
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-010
#新建denyApplication选择HTTPfilter选择host中的fqdn-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*.com
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId0},${objectId},${objectId1}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId} ${objectId0}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"fqdn","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId2} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的fqdn-group
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId2}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-011
#新建denyApplication选择HTTPfilter选择host中的category右匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category右匹配
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-012
#新建denyApplication选择HTTPfilter选择host中的category完全匹配
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId},${objectIds}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category完全匹配
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-013
#新建denyApplication选择HTTPfilter选择host中的fqdn_category-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 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} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.5ytb.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*.com
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId0},${objectId},${objectId1}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId} ${objectId0}
log 111111111111111111${subObjectIds}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"fqdn_category","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId2} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId2}|TSG_FIELD_HTTP_HOST
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-014
#新建denyApplication选择HTTPfilter选择url左匹配
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=abcd.*
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_URL
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-015
#新建denyApplication选择HTTPfilter选择url右匹配
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*скрипцияк
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_URL
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-016
#新建denyApplication选择HTTPfilter选择url完全匹配
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$完全匹配
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_URL
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-017
#新建denyApplication选择HTTPfilter选择url
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=123@#¥%……
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_URL
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-018
#新建denyApplication选择HTTPfilter选择url-group
Comment 创建IP
#object为IP→endpoint时的addItemList单个对象
${addItemList1} Create Dictionary isSession=endpoint ip=192.168.41.68-192.168.41.69 port=0-0 direction=0 protocol=0 isInitialize=0
#可以添加多个
${addItemLists} Create list ${addItemList1}
#objectList对象
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=${addItemLists}
${rescode} ${objectId0} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=abcd.*
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*скрипцияк
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$完全匹配
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=123@#¥%……
${rescode} ${objectId4} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1},${objectId2},${objectId3},${objectId4},${objectId0}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId1} ${objectId2} ${objectId3} ${objectId4}
log 11111111111111${subObjectIds}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"url","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId5} AddObject ${objectDict}
${group} Set Variable ${objectId5}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... source=${objectId0}|TSG_SECURITY_SOURCE_ADDR
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId5}|TSG_FIELD_HTTP_URL
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-019
#新建denyApplication选择HTTPfilter选择request header中的user-agent左匹配
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=abcd.*|User-Agent
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-020
#新建denyApplication选择HTTPfilter选择request header中的user-agent右匹配
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*скрипцияк|User-Agent
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-021
#新建denyApplication选择HTTPfilter选择request header中的user-agent完全匹配
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$完全匹配|User-Agent
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-022
#新建denyApplication选择HTTPfilter选择request header中的user-agent,子串匹配
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=123@#¥%……|User-Agent
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-023
#新建denyApplication选择HTTPfilter选择request header中的user-agent-group
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=abcd.*|User-Agent
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*скрипцияк|User-Agent
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$完全匹配|User-Agent
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=123@#¥%……|User-Agent
${rescode} ${objectId4} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1},${objectId2},${objectId3},${objectId4}
Comment 创建url-group
${subObjectIds} Create list ${objectId1},${objectId2},${objectId3},${objectId4}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"http_signature","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId5} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId5}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-024
#新建denyApplication选择HTTPfilter选择request header中的Cookie左匹配
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=abcd.*|Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-025
#新建denyApplication选择HTTPfilter选择request header中的Cookie右匹配
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*скрипцияк|Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-026
#新建denyApplication选择HTTPfilter选择request header中的Cookie完全匹配
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$完全匹配|Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-027
#新建denyApplication选择HTTPfilter选择request header中的Cookie,子串匹配
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=123@#¥%……|Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId1}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}
deny-test-028
#新建denyApplication选择HTTPfilter选择request header中的Cookie-group
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=abcd.*|Cookie
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*скрипцияк|Cookie
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$完全匹配|Cookie
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=123@#¥%……|Cookie
${rescode} ${objectId4} AddObject2 ${1} ${objectDict}
${objectIds} Set Variable ${objectId1},${objectId2},${objectId3},${objectId4}
Comment 创建fqdn-group
${subObjectIds} Create list ${objectId1},${objectId2},${objectId3},${objectId4}
${objectDict} Set Variable {"opAction":"add","returnData":1,"objectList":{"objectType":"http_signature","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"${Default_ObjectName}","objectDesc":"","subObjectIds":${subObjectIds},"addItemList":[],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${rescode} ${objectId5} AddObject ${objectDict}
${group} Set Variable ${objectId2}
Comment 创建策略
${policyDict} Create Dictionary
... policyName=Application选择HTTPfilter选择host中的category-group
... policyType=tsg_security
... action=deny
... userRegion={"protocol":"HTTP","method":"drop"}
... isValid=${1}
... appIdObjects=2
... policyDesc=autotest
... filterList=${objectId5}|TSG_FIELD_HTTP_REQ_HDR
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyIds}]}

View File

@@ -0,0 +1,76 @@
*** Settings ***
Force Tags tsg-ui objects tags
Resource ../../../02-Keyword/tsg_ui/tag/Tags.robot
Library OperatingSystem
*** Test Cases ***
create-tags-001
#最小值
ui-tags-create a id=tagAddColor0 a
ui-tags-search-name a
ui-tags-delete
create-tags-002
#俄文
ui-tags-create *скрипцияк id=tagAddColor1 *скрипцияк
ui-tags-search-name *скрипцияк
ui-tags-delete
create-tags-003
#最大值
ui-tags-create 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 id=tagAddColor2 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
ui-tags-search-name 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
ui-tags-delete
create-tags-004
#中文英文俄文特殊字符
ui-tags-create g中@enция id=tagAddColor3 g中@enция
ui-tags-search-name g中@enция
ui-tags-delete
create-tags-005
#数字英文
ui-tags-create g123 id=tagAddColor4 g123
ui-tags-search-name g123
ui-tags-delete
edit-tags-006
#修改
ui-tags-create g123 id=tagAddColor4 g123
ui-tags-search-name g123
ui-tags-edit g123 id=tagAddColor3 g中@enция
ui-tags-search-name g123
ui-tags-delete
create-tags-007
#新建两个tags中文英文俄文数字特殊字符
ui-tags-create-1 g中@enция1 id=tagAddColor4 g中@enция1 g中@enция123
ui-tags-search-name g中@enция1
ui-tags-delete
create-tags-008
#新建两个tags最小值
ui-tags-create-1 a id=tagAddColor4 a b
ui-tags-search-name a
ui-tags-delete
create-tags-009
#新建两个tags最大值
ui-tags-create-1 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 id=tagAddColor4 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ui-tags-search-name 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
ui-tags-delete
edit-tags-010
#修改
ui-tags-create-1 g123 id=tagAddColor4 g123 g123123
ui-tags-search-name g123
ui-tags-edit-1 g123 id=tagAddColor3 g中@enция g中@enция1
ui-tags-search-name g123
ui-tags-delete

View File

@@ -74,7 +74,7 @@ AddObject
[Arguments] ${body} [Arguments] ${body}
#addIPobject################################################################################# #addIPobject#################################################################################
${response} BasePostRequest /${version}/policy/object body=${body} ${response} BasePostRequest /${version}/policy/object body=${body}
#log ${response} log 11111111111111${response}
${objectId} Set Variable ${response['data']['objectList'][0]['objectId']} ${objectId} Set Variable ${response['data']['objectList'][0]['objectId']}
${rescodeReturn} Set Variable ${response['code']} ${rescodeReturn} Set Variable ${response['code']}
[Return] ${rescodeReturn} ${objectId} [Return] ${rescodeReturn} ${objectId}
@@ -244,7 +244,7 @@ DeleteProfiles
Run Keyword If "${profile}"!="" and ${profile}!="${EMPTY}" DeleteProfile ${profile}[typeUrl] ${profile}[profileIds] Run Keyword If "${profile}"!="" and ${profile}!="${EMPTY}" DeleteProfile ${profile}[typeUrl] ${profile}[profileIds]
END END
DeletePolicyAndObject DeletePolicyAndObject
[Arguments] ${policyids} ${objectids} [Arguments] ${policyids} ${objectids} ${group}
#删除和对象 #删除和对象
#删除策略 #删除策略
log toDeletePolicy_DeletePolicyAndObject log toDeletePolicy_DeletePolicyAndObject
@@ -252,11 +252,13 @@ DeletePolicyAndObject
FOR ${var} IN RANGE ${listlenth} FOR ${var} IN RANGE ${listlenth}
#log dxytest111111 #log dxytest111111
log ${var} log ${var}
DeletePolicy ${policyids}[${var}] DeletePolicy ${policyids}[${var}]
#Should Contain ${commandreturn} ${ca} #Should Contain ${commandreturn} ${ca}
END END
#删除对象 #删除对象
log todeleteobj_DeletePolicyAndObject log todeleteobj_DeletePolicyAndObject
Run Keyword If "${group}"=="${EMPTY}" log no obj to del
... ELSE DeleteObject ${group}
Run Keyword If "${objectids}"=="${EMPTY}" log no obj to del Run Keyword If "${objectids}"=="${EMPTY}" log no obj to del
... ELSE DeleteObject ${objectids} ... ELSE DeleteObject ${objectids}

View File

@@ -1,5 +1,7 @@
*** Settings *** *** Settings ***
Library Selenium2Library Library Selenium2Library
Resource ../Menu.robot
Library Collections
*** Keywords *** *** Keywords ***
ui-tags-create ui-tags-create
@@ -8,6 +10,8 @@ ui-tags-create
... ${tag-name}:输入tag 的name ... ${tag-name}:输入tag 的name
... ${color-element}:选择tag字体的颜色 ... ${color-element}:选择tag字体的颜色
... ${tag-value}:输入tag内容 ... ${tag-value}:输入tag内容
Menu policy&objects Tags
sleep 3
click element id=tagAdd #点击create按钮新建tag click element id=tagAdd #点击create按钮新建tag
sleep 2 sleep 2
input text id=tagsAdd_name ${tag-name} #输入tag name input text id=tagsAdd_name ${tag-name} #输入tag name
@@ -28,6 +32,8 @@ ui-tags-create-1
... ${color-element}:选择tag字体的颜色 ... ${color-element}:选择tag字体的颜色
... ${tag-value}:输入tag内容 ... ${tag-value}:输入tag内容
... ${tag-value1}:输入tag内容 ... ${tag-value1}:输入tag内容
Menu policy&objects Tags
sleep 3
click element id=tagAdd #点击create按钮新建tag click element id=tagAdd #点击create按钮新建tag
sleep 2 sleep 2
input text id=tagsAdd_name ${tag-name} #输入tag name input text id=tagsAdd_name ${tag-name} #输入tag name
@@ -93,7 +99,7 @@ ui-tags-delete
sleep 1 sleep 1
click element id=tagDel #点击删除按钮 click element id=tagDel #点击删除按钮
sleep 1 sleep 1
click element id=tags-tagsDel-confirm click element xpath=/html/body/div/div/div[3]/button[2]
ui-tags-edit-1 ui-tags-edit-1
[Arguments] ${tag-name} ${color-element} ${tag-value} ${tag-value1} [Arguments] ${tag-name} ${color-element} ${tag-value} ${tag-value1}

View File

@@ -1 +1 @@
curl -kv https://mathoverflow.net/questions | iconv -f utf-8 -t gbk curl -kv https://www.villaday.com/villageList | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -kv https://www.verifone.com/ru/ru/o-verifone | iconv -f utf-8 -t gbk curl -kv https://www.banbaowang.com/shouchaobao/ | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -kv https://www.bcg.com/ru-ru/capabilities/client-enablement/default.aspx | iconv -f utf-8 -t gbk curl -kv https://www.qidian.com/rank | iconv -f utf-8 -t gbk

View File

@@ -1 +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 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://americantesol.com/tesol-register.html | iconv -f utf-8 -t gbk

View File

@@ -1 +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 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.playgroundsessions.com/about/software-features | iconv -f utf-8 -t gbk

View File

@@ -1 +0,0 @@
curl -kv https://nationalbank.kz/?&switch=kazakh | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://nationalbank.kz/?switch=kazakh | iconv -f utf-8 -t gbk

View File

@@ -1 +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 curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action | iconv -f utf-8 -t gbk

View File

@@ -1 +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 curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=qeqew&contentType=content-type&resBody=ASDFG" http://open.node.com/action | iconv -f utf-8 -t gbk

View File

@@ -1 +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 curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=mnbv&setCookie=asdf&contentType=content-type&resBody=adzx" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action | iconv -f utf-8 -t gbk

View File

@@ -1 +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 curl -kv --cookie "test%20cookie=null; timezoneoffset=-480; ASP.NET_SessionId=sta2b3gxpxzqei3by1ka3qsa; visid_incap_1010467=Iu/pLzeoTnGn2VDjWdP9GpoBGF8AAAAAQUIPAAAAAADzSLZtZ1tZ/Rbjfct3Nq69" --referer 'https://www.baidu.com/' \ https://www.umusicpub.com/au/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://mp.pipix.com/extra/user_agreement | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.feishu.cn/solutions/scenarios/remote-work | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv curl -kv https://www.smzdm.com/jingxuan/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://passport.bilibili.com/login | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.cheapair.com/hotels/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.surfline.com/category/premium | iconv -f utf-8 -t gbk

View File

@@ -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://expeditionportal.com/4wd/ | iconv -f utf-8 -t gbk

View File

@@ -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.motel6.com/#/home | iconv -f utf-8 -t gbk

View File

@@ -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.choicehotels.com/quality-inn | iconv -f utf-8 -t gbk

View File

@@ -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.clubmed.us/r/Sandpiper-Bay/y | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://www.sse.com.cn/market/overview/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://www.szse.cn/lawrules/index.html | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://www.gf.com.cn/about/intro | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://www.chinastock.com.cn/yhwz/investbank/index.shtml | iconv -f utf-8 -t gbk

View File

@@ -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.virtuoso.com/destinations | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://russia.payu.com/orange-data/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://tytbz.925mm.com/page/about.html | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://dujia.qunar.com/?ex_track=auto_52b3f121 | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.vitalsource.com/textbooks | iconv -f utf-8 -t gbk

View File

@@ -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" --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.sutori.com/teachers | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.flyertalk.com/sponsored/?prx_t=m-MFA4ydEAkfMQA | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.cruisecritic.com/cruiseto/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.vegas.com/lasvegastraveldeals/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv curl -kv https://job.bytedance.com/society/product | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.toutiao.com/ch/news_hot/| iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://e.douyin.com/site/ | iconv -f utf-8 -t gbk

View File

@@ -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.huoshan.com/greenlive/union_hall/ | iconv -f utf-8 -t gbk

View File

@@ -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.ixigua.com/channel/dianying/ | iconv -f utf-8 -t gbk

View File

@@ -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.dcdapp.com/?zt=dongchediapp | iconv -f utf-8 -t gbk

View File

@@ -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.gogokid.com.cn/teacher | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://www.mafengwo.cn/mdd/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://www.sacred-destinations.com/italy/assisi | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://bbs.tianya.cn/list-39-1.shtml | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://hardware.mydrivers.com/class/801/ | iconv -f utf-8 -t gbk

View File

@@ -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://vagabondish.com/category/features/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://nsscreencast.com/episodes | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.edreams.net/merch/trends/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://boutiquehotel.me/paris/| iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.everymantravel.com/terms?qo=footerLinkss/ | iconv -f utf-8 -t gbk

View File

@@ -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" --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.visitphilly.com/covid-19-resources-for-greater-philadelphia/| iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.costcotravel.com/Vacation-Packages | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://secure.cruisingpower.com/public/registration/choose.do | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv curl -kv https://uncorneredmarket.com/work-with-us/tourism-strategy/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.alltrails.com/signup?ref=header | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.atlasobscura.com/experiences | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.anguilla-beaches.com/anguilla-villas.html| iconv -f utf-8 -t gbk

View File

@@ -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.viator.com/login?login_redirect=%2Faccount%2Fbookings | iconv -f utf-8 -t gbk

View File

@@ -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://matadornetwork.com/destinations/north-america/united-states/ | iconv -f utf-8 -t gbk

View File

@@ -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.farecompare.com/hotels/ | iconv -f utf-8 -t gbk

View File

@@ -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.tripit.com/web | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://www.waikikibeachwalk.com/Shops.htm | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://www.world-guides.com/north-america/usa/nevada/las-vegas/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://news.cnstock.com/kcb | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl http://otc.newone.com.cn/cwyw| iconv -f utf-8 -t gbk

View File

@@ -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.eastbay.com/category/womens.html | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.shermanstravel.com/interests/deals-now-travel-later-1 | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.wyndhamhotels.com/laquinta | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://us.travelnow.com/profile/findbookings.html | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.smithsonianjourneys.org/tours/tripfinder/ | iconv -f utf-8 -t gbk

View File

@@ -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" --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.intervalworld.com/web/my/home | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
curl -kv https://www.abercrombiekent.com/travel-destinations | iconv -f utf-8 -t gbk

Some files were not shown because too many files have changed in this diff Show More