From 01ddba846fe2ce90eb454d54091e95e8ce5c797e Mon Sep 17 00:00:00 2001 From: yassine birig Date: Sat, 26 Sep 2020 23:55:53 +0100 Subject: [PATCH 1/4] add Docker file --- Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6136ffcc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:2-alpine as compile +WORKDIR /opt +RUN apk add --no-cache git gcc openssl-dev libffi-dev musl-dev +RUN pip install virtualenv +RUN virtualenv -p python venv +ENV PATH="/opt/venv/bin:$PATH" +RUN git clone --depth 1 https://github.com/CoreSecurity/impacket.git +RUN pip install impacket/ + +FROM python:2-alpine +COPY --from=compile /opt/venv /opt/venv +ENV PATH="/opt/venv/bin:$PATH" +ENTRYPOINT ["/bin/sh"] \ No newline at end of file From 326f13f7577e535fd4e2df5b803285c825e72a21 Mon Sep 17 00:00:00 2001 From: yassine birig Date: Sun, 27 Sep 2020 00:04:45 +0100 Subject: [PATCH 2/4] modifiy README add Docker build and usage" --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 5962659b..63039912 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,19 @@ If you want to run the library test cases you need to do mainly three things: Once that's done, you can run `tox` and wait for the results. If all goes well, all test cases should pass. You will also have a coverage HTML report located at `impacket/tests/htlmcov/index.html` +Support Docker +--------------- + +Build Image Impacket +To create image + +`docker build -t "impacket:latest" .` + + +Using Impacket + +`docker run -it --rm "impacket:latest"` + Licensing ========= From c95160d8f067b89decbd2c382861f013488f2163 Mon Sep 17 00:00:00 2001 From: yassine birig Date: Sun, 27 Sep 2020 00:12:08 +0100 Subject: [PATCH 3/4] change link --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6136ffcc..c32d8b14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ RUN apk add --no-cache git gcc openssl-dev libffi-dev musl-dev RUN pip install virtualenv RUN virtualenv -p python venv ENV PATH="/opt/venv/bin:$PATH" -RUN git clone --depth 1 https://github.com/CoreSecurity/impacket.git +RUN git clone --depth 1 https://github.com/SecureAuthCorp/impacket.git RUN pip install impacket/ FROM python:2-alpine From 4b414a4fd9af5438c11fbf0737fcbd801eba7126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Notin?= Date: Sat, 7 Nov 2020 19:47:27 +0100 Subject: [PATCH 4/4] Delete comment for myself Python2 compatibility was tested and implemented :) Sorry I forgot to clean this comment --- impacket/examples/ntlmrelayx/servers/wcfrelayserver.py | 1 - 1 file changed, 1 deletion(-) diff --git a/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py b/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py index ca0e7866..57d7942e 100644 --- a/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py +++ b/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py @@ -17,7 +17,6 @@ # This is the WCF server (ADWS too) which relays the NTLMSSP messages to other protocols # Only NetTcpBinding is supported! -# FIXME tester en python 2 ! # To support NetTcpBinding, this implements the ".NET Message Framing Protocol" [MC-NMF] and # ".NET NegotiateStream Protocol" [MS-NNS] # Thanks to inspiration from https://github.com/ernw/net.tcp-proxy/blob/master/nettcp/nmf.py