in Home

mitmproxy over OSX 10.7

Mitmproxy is an SSL-capable man-in-the-middle HTTP proxy. It provides a console interface that allows traffic flows to be inspected and edited on the fly. In other words is like a tcpdump from http.

To install:
  1. Check your python version (you need 2.6.x or 2.7.x). If have any trouble with this, install macports and
    sudo port install python26
  2. Download urwid from here and next, uncompress and
    sudo python setup.py install
  3. Checkout the source code with git
    git clone https://github.com/cortesi/mitmproxy.git
  4. Install using the setup.py script. This is the output:
python setup.py install

/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/libmproxy
copying libmproxy/__init__.py -> build/lib/libmproxy
copying libmproxy/cmdline.py -> build/lib/libmproxy
copying libmproxy/controller.py -> build/lib/libmproxy
copying libmproxy/dump.py -> build/lib/libmproxy
copying libmproxy/encoding.py -> build/lib/libmproxy
copying libmproxy/filt.py -> build/lib/libmproxy
copying libmproxy/flow.py -> build/lib/libmproxy
copying libmproxy/proxy.py -> build/lib/libmproxy
copying libmproxy/script.py -> build/lib/libmproxy
copying libmproxy/tnetstring.py -> build/lib/libmproxy
copying libmproxy/utils.py -> build/lib/libmproxy
copying libmproxy/version.py -> build/lib/libmproxy
creating build/lib/libmproxy/console
copying libmproxy/console/__init__.py -> build/lib/libmproxy/console
copying libmproxy/console/common.py -> build/lib/libmproxy/console
copying libmproxy/console/connlist.py -> build/lib/libmproxy/console
copying libmproxy/console/connview.py -> build/lib/libmproxy/console
copying libmproxy/console/help.py -> build/lib/libmproxy/console
copying libmproxy/console/kveditor.py -> build/lib/libmproxy/console
creating build/lib/libmproxy/contrib
copying libmproxy/contrib/__init__.py -> build/lib/libmproxy/contrib
copying libmproxy/contrib/pyparsing.py -> build/lib/libmproxy/contrib
creating build/lib/libmproxy/resources
copying libmproxy/resources/ca.cnf -> build/lib/libmproxy/resources
copying libmproxy/resources/cert.cnf -> build/lib/libmproxy/resources
running build_scripts
creating build/scripts-2.7
copying and adjusting mitmproxy -> build/scripts-2.7
copying and adjusting mitmdump -> build/scripts-2.7
changing mode of build/scripts-2.7/mitmproxy from 644 to 755
changing mode of build/scripts-2.7/mitmdump from 644 to 755
running install_lib
creating /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/__init__.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/cmdline.py -> /Library/Python/2.7/site-packages/libmproxy
creating /Library/Python/2.7/site-packages/libmproxy/console
copying build/lib/libmproxy/console/__init__.py -> /Library/Python/2.7/site-packages/libmproxy/console
copying build/lib/libmproxy/console/common.py -> /Library/Python/2.7/site-packages/libmproxy/console
copying build/lib/libmproxy/console/connlist.py -> /Library/Python/2.7/site-packages/libmproxy/console
copying build/lib/libmproxy/console/connview.py -> /Library/Python/2.7/site-packages/libmproxy/console
copying build/lib/libmproxy/console/help.py -> /Library/Python/2.7/site-packages/libmproxy/console
copying build/lib/libmproxy/console/kveditor.py -> /Library/Python/2.7/site-packages/libmproxy/console
creating /Library/Python/2.7/site-packages/libmproxy/contrib
copying build/lib/libmproxy/contrib/__init__.py -> /Library/Python/2.7/site-packages/libmproxy/contrib
copying build/lib/libmproxy/contrib/pyparsing.py -> /Library/Python/2.7/site-packages/libmproxy/contrib
copying build/lib/libmproxy/controller.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/dump.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/encoding.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/filt.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/flow.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/proxy.py -> /Library/Python/2.7/site-packages/libmproxy
creating /Library/Python/2.7/site-packages/libmproxy/resources
copying build/lib/libmproxy/resources/ca.cnf -> /Library/Python/2.7/site-packages/libmproxy/resources
copying build/lib/libmproxy/resources/cert.cnf -> /Library/Python/2.7/site-packages/libmproxy/resources
copying build/lib/libmproxy/script.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/tnetstring.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/utils.py -> /Library/Python/2.7/site-packages/libmproxy
copying build/lib/libmproxy/version.py -> /Library/Python/2.7/site-packages/libmproxy
byte-compiling /Library/Python/2.7/site-packages/libmproxy/__init__.py to __init__.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/cmdline.py to cmdline.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/console/__init__.py to __init__.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/console/common.py to common.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/console/connlist.py to connlist.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/console/connview.py to connview.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/console/help.py to help.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/console/kveditor.py to kveditor.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/contrib/__init__.py to __init__.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/contrib/pyparsing.py to pyparsing.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/controller.py to controller.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/dump.py to dump.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/encoding.py to encoding.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/filt.py to filt.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/flow.py to flow.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/proxy.py to proxy.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/script.py to script.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/tnetstring.py to tnetstring.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/utils.py to utils.pyc
byte-compiling /Library/Python/2.7/site-packages/libmproxy/version.py to version.pyc
running install_scripts
copying build/scripts-2.7/mitmdump -> /usr/local/bin
copying build/scripts-2.7/mitmproxy -> /usr/local/bin
changing mode of /usr/local/bin/mitmdump to 755
changing mode of /usr/local/bin/mitmproxy to 755
running install_egg_info
Writing /Library/Python/2.7/site-packages/mitmproxy-0.6-py2.7.egg-info
All you need is execute the command “mitmproxy” in a terminal and configure your preferred browser to use the manual proxy at: localhost port 8080.
 
So nice and very useful with the uncomfortable “calls to home” from certain apps and web apps.
Screen_shot_2012-02-09_at_110screen_shot_2012-02-09_at_11

Write a Comment

Comment