Mitmproxy is an SSL-enabled HTTP proxy that can be used to debug HTTP traffic, initiate a man-in-the-middle attack, and so on. Mitmproxy provides a console interface for dynamically intercepting and editing HTTP packets. Mitmdump is the command-line version of Mitmproxy, with the same functionality.
Main features of Mitmproxy:
Intercept and modify HTTP traffic on the fly
Save HTTP Conversations for later replay and analysis
Replay both HTTP clients and servers
Make scripted changes to HTTP traffic using Python
SSL interception certs generated on the fly
Step1. Installing PIP
PIP is a tool for installing Python packages, provides installation packages, lists installed packages, upgrades packages, and features to uninstall packages.
Pip is a replacement for Easy_install, providing the same functionality for finding packages as Easy_install, so packages that can be installed using Easy_install can also be installed using PIP.
pip can be done through source code packages, Easy_install or scripts.
easy_install:
$ easy_install pip
Step2.Installing Mitmproxy
Pip Install Mitmproxy
step3. Start Mitmproxy
Mitmproxy
# port defaults to 8080 if you have a program that has occupied this port can specify a different port (such as 1234)
MITMPROXY-P 1234
step4. Data filtering
L # Set Limit filter
Weixin Enter
Tips:
1. If you encounter "Permission denied" similar error when installing, please use sudo to perform the installation;
2. If you encounter when booting: Pyopenssl version is too low, prompt the following:
You is using an outdated version of Pyopenssl:mitmproxy requires PYOPENSSL 0.14 or greater.
Your Pyopenssl 0.13.1 installation is located at/system/library/frameworks/python.framework/versions/2.7/extras/lib/ Python/openssl
Need to download Pyopenssl 0.14 installation:
Https://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.14.tar.gz
Tar zxvf pyopenssl-0.14.tar.gz
CD pyOpenSSL-0.14
Python setup.py Install
Install Mitmproxy and use tutorials under MAC