我有这个python脚本(test.py
):
from mitmproxy import http
OGG = open('testfile.ogg', 'rb').read()
SIZE = str(len(OGG))
def request(flow):
flow.response = http.HTTPResponse.make(
200,
OGG,
{'Content-Type' : 'application/octet-stream',
'Content-Length': SIZE})
如果一个特定的域被请求,我想把HTTP应答发送给客户机,但是我不知道如何去做。最后,所有的HTTP请求都将用OGG文件来响应。在
我尝试了以下方法:
mitmproxy -T -p 8080 -s test.py -i "test.example.com"
mitmproxy -T -p 8080 -s test.py -i "93.184.216.34"
有人能回答吗?在
目前没有回答
相关问题 更多 >
编程相关推荐