1、删除打印信息 2、添加配置文件
This commit is contained in:
120
unittest_python/unittest/tsg_diagnose.conf
Normal file
120
unittest_python/unittest/tsg_diagnose.conf
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
[test_securityPolicy_bypass]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_securityPolicy_intercept]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_securityPolicy_intercept_certerrExpired]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600
|
||||||
|
|
||||||
|
# 50M bps
|
||||||
|
|
||||||
|
[test_securityPolicy_intercept_certerrSelf_signed]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_securityPolicy_intercept_certerrUntrusted_root]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_ssl_redirect]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_ssl_block]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_ssl_replace]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_ssl_hijack]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_ssl_insert]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_http_redirect]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_http_block]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_http_replace]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_http_hijack]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_proxyPolicy_http_insert]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_https_con_traffic_1k]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_https_con_traffic_4k]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_https_con_traffic_16k]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_https_con_traffic_64k]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_https_con_traffic_256k]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_https_con_traffic_1M]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_https_con_traffic_4M]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
[test_https_con_traffic_16M]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
|
|
||||||
|
[test_https_con_traffic_64M]
|
||||||
|
enabled = 1
|
||||||
|
conn_timeout = 1
|
||||||
|
max_recv_speed_large = 6553600 # 50M bps
|
||||||
@@ -11,6 +11,7 @@ import ciunittest
|
|||||||
import argparse
|
import argparse
|
||||||
from telegraf.client import TelegrafClient
|
from telegraf.client import TelegrafClient
|
||||||
import hashlib
|
import hashlib
|
||||||
|
#from configparser import ConfigParser
|
||||||
|
|
||||||
URLBypass = 'https://sha384.badssl.self-test.geedge.net'
|
URLBypass = 'https://sha384.badssl.self-test.geedge.net'
|
||||||
URLIntercept = 'https://sha256.badssl.self-test.geedge.net'
|
URLIntercept = 'https://sha256.badssl.self-test.geedge.net'
|
||||||
@@ -224,11 +225,6 @@ class ProxyRequestBuild:
|
|||||||
if isSsl == True:
|
if isSsl == True:
|
||||||
certs = self.conn.getinfo(self.conn.INFO_CERTINFO)
|
certs = self.conn.getinfo(self.conn.INFO_CERTINFO)
|
||||||
body = self.bodyBuf.getvalue().decode('utf-8')
|
body = self.bodyBuf.getvalue().decode('utf-8')
|
||||||
print(url)
|
|
||||||
print(proxy_info_re)
|
|
||||||
print(isSsl)
|
|
||||||
self.conn.close()
|
|
||||||
print (body)
|
|
||||||
self._cert_verify(ssl_replace_info_re,certs, isSsl)
|
self._cert_verify(ssl_replace_info_re,certs, isSsl)
|
||||||
if not re.search(r'EnglishSearchShared', body, 0) and \
|
if not re.search(r'EnglishSearchShared', body, 0) and \
|
||||||
re.search(r'03C174CD9D809789CCEC18D6F585DF3E', body, 0):
|
re.search(r'03C174CD9D809789CCEC18D6F585DF3E', body, 0):
|
||||||
|
|||||||
Reference in New Issue
Block a user