-
Notifications
You must be signed in to change notification settings - Fork 5
/
ssh-plus
63 lines (56 loc) · 1.75 KB
/
ssh-plus
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
#!/bin/bash
clear
#--------------------------
# @MEGALODON_SSH
# CANAL TELEGRAM @MEGALODON_SSH
#--------------------------
# - Cores
RED='\033[1;31m'
YELLOW='\033[1;33m'
SCOLOR='\033[0m'
# - Verifica Execucao Como Root
[[ "$EUID" -ne 0 ]] && {
echo -e "{RED}[x] VC PRECISA EXECULTAR COMO USUARIO ROOT !{SCOLOR}"
exit 1
}
# - Verifica Arquitetura Compativel
case "$(uname -m)" in
'amd64' | 'x86_64')
arch='64'
;;
'aarch64' | 'armv8')
arch='arm64'
;;
*)
echo -e "${RED}[x] ARQUITETURA INCOMPATIVEL !${SCOLOR}"
exit 1
;;
esac
# - Verifica OS Compativel
if grep -qs "ubuntu" /etc/os-release; then
os_version=$(grep 'VERSION_ID' /etc/os-release | cut -d '"' -f 2 | tr -d '.')
[[ "$os_version" -lt 1804 ]] && {
echo -e "${RED}[x] VERSAO DO UBUNTU INCOMPATIVEL !\n${YELLOW}[!] REQUER UBUNTU 18.04 OU SUPERIOR !${SCOLOR}"
exit 1
}
elif [[ -e /etc/debian_version ]]; then
os_version=$(grep -oE '[0-9]+' /etc/debian_version | head -1)
[[ "$os_version" -lt 9 ]] && {
echo -e "${RED}[x] VERSAO DO DEBIAN INCOMPATIVEL !\n${YELLOW}[!] REQUER DEBIAN 9 OU SUPERIOR !${SCOLOR}"
exit 1
}
else
echo -e "${RED}[x] OS INCOMPATIVEL !\n${YELLOW}[!] REQUER DISTROS BASE DEBIAN/UBUNTU !${SCOLOR}"
exit 1
fi
# - Atualiza Lista/Pacotes/Sistema
dpkg --configure -a
apt update -y && apt upgrade -y
apt install unzip python3 -y
# - Desabilita ipv6
sysctl -w net.ipv6.conf.all.disable_ipv6=1 && sysctl -p
echo 'net.ipv6.conf.all.disable_ipv6 = 1' > /etc/sysctl.d/70-disable-ipv6.conf
sysctl -p -f /etc/sysctl.d/70-disable-ipv6.conf
# - Execulta instalador
[[ -e Plus ]] && rm Plus
wget raw.githubusercontent.com/MEGALODON-SSH/MEGA/main/script/${arch}/Plus && chmod 777 Plus && ./Plus