mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-20 06:02:24 +00:00
rebuild rdpy
This commit is contained in:
parent
29d223865f
commit
64628c1293
1 changed files with 10 additions and 9 deletions
|
@ -1,10 +1,11 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
#
|
||||||
# Include dist
|
# Include dist
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
|
#
|
||||||
# Get and install dependencies & packages
|
# Get and install dependencies & packages
|
||||||
RUN apk -U add \
|
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||||
|
apk -U add \
|
||||||
build-base \
|
build-base \
|
||||||
git \
|
git \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
|
@ -14,11 +15,11 @@ RUN apk -U add \
|
||||||
python-dev \
|
python-dev \
|
||||||
py-pip \
|
py-pip \
|
||||||
py-setuptools && \
|
py-setuptools && \
|
||||||
|
#
|
||||||
# Setup user
|
# Setup user
|
||||||
addgroup -g 2000 rdpy && \
|
addgroup -g 2000 rdpy && \
|
||||||
adduser -S -s /bin/ash -u 2000 -D -g 2000 rdpy && \
|
adduser -S -s /bin/ash -u 2000 -D -g 2000 rdpy && \
|
||||||
|
#
|
||||||
# Install deps
|
# Install deps
|
||||||
pip install --no-cache-dir --upgrade pip && \
|
pip install --no-cache-dir --upgrade pip && \
|
||||||
pip install --no-cache-dir --upgrade cffi && \
|
pip install --no-cache-dir --upgrade cffi && \
|
||||||
|
@ -30,19 +31,19 @@ RUN apk -U add \
|
||||||
service_identity \
|
service_identity \
|
||||||
rsa \
|
rsa \
|
||||||
pyasn1 && \
|
pyasn1 && \
|
||||||
|
#
|
||||||
# Install rdpy from git
|
# Install rdpy from git
|
||||||
mkdir -p /opt && \
|
mkdir -p /opt && \
|
||||||
cd /opt && \
|
cd /opt && \
|
||||||
git clone --depth=1 https://github.com/t3chn0m4g3/rdpy && \
|
git clone --depth=1 https://github.com/t3chn0m4g3/rdpy && \
|
||||||
cd rdpy && \
|
cd rdpy && \
|
||||||
python setup.py install && \
|
python setup.py install && \
|
||||||
|
#
|
||||||
# Setup user, groups and configs
|
# Setup user, groups and configs
|
||||||
cp /root/dist/* /opt/rdpy/ && \
|
cp /root/dist/* /opt/rdpy/ && \
|
||||||
chown rdpy:rdpy -R /opt/rdpy/* && \
|
chown rdpy:rdpy -R /opt/rdpy/* && \
|
||||||
mkdir -p /var/log/rdpy && \
|
mkdir -p /var/log/rdpy && \
|
||||||
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -rf /root/* && \
|
rm -rf /root/* && \
|
||||||
apk del --purge build-base \
|
apk del --purge build-base \
|
||||||
|
@ -52,7 +53,7 @@ RUN apk -U add \
|
||||||
python-dev \
|
python-dev \
|
||||||
py-pip && \
|
py-pip && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
#
|
||||||
# Start rdpy
|
# Start rdpy
|
||||||
USER rdpy:rdpy
|
USER rdpy:rdpy
|
||||||
CMD exec /usr/bin/python2 -i /usr/bin/rdpy-rdphoneypot.py /opt/rdpy/$(shuf -i 1-3 -n 1) >> /var/log/rdpy/rdpy.log
|
CMD exec /usr/bin/python2 -i /usr/bin/rdpy-rdphoneypot.py /opt/rdpy/$(shuf -i 1-3 -n 1) >> /var/log/rdpy/rdpy.log
|
||||||
|
|
Loading…
Reference in a new issue