mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
tweaking
This commit is contained in:
parent
0abb518177
commit
660a046bcc
5 changed files with 197 additions and 4 deletions
31
bin/tped.sh
Executable file
31
bin/tped.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# set backtitle, get filename
|
||||||
|
myBACKTITLE="T-Pot Edition Selection Tool"
|
||||||
|
myYMLS=$(cd /opt/tpot/etc/compose/ && ls -1 *.yml)
|
||||||
|
myLINK="/opt/tpot/etc/tpot.yml"
|
||||||
|
|
||||||
|
# setup menu
|
||||||
|
for i in $myYMLS;
|
||||||
|
do
|
||||||
|
myITEMS+="$i $(echo $i | cut -d "." -f1 | tr [:lower:] [:upper:]) "
|
||||||
|
done
|
||||||
|
myEDITION=$(dialog --backtitle "$myBACKTITLE" --menu "Select T-Pot Edition" 13 50 6 $myITEMS 3>&1 1>&2 2>&3 3>&-)
|
||||||
|
if [ "$myEDITION" == "" ];
|
||||||
|
then
|
||||||
|
echo "Have a nice day!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
dialog --backtitle "$myBACKTITLE" --title "[ Activate now? ]" --yesno "\n$myEDITION" 7 50
|
||||||
|
myOK=$?
|
||||||
|
if [ "$myOK" == "0" ];
|
||||||
|
then
|
||||||
|
echo "OK - Activating"
|
||||||
|
systemctl stop tpot
|
||||||
|
rm -f $myLINK
|
||||||
|
ln -s /opt/tpot/etc/compose/$myEDITION $myLINK
|
||||||
|
systemctl start tpot
|
||||||
|
echo "Done. Use \"dps.sh\" for monitoring"
|
||||||
|
else
|
||||||
|
echo "Have a nice day!"
|
||||||
|
fi
|
|
@ -85,6 +85,6 @@ RUN apk -U --no-cache add \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Set workdir and start glastopf
|
# Set workdir and start glastopf
|
||||||
USER glastopf:glastopf
|
#USER glastopf:glastopf
|
||||||
WORKDIR /tmp/glastopf/
|
WORKDIR /tmp/glastopf/
|
||||||
CMD cp /etc/glastopf/glastopf.cfg /tmp/glastopf && exec glastopf-runner
|
CMD cp /etc/glastopf/glastopf.cfg /tmp/glastopf && exec glastopf-runner
|
||||||
|
|
5
docker/glastopf/dist/requirements.txt
vendored
5
docker/glastopf/dist/requirements.txt
vendored
|
@ -1,7 +1,7 @@
|
||||||
asn1crypto==0.24.0
|
asn1crypto==0.24.0
|
||||||
BeautifulSoup==3.2.1
|
BeautifulSoup==3.2.1
|
||||||
beautifulsoup4==4.6.1
|
beautifulsoup4==4.6.1
|
||||||
botocore==1.11.3
|
botocore==1.11.6
|
||||||
certifi==2018.4.16
|
certifi==2018.4.16
|
||||||
cffi==1.10.0
|
cffi==1.10.0
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
|
@ -11,7 +11,6 @@ Cython==0.28.2
|
||||||
docutils==0.14
|
docutils==0.14
|
||||||
enum34==1.1.6
|
enum34==1.1.6
|
||||||
gevent==1.2.2
|
gevent==1.2.2
|
||||||
Glastopf==3.1.3.dev0
|
|
||||||
greenlet==0.4.13
|
greenlet==0.4.13
|
||||||
hpfeeds==1.0
|
hpfeeds==1.0
|
||||||
idna==2.6
|
idna==2.6
|
||||||
|
@ -19,7 +18,7 @@ ipaddress==1.0.22
|
||||||
Jinja2==2.9.6
|
Jinja2==2.9.6
|
||||||
jmespath==0.9.3
|
jmespath==0.9.3
|
||||||
libtaxii==1.1.111
|
libtaxii==1.1.111
|
||||||
lxml==4.2.2
|
lxml==4.2.4
|
||||||
MarkupSafe==1.0
|
MarkupSafe==1.0
|
||||||
MySQL-python==1.2.5
|
MySQL-python==1.2.5
|
||||||
pyasn1==0.4.2
|
pyasn1==0.4.2
|
||||||
|
|
90
docker/glastopf/testing/Dockerfile.backup
Normal file
90
docker/glastopf/testing/Dockerfile.backup
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
# Include dist
|
||||||
|
ADD dist/ /root/dist/
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
RUN apk -U --no-cache add \
|
||||||
|
autoconf \
|
||||||
|
bind-tools \
|
||||||
|
build-base \
|
||||||
|
cython \
|
||||||
|
git \
|
||||||
|
libffi \
|
||||||
|
libffi-dev \
|
||||||
|
libcap \
|
||||||
|
make \
|
||||||
|
py-asn1 \
|
||||||
|
py-cffi \
|
||||||
|
py-chardet \
|
||||||
|
py-cparser \
|
||||||
|
py-cryptography \
|
||||||
|
py-dateutil \
|
||||||
|
py-enum34 \
|
||||||
|
py-idna \
|
||||||
|
py-ipaddress \
|
||||||
|
py-jinja2 \
|
||||||
|
py-lxml \
|
||||||
|
py-mysqldb \
|
||||||
|
py-openssl \
|
||||||
|
py-pip \
|
||||||
|
py-requests \
|
||||||
|
py-setuptools \
|
||||||
|
python \
|
||||||
|
python-dev && \
|
||||||
|
apk -U add --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
||||||
|
py-beautifulsoup4 \
|
||||||
|
php7 \
|
||||||
|
php7-dev \
|
||||||
|
py-cssselect \
|
||||||
|
py-gevent \
|
||||||
|
py-greenlet \
|
||||||
|
py-mongo \
|
||||||
|
py-sqlalchemy \
|
||||||
|
py-webob && \
|
||||||
|
pip install --no-cache-dir --upgrade pip && \
|
||||||
|
|
||||||
|
# Install php sandbox from git
|
||||||
|
git clone --depth=1 https://github.com/mushorg/BFR /opt/BFR && \
|
||||||
|
cd /opt/BFR && \
|
||||||
|
phpize7 && \
|
||||||
|
./configure \
|
||||||
|
--with-php-config=/usr/bin/php-config7 \
|
||||||
|
--enable-bfr && \
|
||||||
|
make && \
|
||||||
|
make install && \
|
||||||
|
cd / && \
|
||||||
|
rm -rf /opt/BFR /tmp/* /var/tmp/* && \
|
||||||
|
echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php7/php.ini && \
|
||||||
|
|
||||||
|
# Install glastopf from git
|
||||||
|
git clone --depth=1 https://github.com/mushorg/glastopf.git /opt/glastopf && \
|
||||||
|
cd /opt/glastopf && \
|
||||||
|
pip install --no-cache-dir . && \
|
||||||
|
cd / && \
|
||||||
|
rm -rf /opt/glastopf /tmp/* /var/tmp/* && \
|
||||||
|
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \
|
||||||
|
|
||||||
|
# Setup user, groups and configs
|
||||||
|
addgroup -g 2000 glastopf && \
|
||||||
|
adduser -S -H -u 2000 -D -g 2000 glastopf && \
|
||||||
|
mkdir -p /etc/glastopf && \
|
||||||
|
mv /root/dist/glastopf.cfg /etc/glastopf/ && \
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
apk del --purge autoconf \
|
||||||
|
build-base \
|
||||||
|
file \
|
||||||
|
git \
|
||||||
|
libffi-dev \
|
||||||
|
php7-dev \
|
||||||
|
python-dev \
|
||||||
|
py-pip \
|
||||||
|
re2c && \
|
||||||
|
rm -rf /root/* && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
# Set workdir and start glastopf
|
||||||
|
#USER glastopf:glastopf
|
||||||
|
WORKDIR /tmp/glastopf/
|
||||||
|
CMD cp /etc/glastopf/glastopf.cfg /tmp/glastopf && exec glastopf-runner
|
73
docker/glastopf/testing/Dockerfile.new
Normal file
73
docker/glastopf/testing/Dockerfile.new
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
# Include dist
|
||||||
|
ADD dist/ /root/dist/
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
RUN apk -U --no-cache add \
|
||||||
|
autoconf \
|
||||||
|
bind-tools \
|
||||||
|
build-base \
|
||||||
|
cython \
|
||||||
|
git \
|
||||||
|
libcap \
|
||||||
|
libffi \
|
||||||
|
libffi-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
make \
|
||||||
|
py-mysqldb \
|
||||||
|
py-openssl \
|
||||||
|
py-pip \
|
||||||
|
py-setuptools \
|
||||||
|
python \
|
||||||
|
python-dev \
|
||||||
|
php7 \
|
||||||
|
php7-dev \
|
||||||
|
re2c && \
|
||||||
|
pip install --no-cache-dir --upgrade pip && \
|
||||||
|
|
||||||
|
# Install php sandbox from git
|
||||||
|
git clone --depth=1 https://github.com/mushorg/BFR /opt/BFR && \
|
||||||
|
cd /opt/BFR && \
|
||||||
|
phpize7 && \
|
||||||
|
./configure \
|
||||||
|
--with-php-config=/usr/bin/php-config7 \
|
||||||
|
--enable-bfr && \
|
||||||
|
make && \
|
||||||
|
make install && \
|
||||||
|
cd / && \
|
||||||
|
rm -rf /opt/BFR /tmp/* /var/tmp/* && \
|
||||||
|
echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php7/php.ini && \
|
||||||
|
|
||||||
|
# Install glastopf from git
|
||||||
|
git clone --depth=1 https://github.com/mushorg/glastopf.git /opt/glastopf && \
|
||||||
|
cd /opt/glastopf && \
|
||||||
|
cp /root/dist/requirements.txt . && \
|
||||||
|
pip install --no-cache-dir . && \
|
||||||
|
cd / && \
|
||||||
|
rm -rf /opt/glastopf /tmp/* /var/tmp/* && \
|
||||||
|
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \
|
||||||
|
|
||||||
|
# Setup user, groups and configs
|
||||||
|
addgroup -g 2000 glastopf && \
|
||||||
|
adduser -S -H -u 2000 -D -g 2000 glastopf && \
|
||||||
|
mkdir -p /etc/glastopf && \
|
||||||
|
mv /root/dist/glastopf.cfg /etc/glastopf/ && \
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
apk del --purge autoconf \
|
||||||
|
build-base \
|
||||||
|
file \
|
||||||
|
git \
|
||||||
|
libffi-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
php7-dev \
|
||||||
|
python-dev \
|
||||||
|
py-pip && \
|
||||||
|
rm -rf /root/* && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
# Set workdir and start glastopf
|
||||||
|
USER glastopf:glastopf
|
||||||
|
WORKDIR /tmp/glastopf/
|
||||||
|
CMD cp /etc/glastopf/glastopf.cfg /tmp/glastopf && exec glastopf-runner
|
Loading…
Reference in a new issue