-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5min.sh
executable file
·63 lines (59 loc) · 1.61 KB
/
5min.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Install packages
if [ `which apt` ]; then
apt-get update
apt-get install --reinstall passwd -y
apt-get install --reinstall coreutils -y
apt-get install sshpass -y
apt-get install golang-go -y
apt-get install nmap -y
apt-get install python3 -y
elif [ `which yum` ]; then
yum update
yum install epel-release -y
yum reinstall passwd -y
yum reinstall coreutils -y
yum install sshpass -y
yum install golang -y
yum install nmap -y
yum install python3 -y
elif [ `which pacman` ]; then
pacman -Syu --noconfirm
pacman -Scc passwd --noconfirm
pacman -Scc coreutils --noconfirm
pacman -S sshpass --noconfirm
pacman -S go --noconfirm
pacman -S nmap --noconfirm
pacman -S python3 --noconfirm
elif [ `which dnf` ]; then
dnf update -y
dnf reinstall passwd -y
dnf reinstall coreutils -y
dnf install sshpass -y
dnf install golang -y
dnf install nmap -y
dnf install python3 -y
else
echo "No valid package installers found"
exit
fi
echo "---Displaying /etc/hosts---"
echo
cat /etc/hosts
TEST="nil"
read -p "Press any key to continue..." $TEST
cd scripts
if [ `which python3` ]; then
python3 ssh-keynuke.py
echo "---Creating new user---"
./create_user.sh
echo "Displaying /etc/passwd..."
cat /etc/passwd
python3 disable-users.py
# chmod +x ipchairs.py
# cp ipchairs.py /usr/sbin/ipchairs
# python3 create-service.py --name=ipchairs --desc=iptables_service --path=/usr/sbin/ipchairs --command="-l -q $@"
# python3 ipchairs.py $@
else
echo "Error: python3 is not installed."
fi
./recurring_plan.sh