add sentrypeer, wordpot tweaking, fix udp src_ip issues

This commit is contained in:
t3chn0m4g3
2022-02-22 17:57:55 +00:00
parent af2174ee9f
commit 8d16d7587d
7 changed files with 98 additions and 4 deletions

View File

@ -0,0 +1,66 @@
FROM alpine:3.15 as builder
#
RUN apk -U add --no-cache \
autoconf \
automake \
autoconf-archive \
build-base \
curl-dev \
cmocka-dev \
git \
jansson-dev \
libmicrohttpd-dev \
pcre2-dev \
sqlite-dev \
util-linux-dev
#
RUN apk -U add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
libosip2-dev
#
# Download SentryPeer sources and build
RUN git clone https://github.com/SentryPeer/SentryPeer.git -b v1.0.0
#
WORKDIR /SentryPeer
#
RUN ./bootstrap.sh
RUN ./configure
RUN make
RUN make check
RUN make install
RUN tar cvfz sp.tgz /SentryPeer/* && \
mv sp.tgz /
#
FROM alpine:3.15
#
#COPY --from=builder /sp.tgz /root
COPY --from=builder /SentryPeer/sentrypeer /opt/sentrypeer/
#
# Install packages
RUN apk -U add --no-cache \
jansson \
libmicrohttpd \
libuuid \
pcre2 \
sqlite-libs && \
apk -U add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
libosip2 && \
#
# Extract from builder
# mkdir /opt/sentrypeer && \
# tar xvfz /root/sp.tgz --strip-components=1 -C /opt/sentrypeer/ && \
#
# Setup user, groups and configs
mkdir -p /var/log/sentrypeer && \
addgroup -g 2000 sentrypeer && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 sentrypeer && \
chown -R sentrypeer:sentrypeer /opt/sentrypeer && \
#
# Clean up
rm -rf /root/* && \
rm -rf /var/cache/apk/*
#
# Set workdir and start sentrypeer
STOPSIGNAL SIGKILL
USER sentrypeer:sentrypeer
WORKDIR /opt/sentrypeer/
CMD ./sentrypeer -draws

View File

@ -0,0 +1,22 @@
version: '2.3'
networks:
sentrypeer_local:
services:
# SentryPeer service
sentrypeer:
build: .
container_name: sentrypeer
restart: always
networks:
- sentrypeer_local
ports:
- "5060:5060/udp"
- "5060:5060/tcp"
# - "127.0.0.1:8082:8082"
image: "dtagdevsec/sentrypeer:2203"
#read_only: true
#volumes:
# - /data/sentrypeer/log:/opt/sentrypeer/log

View File

@ -1,5 +1,7 @@
FROM alpine:3.15
#
# Include dist
ADD dist/ /root/dist/
# Install packages
RUN apk -U add \
build-base \
@ -16,6 +18,7 @@ RUN apk -U add \
cd wordpot2 && \
git checkout e93a2e00d84d280b0acd58ba6889b4bee8a6e4d2 && \
sed "s/MarkupSafe==1.0/MarkupSafe==1.1.1/g" -i requirements.txt && \
cp /root/dist/views.py /opt/wordpot2/wordpot/views.py && \
pip3 install -r requirements.txt && \
setcap cap_net_bind_service=+ep /usr/bin/python3.9 && \
#
@ -35,4 +38,4 @@ RUN apk -U add \
STOPSIGNAL SIGINT
USER wordpot:wordpot
WORKDIR /opt/wordpot2
CMD ["/usr/bin/python3","wordpot2.py", "--host", "0.0.0.0", "--port", "80", "--title", "Crypto Plaza"]
CMD ["/usr/bin/python3","wordpot2.py", "--host", "0.0.0.0", "--port", "80", "--title", "Wordpress"]

View File

@ -17,4 +17,4 @@ services:
image: "dtagdevsec/wordpot:2203"
# read_only: true
# volumes:
# - /data/ddospot/db:/opt/ddospot/ddospot/db
# - /data/wordpot/log:/opt/ddospot/ddospot/db