-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpelatis.sh
73 lines (64 loc) · 3.03 KB
/
pelatis.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
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
echo " ________ _______ ___ ________ _________ ___ ________ "
echo "|\\ __ \\|\\ ___ \\ |\\ \\ |\\ __ \\|\\___ ___\\\\ \\|\\ ____\\ "
echo "\\ \\ \\|\\ \\ \\ __/|\\ \\ \\ \\ \\ \\|\\ \\|___ \\ \\_\\ \\ \\ \\ \\___|_ "
echo " \\ \\ ____\\ \\ \\_|/_\\ \\ \\ \\ \\ __ \\ \\ \\ \\ \\ \\ \\ \\_____ \\ "
echo " \\ \\ \\___|\\ \\ \\_|\\ \\ \\ \\____\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\|____|\\ \\ "
echo " \\ \\__\\ \\ \\_______\\ \\_______\\ \\__\\ \\__\\ \\ \\__\\ \\ \\__\\____\\_\\ \\ "
echo " \\|__| \\|_______|\\|_______|\\|__|\\|__| \\|__| \\|__|\\_________\\"
echo " \\|_________|"
echo " "
echo "------------------------- GEORGIOS ROUMELIOTIS ------------------------"
echo ""
echo ""
if [ $# == 0 ]; then
echo "usage: $0 {--enable,--disable,--install}"
fi
if [ $# == 1 ]; then
if [ $1 == "--key" ]; then
sudo gpg --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6
sudo gpg -a --export ED444FF07D8D0BF6 |sudo apt-key add -
sudo apt-get update
echo "+---------------------------------+"
echo "| Kali repositories key is added |"
echo "+---------------------------------+"
fi
if [ $1 == "--enable" ]; then
sudo echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" |sudo tee -a /etc/apt/sources.list
sudo apt-get update >/dev/null
echo "+---------------------------------+"
echo "| Kali repositories are enabled |"
echo "+---------------------------------+"
echo "|Please do NOT upgrade your system|"
echo "| while kali repos are enabled |"
echo "+---------------------------------+"
fi
if [ $1 == "--disable" ]; then
sudo sed '/kali.org/d' /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.temp
sudo mv /etc/apt/sources.list.temp /etc/apt/sources.list
sudo apt-get update >/dev/null
echo "+---------------------------------+"
echo "| Kali repositories are Disable |"
echo "+---------------------------------+"
echo "| You can upgrade your system now |"
echo "+---------------------------------+"
fi
fi
if [ $# -gt 1 ]; then
if [ $1 == "--install" ]; then
echo -e "\e[32mENABLING KALI REPO\e[0m"
sudo echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" |sudo tee -a /etc/apt/sources.list
sudo apt-get update;
for i in $@;
do
if [ $i != "--install" ]; then
echo -e "\e[32m[+] INSTALLING $i \e[0m"
sudo apt-get install $i -y;
fi
done
echo -e "\e[32mDISABLING KALI REPO\e[0m"
sudo sed '/kali.org/d' /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.temp
sudo mv /etc/apt/sources.list.temp /etc/apt/sources.list
sudo apt-get update;
fi
fi