def action(): baseproxy = AsyncMitmProxy( server_addr=('', 8081), https=True, ) baseproxy.register(DebugInterceptor) baseproxy.serve_forever()
#coding:utf-8 from baseproxy.proxy import ReqIntercept, RspIntercept, AsyncMitmProxy __author__ = 'qiye' __date__ = '2018/6/21 23:35' class DebugInterceptor(ReqIntercept, RspIntercept): def deal_request(self, request): return request def deal_response(self, response): if response.get_header("Content-Type") and 'image'in response.get_header("Content-Type"): response = None return response if __name__=="__main__": baseproxy = AsyncMitmProxy(https=False) baseproxy.register(DebugInterceptor) baseproxy.serve_forever()
#coding:utf-8 from baseproxy.Interceptor import ImageInterceptor __author__ = 'qiye' __date__ = '2018/6/22 22:55' from baseproxy.proxy import RspIntercept, AsyncMitmProxy if __name__ == "__main__": baseproxy = AsyncMitmProxy(https=True) baseproxy.register(ImageInterceptor) baseproxy.serve_forever() pass
# coding:utf-8 from baseproxy.Interceptor import DebugInterceptor, CacheInterceptor, NoneInterceptor, ImageInterceptor from baseproxy.Sampling import Sampling from baseproxy.proxy import AsyncMitmProxy from threading import Timer if __name__ == "__main__": baseproxy = AsyncMitmProxy(Sampling=Sampling(), https=True) baseproxy.register(CacheInterceptor) baseproxy.serve_forever()
#coding:utf-8 __author__ = 'qiye' __date__ = '2018/6/22 18:38' from baseproxy.proxy import AsyncMitmProxy baseproxy = AsyncMitmProxy(server_addr=('', 8899), https=True) baseproxy.serve_forever()