Open tmsteen opened 5 years ago
Which OS was this on? I don't get this error on Ubuntu 18 with python 3.7
This would have been in a Python3-Alpine container.
Is there any easy way I can test that? I'm not too familiar with using containers and Alpine.
Here is what I did, assuming you have Docker installed on your platform.
This is the Dockerfile
I used.
FROM python:3-alpine
RUN apk add --no-cache git \
gcc \
musl-dev \
linux-headers
WORKDIR /opt
RUN git clone https://github.com/fox-it/mitm6.git
WORKDIR /opt/mitm6/
RUN pip install -r requirements.txt
RUN python setup.py install
ENTRYPOINT ["mitm6"]
Build with:
docker build -t mitm6 <path with Dockerfile>
Then run with:
sudo docker run --net=host --name mitm6 --privileged -it mitm6 [args]
Let me know if you need me to test anything on my end.
This line here breaks in Python versions starting with 3.7 due to updates to the
socket
library.https://github.com/fox-it/mitm6/blob/186428fdcb432b6226fbbd8be2897f7a4a29e32f/mitm6/mitm6.py#L283-L284
From the documentation for the
socket
library (https://docs.python.org/3/library/socket.html) thesocket.getaddrinfo
method has this message:In the current version, running on Python 3.7.2, you will get an error:
If you go and edit the above mentioned line to remove the additional
%...
the error goes away.I do not know what this does to the overall functionality of the tool, otherwise I would have just included the PR. Unfortunately, building a good testing environment for this is difficult.