clean up, update readme

This commit is contained in:
t3chn0m4g3 2016-03-09 14:05:06 +01:00
parent 6f18240ade
commit f9e67c897c
8 changed files with 29 additions and 35 deletions

View file

@ -18,7 +18,7 @@ The image can then be used to install T-Pot on a physical or virtual machine.
cd tpotce
2. Invoke the script that builds the ISO image.
The script will download and install dependecies necessary to build the image on the invoking machine. It will further download the ubuntu base image (~600MB) which T-Pot is based on.
The script will download and install dependencies necessary to build the image on the invoking machine. It will further download the ubuntu base image (~600MB) which T-Pot is based on.
sudo ./makeiso.sh

View file

@ -4,11 +4,11 @@
# T-Pot #
# Export docker images maker #
# #
# v0.02 by mo, DTAG, 2016-02-22 #
# v16.03.1 by mo, DTAG, 2016-03-09 #
########################################################
# This feature is experimental and requires at least docker 1.7!
# Using any docker version < 1.7 may result in a unusable installation
# Using any docker version < 1.7 may result in a unusable T-Pot installation
# This script will download the docker images and export them to the folder "images".
# When building the .iso image the preloaded docker images will be exported to the .iso which

View file

@ -4,7 +4,7 @@
# T-Pot #
# ELK DB backup script #
# #
# v0.01 by mo, DTAG, 2016-02-12 #
# v16.03.1 by mo, DTAG, 2016-03-09 #
########################################################
myCOUNT=1
myDATE=$(date +%Y%m%d%H%M)
@ -49,7 +49,6 @@ rm -rf "$myELKPATH"data/elasticsearch/nodes/0/indices/logstash*
tar cvfz $myBACKUPPATH"$myDATE"_elkbase.tgz $myELKPATH
rm -rf $myELKPATH
tar xvfz $myBACKUPPATH"$myDATE"_elkall.tgz -C /
#tar xvfz $myBACKUPPATH"$myDATE"_elkbase.tgz -C /
chmod 760 -R $myELKPATH
chown tpot:tpot -R $myELKPATH
@ -59,4 +58,3 @@ echo "Now starting up ELK ..."
# Allow checks to resume
rm /var/run/check.lock

View file

@ -4,7 +4,7 @@
# T-Pot #
# Check container and services script #
# #
# v0.03 by mo, DTAG, 2016-02-12 #
# v16.03.1 by mo, DTAG, 2016-03-09 #
########################################################
if [ -a /var/run/check.lock ];
then

View file

@ -4,7 +4,7 @@
# T-Pot #
# Container and services restart script #
# #
# v0.04 by mo, DTAG, 2016-02-12 #
# v16.03.1 by mo, DTAG, 2016-03-09 #
########################################################
myCOUNT=1
@ -40,7 +40,7 @@ if [ $myUPTIME -gt 4 ];
do
service $i stop
done
echo "Waiting 10 seconds before restarting docker ..."
echo "### Waiting 10 seconds before restarting docker ..."
sleep 10
iptables -w -F
service docker restart
@ -56,25 +56,21 @@ if [ $myUPTIME -gt 4 ];
fi
sleep 0.1
done
echo "Docker is now up and running again."
echo "Removing obsolete container data ..."
echo "### Docker is now up and running again."
echo "### Removing obsolete container data ..."
docker rm -v $(docker ps -aq)
echo "Removing obsolete image data ..."
echo "### Removing obsolete image data ..."
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
echo "Starting T-Pot services ..."
echo "### Starting T-Pot services ..."
for i in $myIMAGES
do
service $i start
done
sleep 5
else
echo "T-Pot needs to be up and running for at least 5 minutes."
echo "### T-Pot needs to be up and running for at least 5 minutes."
fi
rm /var/run/check.lock
/etc/rc.local
echo "Done. Now running status.sh"
/usr/bin/status.sh

View file

@ -4,7 +4,7 @@
# T-Pot #
# Container and services status script #
# #
# v0.05 by mo, DTAG, 2016-02-12 #
# v16.03.1 by mo, DTAG, 2016-03-09 #
########################################################
myCOUNT=1

View file

@ -4,7 +4,7 @@
# T-Pot #
# Only start the containers found in /etc/init/ #
# #
# v0.03 by mo, DTAG, 2016-02-12 #
# v16.03.1 by mo, DTAG, 2016-03-09 #
########################################################
# Make sure not to interrupt a check
@ -49,8 +49,8 @@ done
rm /var/run/check.lock
# Announce reboot
echo "Rebooting in 5 seconds for the changes to take effect."
sleep 5
echo "### Rebooting in 60 seconds for the changes to take effect."
sleep 60
# Reboot
reboot

View file

@ -4,7 +4,7 @@
# T-Pot #
# Two-Factor-Authentication and SSH enable script #
# #
# v16.03.1 by mo, DTAG, 2016-03-07 #
# v16.03.2 by mo, DTAG, 2016-03-09 #
########################################################
myBACKTITLE="T-Pot - Two-Factor-Authentication and SSH enable script"
@ -18,7 +18,7 @@ dialog --backtitle "$myBACKTITLE" --title "[ Enable SSH? ]" --yesno "\nDo you wa
mySSH=$?
# Enable 2FA
if [ $my2FA == 0 ] && ! [ -f /etc/pam.d/sshd.bak ];
if [ "$my2FA" = "0" ] && ! [ -f /etc/pam.d/sshd.bak ];
then
clear
sudo sed -i.bak '\# PAM#aauth required pam_google_authenticator.so' /etc/pam.d/sshd
@ -32,7 +32,7 @@ if [ $my2FA == 0 ] && ! [ -f /etc/pam.d/sshd.bak ];
fi
# Enable SSH
if [ $mySSH == 0 ] && [ -f /etc/init/ssh.override ];
if [ "$mySSH" = "0" ] && [ -f /etc/init/ssh.override ];
then
clear
sudo rm /etc/init/ssh.override