mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-23 17:15:38 +01:00
37961a301b
Mainly worked on authorized_keys and pam persistence modules. Also added the `load` command allowing users to load custom modules from different directories. Lastly, added the optional inclusion of a `$XDG_CONFIG_HOME/pwncat/pwncatrc` configuration allowing you to specify configuration for all invocations of pwncat (like a custom module directory).
50 lines
1.1 KiB
Docker
50 lines
1.1 KiB
Docker
FROM alpine:latest as builder
|
|
|
|
# Install python3 and development files
|
|
RUN set -eux \
|
|
&& apk add --no-cache \
|
|
alpine-sdk \
|
|
libffi-dev \
|
|
linux-headers \
|
|
openssl-dev \
|
|
python3 \
|
|
python3-dev
|
|
|
|
# Install pip
|
|
RUN set -eux \
|
|
&& python3 -m ensurepip
|
|
|
|
# Ensure pip is up to date
|
|
RUN set -eux \
|
|
&& python3 -m pip install -U pip setuptools wheel
|
|
|
|
# Copy pwncat source
|
|
COPY . /pwncat
|
|
|
|
# Setup pwncat
|
|
RUN set -eux \
|
|
&& cd /pwncat \
|
|
&& python3 setup.py install
|
|
|
|
# Cleanup
|
|
RUN set -eux \
|
|
&& find /usr/lib -type f -name '*.pyc' -print0 | xargs -0 -n1 rm -rf || true \
|
|
&& find /usr/lib -type d -name '__pycache__' -print0 | xargs -0 -n1 rm -rf || true
|
|
|
|
|
|
FROM alpine:latest as final
|
|
|
|
RUN set -eux \
|
|
&& apk add --no-cache \
|
|
python3 \
|
|
&& find /usr/lib -type f -name '*.pyc' -print0 | xargs -0 -n1 rm -rf || true \
|
|
&& find /usr/lib -type d -name '__pycache__' -print0 | xargs -0 -n1 rm -rf || true \
|
|
&& mkdir /work
|
|
|
|
COPY --from=builder /usr/bin/pwncat /usr/bin/pwncat
|
|
COPY --from=builder /usr/lib/python3.8 /usr/lib/python3.8
|
|
|
|
# Set working directory
|
|
WORKDIR /work
|
|
ENTRYPOINT ["/usr/bin/pwncat"]
|