forked from CosmodiumCS/MK15-SkeletonKey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·174 lines (153 loc) · 4.44 KB
/
install.sh
File metadata and controls
executable file
·174 lines (153 loc) · 4.44 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#!/bin/bash
# installer for SkeletonKey
# created by : Soulsender and C0SM0
# DO NOT FUCK WITH THIS SCRIPT
# color variables
red="\e[0;91m"
green="\e[0;92m"
blue="\e[0;94m"
bold="\e[1m"
reset="\e[0m"
function staging {
# continue prompt
while true
do
read -r -p "This will copy SkeletonKey to your home directory. If you already had SkeletonKey installed, this will reinstall it. Would you like to continue? [Y/n]" input
case $input in
[yY][eE][sS]|[yY])
echo -e "${green}Continuing...${reset}"
sleep 2
install=true
break
;;
[nN][oO]|[nN])
echo -e "${red}Operation canceled.${reset}"
break
exit 0
;;
*)
echo -e "${red}Invalid input...${reset}"
;;
esac
done
# staging
echo -e "${blue}[*] Staging process...${reset}"
rm -rf ~/.SkeletonKey
cd ..
cp -r SkeletonKey ~/.SkeletonKey
echo -e "${green}[+] Complete${reset}"
}
function alias_workflow {
# set up alias workflow
echo -e "${blue}[*] Setting up alias...${reset}"
# check if it already exists in bashrc
if ! cat ~/.bashrc | grep "SkeletonKey_PATH" > /dev/null; then
# Do it in one command instead of repeating yourself.
echo "
export SkeletonKey_PATH=\"~/.SkeletonKey\"
alias key=\"python3 ~/.SkeletonKey/main.py\"
" >> ~/.bashrc
fi
#check if it already exists in zshrc
if ! cat ~/.zshrc | grep "SkeletonKey_PATH" > /dev/null; then
# Do it in one command instead of repeating yourself.
echo "
export SkeletonKey_PATH=\"~/.SkeletonKey\"
alias key=\"python3 ~/.SkeletonKey/main.py\"
" >> ~/.zshrc
fi
echo -e "${green}[+] Completed${reset}"
# call staging
staging
# clean up
echo -e "${green}[+] Installation Successful"
echo -e "[+] Please Restart your terminal"
echo -e "[+] type 'key' launch SkeletonKey${reset}"
bash
}
# check if run with sudo
if [ "$EUID" -ne 0 ]; then
continue
else
echo -e "${red}Do not run as root. The script will prompt you for root access.${reset}"
exit 0
fi
# arguments
while [ -n "$1" ]
do
case "$1" in
--help)
echo "
SUPPORTED DISTROS:
- Debian
- Parrot
- Ubuntu
- Kali
- Mint
- Arch
- Void
Please see the SkeletonKey README for more infomation:
https://github.com/CosmodiumCS/SkeletonKey
"
exit 0
;;
--unsupported-distro)
# call alias workflow function
alias_workflow
exit 0
;;
esac
shift
done
# check for valid distro (Parrot, Ubuntu, Void, Debian, Arch)
distro=`sudo cat /etc/issue | awk '{print $1;}'`
if [[ "$distro" == "Debian" ]] || [[ "$distro" == "Parrot" ]] || [[ "$distro" == "Ubuntu" ]] || [[ "$distro" == "Linux" ]] || [[ "$distro" == "Kali" ]]; then
# installing tools for debian
echo -e "${red}Debian${reset} system detected."
echo -e "${blue}[*] Installing tools...${reset}"
sudo apt update
sudo apt-get install -y python3 python3-pip python-dev
pip install qrcode
pip install Cryptography
pip install googletrans==3.1.0a0
pip install colorama
pip install pillow
pip install numpy
pip install twofish
pip install blowfish
echo -e "${green}[+] Completed${reset}"
elif [[ "$distro" == "Void" ]]; then
# installing tools for void
echo -e "${green}Void${reset} system detected."
echo -e "${blue}[*] Installing tools...${reset}"
sudo xbps-install -S python3
pip install qrcode
pip install Cryptography
pip install googletrans==3.1.0a0
pip install colorama
pip install pillow
pip install numpy
pip install twofish
pip install blowfish
echo -e "${green}[+] Completed${reset}"
elif [[ "$distro" = "Arch" ]]; then
# installing tools for arch
echo -e "${blue}Arch${reset} system detected."
echo -e "${blue}[*] Installing tools...${reset}"
sudo pacman -Syu
sudo pacman -S python python-pip
python3 -m pip install qrcode
python3 -m pip install Cryptography
python3 -m pip install googletrans==3.1.0a0
python3 -m pip install colorama
python3 -m pip install pillow
python3 -m pip install numpy
python3 -m pip install twofish
python3 -m pip install blowfish
echo -e "${green}[+] Completed${reset}"
else
echo -e "${red}[!] Unknown distro, please see documentation for unknown distros.${reset}"
exit 0
fi
# call alias workflow
alias_workflow