Created
January 14, 2016 10:06
-
-
Save IskenHuang/c805464b8e6c081ab27e to your computer and use it in GitHub Desktop.
mitmproxy scripts
This file contains 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
#!/usr/bin/env python | |
# https://docs.mitmproxy.org/en/stable/scripting/inlinescripts.html#inline-scripts | |
def response(context, flow): | |
if 'www.taobao.com' in flow.request.host: | |
flow.request.host = 'www.tmall.com' | |
def request(context, flow): | |
if 'www.taobao.com' in flow.request.host: | |
flow.request.host = 'www.tmall.com' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment