add test
This commit is contained in:
parent
99b9c47b78
commit
b7e0f2d1ad
|
|
@ -41,12 +41,12 @@ class Listener:
|
||||||
print("=====>", flow.request.data)
|
print("=====>", flow.request.data)
|
||||||
print("=====>headers-====>", flow.request.headers)
|
print("=====>headers-====>", flow.request.headers)
|
||||||
|
|
||||||
if 'ulogs.umeng.com/unify_logs' in url:
|
# if 'ulogs.umeng.com/unify_logs' in url:
|
||||||
try:
|
# try:
|
||||||
ctx.log.info('flow request:' + url)
|
# ctx.log.info('flow request:' + url)
|
||||||
print('url===>' % (url))
|
# print('url===>' % (url))
|
||||||
except Exception as e:
|
# except Exception as e:
|
||||||
ctx.log.error('mitmproxy intercept http error:' + repr(e))
|
# ctx.log.error('mitmproxy intercept http error:' + repr(e))
|
||||||
|
|
||||||
def response(self, flow):
|
def response(self, flow):
|
||||||
resp = flow.response
|
resp = flow.response
|
||||||
|
|
@ -56,7 +56,6 @@ class Listener:
|
||||||
|
|
||||||
class TlsStrategy(ABC):
|
class TlsStrategy(ABC):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# A server_address -> interception results mapping
|
|
||||||
self.history = collections.defaultdict(lambda: collections.deque(maxlen=200))
|
self.history = collections.defaultdict(lambda: collections.deque(maxlen=200))
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue