Sniffing traffic is a very hackish thing to do. So if you are against hacking things, stop reading.
There are a couple of ways to sniff the HTTP traffic. Using Wireshark, which has a nice user interface, is one of the mos popular ways. Today, I am going to introduce another tool call mitmproxy.
mitmproxy is an SSL-capable man-in-the-middle proxy. It was the very tool that was used to discover the misdeeds of Path.
How to use mitmproxy?
- Download mitmproxy, and install. You could install from source and run
sudo python setup.py install
- Go to your Terminal and run
mitmproxy
. - Obtain the IP address of your computer by running
ifconfig en1
(or whatever that you are using). - Set the proxy on your iPhone by going to your connected wifi settings. Set HTTP Proxy to “Manual”, and enter the IP of your computer with port as 8080.
- Start sniffing! Refer to the console tool guide. Press ‘?’ to bring up the list of commands.