JonDoNym/peinjector

No module named libmproxy

theoneandonly-vector opened this issue · 2 comments

No module named libmproxy

probably something changed in the mitmproxy software..

interceptor.err:
Traceback (most recent call last):
File "./peinjector_interceptor.py", line 11, in
from libmproxy import controller, proxy
ImportError: No module named libmproxy
Traceback (most recent call last):
File "./peinjector_interceptor.py", line 11, in
from libmproxy import controller, proxy
ImportError: No module named libmproxy

the module libmproxy is now officially mitmproxy. so I changed that in "peinjector_interceptor.py"
but now I get another error:
AttributeError: 'module' object has no attribute 'IntEnum'

full-log:
Traceback (most recent call last):
File "./peinjector_interceptor.py", line 11, in
from mitmproxy import controller, proxy
File "/usr/lib/python2.7/dist-packages/mitmproxy/proxy/init.py", line 3, in
from .config import ProxyConfig
File "/usr/lib/python2.7/dist-packages/mitmproxy/proxy/config.py", line 16, in
from netlib.http import authentication
File "/usr/lib/python2.7/dist-packages/netlib/http/init.py", line 2, in
from netlib.http.request import Request
File "/usr/lib/python2.7/dist-packages/netlib/http/request.py", line 13, in
from netlib.http import message
File "/usr/lib/python2.7/dist-packages/netlib/http/message.py", line 8, in
from netlib import encoding, strutils, basetypes
File "/usr/lib/python2.7/dist-packages/netlib/encoding.py", line 13, in
import brotli
File "/usr/lib/python2.7/dist-packages/brotli/init.py", line 3, in
from .brotli import (
File "/usr/lib/python2.7/dist-packages/brotli/brotli.py", line 25, in
class BrotliEncoderMode(enum.IntEnum):
AttributeError: 'module' object has no attribute 'IntEnum'

Which os are you using, btw. what's your mitmproxy version?

We know that there are problems with mitmproxy/libmproxy, they are constantly breaking stuff and compatibility. Try to stay at an older, working version and don't update mitmproxy/libmprox if possible. You can use an virtual environment for this, if you need an up-to-date version of mitmproxy.

It is on our agenda to find a replacement for mitmproxy/libmproxy, but we are very busy at the moment.
If you know a good mitm library which allows seamless modification (no complete buffering), let us know.