-
-
Save flankerhqd/df6f6144c7c395d9b6f047dc2ecc2683 to your computer and use it in GitHub Desktop.
sample script for github issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mitmproxy | |
from mitmproxy.models import HTTPResponse | |
from netlib.http import Headers | |
import os | |
def request(context, flow): | |
print flow.request.url | |
if not flow.request.url.endswith("test.html"): | |
return | |
print "fuck" | |
resp = HTTPResponse([1,1], 302, "Found", ODictCaseless([["Context-Type", "text/html"], ["Location", "http://192.168.12.1/aaa.html"]]), "") | |
flow.reply(resp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment