Advertisement
snj

Installing mitmproxy (trunk) on Mac OSX

snj
May 10th, 2011
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.76 KB | None | 0 0
  1. $ workon pen
  2.  
  3. $ git clone git://github.com/wardi/urwid.git
  4.  
  5. $ cd urwid
  6.  
  7. $ gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c source/str_util.c -o build/temp.macosx-10.6-universal-2.6/source/str_util.o
  8.  
  9. $ python setup.py build
  10. $ python setup.py install
  11.  
  12. $ git clone https://github.com/cortesi/mitmproxy.git
  13.  
  14. $ cd mitmproxy
  15.  
  16. # source/libmproxy/console.py を修正
  17.  
  18. diff --git a/libmproxy/console.py b/libmproxy/console.py
  19. index 399640c..d655e53 100644
  20. --- a/libmproxy/console.py
  21. +++ b/libmproxy/console.py
  22. @@ -117,7 +117,7 @@ def int_version(v):
  23.      v = urwid.__version__.split(".")
  24.      x = 0
  25.      for i in range(min(SIG, len(v))):
  26. -        x += int(v[i]) * 10**(SIG-i)
  27. +        x += int(v[i].split('-')[0]) * 10**(SIG-i)
  28.      return x
  29.      
  30. $ python setup.py build
  31. $ python setup.py install
  32.  
  33. $ mitmproxy --help
  34. Usage: mitmproxy [options] [flowdump path]
  35.  
  36. Options:
  37.   --version             show program's version number and exit
  38.  -h, --help            show this help message and exit
  39.  -a ADDR               Address to bind proxy to (defaults to all interfaces)
  40.  --confdir=CONFDIR     Configuration directory. (~/.mitmproxy)
  41.  -p PORT               Proxy service port.
  42.  -q                    Quiet.
  43.  --anticache           Strip out request headers that might cause the server
  44.                        to return 304-not-modified.
  45.  --reqscript=REQUEST_SCRIPT
  46.                        Script to run when a request is recieved.
  47.  --respscript=RESPONSE_SCRIPT
  48.                        Script to run when a response is recieved.
  49.  -t                    Set sticky cookie for all requests.
  50.  -T FILTER             Set sticky cookie filter. Matched against requests.
  51.  -u                    Set sticky auth for all requests.
  52.  -U FILTER             Set sticky auth filter. Matched against requests.
  53.  -v                    Increase verbosity. Can be passed multiple times.
  54.  -w WFILE              Write flows to file.
  55.  --debug              
  56.  
  57.  Client Replay:
  58.    -c PATH             Replay client requests from a saved file.
  59.  
  60.  Server Replay:
  61.    -s PATH             Replay server responses from a saved file.
  62.    -k                  Kill extra requests during replay.
  63.    --rheader=RHEADERS  Request headers to be considered during replay. Can be
  64.                        passed multiple times.
  65.    --norefresh         Disable response refresh, which updates times in
  66.                        cookies and headers for replayed responses.
  67.  
  68.  SSL:
  69.    --cert=CERT         User-created SSL certificate file.
  70.    --ciphers=CIPHERS   SSL ciphers.
  71.  
  72.  Filters:
  73.    See help in mitmproxy for filter expression syntax.
  74.  
  75.    -l LIMIT, --limit=LIMIT
  76.                        Limit filter expression.
  77.    -i INTERCEPT, --intercept=INTERCEPT
  78.                        Intercept filter expression.
  79.                        
  80. $ mitmdump --help
  81. Usage: mitmdump [options] [filter]
  82.  
  83. Options:
  84.  --version             show program's version number and exit
  85.   -h, --help            show this help message and exit
  86.   -a ADDR               Address to bind proxy to (defaults to all interfaces)
  87.   --confdir=CONFDIR     Configuration directory. (~/.mitmproxy)
  88.   -p PORT               Proxy service port.
  89.   -q                    Quiet.
  90.   --anticache           Strip out request headers that might cause the server
  91.                         to return 304-not-modified.
  92.   --reqscript=REQUEST_SCRIPT
  93.                         Script to run when a request is recieved.
  94.   --respscript=RESPONSE_SCRIPT
  95.                         Script to run when a response is recieved.
  96.   -t                    Set sticky cookie for all requests.
  97.   -T FILTER             Set sticky cookie filter. Matched against requests.
  98.   -u                    Set sticky auth for all requests.
  99.   -U FILTER             Set sticky auth filter. Matched against requests.
  100.   -v                    Increase verbosity. Can be passed multiple times.
  101.   -w WFILE              Write flows to file.
  102.   --keepserving         Continue serving after playback. We exit by default.
  103.  
  104.   Client Replay:
  105.     -c PATH             Replay client requests from a saved file.
  106.  
  107.   Server Replay:
  108.     -s PATH             Replay server responses from a saved file.
  109.     -k                  Kill extra requests during replay.
  110.     --rheader=RHEADERS  Request headers to be considered during replay. Can be
  111.                         passed multiple times.
  112.     --norefresh         Disable response refresh, which updates times in
  113.                         cookies and headers for replayed responses.
  114.  
  115.   SSL:
  116.     --cert=CERT         User-created SSL certificate file.
  117.     --ciphers=CIPHERS   SSL ciphers.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement