user670186
user670186

Reputation: 2860

building and running mitmproxy in python windows: possible at all?

I was attempting to install mitmproxy and run the "mitmproxy" and "mitmdump" from the Scripts folder.

However, I get tons of errors that a lot of modules are not found.

From the error messages I tried to install all the missing modules

I stopped after that as I am not sure this will lead me to success.

a) is running and building mitmproxy on windows possible at all?
b) how can I get all the dependant modules and install them?

I reached the point where the package "urwid" is needed. However that fails with: "Unable to find vcvarsall.bat"

EDIT: it seems running mitmproxy is not really possible as the urwid package provides the terminal GUI which does not work for windows. However, I only need mitmdump. When I try running it I get:

C:\Python27\Scripts>C:\Python27\python.exe mitmdump -w out.txt
Traceback (most recent call last): File "mitmdump", line 41, in <module>
proxyconfig = proxy.process_proxy_options(parser, options)
File "C:\Python27\lib\site-packages\libmproxy\proxy.py", line 527, in process_
proxy_options certutils.dummy_ca(cacert)
File "C:\Python27\lib\site-packages\libmproxy\certutils.py", line 44, in dummy_castdin=subprocess.PIPE
File "C:\Python27\lib\subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 679, in __init__errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_childstartupinfo)
WindowsError: [Error 2] System can not find file
C:\Python27\Scripts>

Maybe it can not find this certificate dummy file that is created. However, it didnt create the "mitmproxy-ca-cert.p12"

Help needed

Upvotes: 4

Views: 6497

Answers (1)

Maximilian Hils
Maximilian Hils

Reputation: 6770

mitmproxy's console interface (ncurses) doesn't run on Windows, although you can get it running under Cygwin. If you don't need an interactive user interface for your specific task, mitmdump (comes with mitmproxy) gets the job done as well. If you want to try out some alpha-quality software, you can also try mitmproxy's mitmweb and open the webinterface at http://localhost:8081/.

Upvotes: 4

Related Questions