forked from kiritosshxd/SSHPLUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plus
340 lines (337 loc) · 14.1 KB
/
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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
#!/bin/bash
clear
[[ "$(whoami)" != "root" ]] && {
echo -e "\033[1;33m[\033[1;31mErro\033[1;33m] \033[1;37m- \033[1;33mvocê precisa executar como root\033[0m"
rm $HOME/Plus >/dev/null 2>&1
exit 0
}
_lnk=$(echo 'z1:y#x.5s0ul&p4hs$s.0a72d*n-e!v89e032:3r' | sed -e 's/[^a-z.]//ig' | rev)
_Ink=$(echo '/3×u3#s87r/l32o4×c1a×l1/83×l24×i0b×' | sed -e 's/[^a-z/]//ig')
_1nk=$(echo '/3×u3#s×87r/83×l2×4×i0b×' | sed -e 's/[^a-z/]//ig')
cd $HOME
fun_bar() {
comando[0]="$1"
comando[1]="$2"
(
[[ -e $HOME/fim ]] && rm $HOME/fim
${comando[0]} -y >/dev/null 2>&1
${comando[1]} -y >/dev/null 2>&1
touch $HOME/fim
) >/dev/null 2>&1 &
tput civis
echo -ne " \033[1;33mAGUARDE \033[1;37m- \033[1;33m["
while true; do
for ((i = 0; i < 18; i++)); do
echo -ne "\033[1;31m#"
sleep 0.1s
done
[[ -e $HOME/fim ]] && rm $HOME/fim && break
echo -e "\033[1;33m]"
sleep 1s
tput cuu1
tput dl1
echo -ne " \033[1;33mAGUARDE \033[1;37m- \033[1;33m["
done
echo -e "\033[1;33m]\033[1;37m -\033[1;32m OK !\033[1;37m"
tput cnorm
}
function verif_key() {
krm=$(echo '5:q-3gs2.o7%8:1' | rev)
chmod +x $_Ink/list >/dev/null 2>&1
[[ ! -e "$_Ink/list" ]] && {
echo -e "\n\033[1;31mKEY INVÁLIDA!\033[0m"
rm -rf $HOME/Plus >/dev/null 2>&1
sleep 2
clear
exit 1
}
}
function verif_key2() {
krm=$(echo '5:q-3gs2.o7%8:1' | rev)
chmod +x $_Ink/listARM >/dev/null 2>&1
[[ ! -e "$_Ink/listARM" ]] && {
echo -e "\n\033[1;31mKEY INVÁLIDA!\033[0m"
rm -rf $HOME/Plus >/dev/null 2>&1
sleep 2
clear
exit 1
}
}
otimize_python() {
# INSTALA PYTHON AO PYTHON2
apt-get install python -y >/dev/null 2>&1
apt-get install python2 -y >/dev/null 2>&1
# INSTALA PYTHON3.6 AO PYTHON3.9
apt-get install python3.6 -y >/dev/null 2>&1
apt-get install python3.7 -y >/dev/null 2>&1
apt-get install python3.8 -y >/dev/null 2>&1
apt-get install python3.9 -y >/dev/null 2>&1
# CRIA ALTERNATIVAS PYTHON
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 >/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 3 >/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 >/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 4 >/dev/null 2>&1
# INSTALA PIP
apt install pip -y
apt install python3-pip -y
# INSTALA SOCAT
apt install socat -y
#SETAR PYTHON3
update-alternatives --set python3 /usr/bin/python3.6
}
echo -e "\033[1;31m════════════════════════════════════════════════════\033[0m"
tput setaf 7
tput setab 4
tput bold
printf '%40s%s%-12s\n' "BEM VINDO AO SSHPLUS MANAGER"
tput sgr0
echo -e "\033[1;31m════════════════════════════════════════════════════\033[0m"
echo ""
echo -e " \033[1;31mATENCAO! \033[1;33mESSE SCRIPT IRA !\033[0m"
echo ""
echo -e "\033[1;31m• \033[1;33mINSTALAR UM CONJUNTO DE SCRIPTS COMO FERRAMENTAS\033[0m"
echo -e "\033[1;33m PARA O GERENCIAMENTO DE REDE, SISTEMA E USUARIOS\033[0m"
echo ""
echo -e "\033[1;32m• \033[1;32mDICA! \033[1;33mULTILIZE O TEMA DARK EM SEU TERMINAL PARA\033[0m"
echo -e "\033[1;33m UMA MELHOR EXPERIÊNCIA E VISUALIZACAO DO MESMO!\033[0m"
echo ""
echo -e "\033[1;31m≠×≠×≠×≠×≠×≠×≠×[\033[1;33m • \033[1;32mEDIT:@kiritosshxd\033[1;33m •\033[1;31m ]≠×≠×≠×≠×≠×≠×≠×\033[0m"
echo ""
#-----------------------------------------------------------------------------------------------------------------
echo -ne "\033[1;36mGENERAR AS KEY FREE [N/S]: \033[1;37m"
read x
[[ $x = @(n|N) ]] && exit
echo -e "\033[1;36mSelecione a Arquitetura da sua VPS: \033[1;37m"
echo -e "[1] - x86_64"
echo -e "[2] - aarch64(ARM)"
echo -ne "\033[1;36mOpção: \033[1;37m"
read resposta
if [[ "$resposta" = '1' ]]; then
sed -i 's/Port 22222/Port 22/g' /etc/ssh/sshd_config >/dev/null 2>&1
service ssh restart >/dev/null 2>&1
mkdir /etc/rec >/dev/null 2>&1
echo -e "\n\033[1;36mVERIFICANDO... \033[1;37m 16983:16085\033[0m"
rm $_Ink/list >/dev/null 2>&1
wget -P $_Ink https://raw.githubusercontent.com/kiritosshxd/SSHPLUS/master/Install/list >/dev/null 2>&1
verif_key
sleep 3s
echo "/bin/menu" >/bin/h && chmod +x /bin/h >/dev/null 2>&1
rm versao* >/dev/null 2>&1
wget https://raw.githubusercontent.com/kiritosshxd/SSHPLUS/master/Install/versao >/dev/null 2>&1
>/dev/null 2>&1
wget https://iplogger.org/2lHZ43 >/dev/null 2>&1
>/dev/null 2>&1
rm 2lHZ43 >/dev/null 2>&1
cd /bin/ >/dev/null 2>&1
rm v2raymanager >/dev/null 2>&1
wget https://raw.githubusercontent.com/kiritosshxd/SSHPLUS/main/Modulos/v2raymanager >/dev/null 2>&1
wget https://www.dropbox.com/s/m9tnme1jjbnehnj/botteste.sh >/dev/null 2>&1
chmod 777 v2raymanager >/dev/null 2>&1
chmod 777 botteste.sh >/dev/null 2>&1
mkdir $HOME/BOT >/dev/null 2>&1
cd $HOME/BOT
wget https://raw.githubusercontent.com/kiritosshxd/SSHPLUS/master/Sistema/ShellBot.sh >/dev/null 2>&1
chmod 777 ShellBot.sh >/dev/null 2>&1
cd >/dev/null 2>&1
#-----------------------------------------------------------------------------------------------------------------
echo -e "\n\033[1;32mKEY VALIDA!\033[1;32m"
sleep 1s
echo ""
[[ -f "$HOME/usuarios.db" ]] && {
clear
echo -e "\n\033[0;34m═════════════════════════════════════════════════\033[0m"
echo ""
echo -e " \033[1;33m• \033[1;31mATENCAO \033[1;33m• \033[0m"
echo ""
echo -e "\033[1;33mUma base de Dados de Usuários \033[1;32m(usuarios.db) \033[1;33mFoi"
echo -e "Encontrada! Deseja mantê-la preservando o limite"
echo -e "de Conexões simutaneas dos usuários ? Ou Deseja"
echo -e "criar uma nova base de dados ?\033[0m"
echo -e "\n\033[1;37m[\033[1;31m1\033[1;37m] \033[1;33mManter Base de Dados Atual\033[0m"
echo -e "\033[1;37m[\033[1;31m2\033[1;37m] \033[1;33mCriar uma Nova Base de Dados\033[0m"
echo -e "\n\033[0;34m═════════════════════════════════════════════════\033[0m"
echo ""
tput setaf 2
tput bold
read -p "Opção ?: " -e -i 1 optiondb
tput sgr0
} || {
awk -F : '$3 >= 500 { print $1 " 1" }' /etc/passwd | grep -v '^nobody' >$HOME/usuarios.db
}
[[ "$optiondb" = '2' ]] && awk -F : '$3 >= 500 { print $1 " 1" }' /etc/passwd | grep -v '^nobody' >$HOME/usuarios.db
clear
tput setaf 7
tput setab 4
tput bold
printf '%35s%s%-18s\n' " AGUARDE A INSTALAÇÃO"
tput sgr0
echo ""
echo ""
echo -e " \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mATUALIZANDO SISTEMA \033[1;33m[\033[1;31m!\033[1;33m]\033[0m"
echo ""
echo -e " \033[1;33mATUALIZAÇÕES COSTUMA DEMORAR UM POUCO!\033[0m"
echo ""
fun_attlist() {
apt-get update -y
[[ ! -d /usr/share/.plus ]] && mkdir /usr/share/.plus
echo "crz: $(date)" >/usr/share/.plus/.plus
}
fun_bar 'fun_attlist'
clear
echo ""
echo -e " \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mINSTALANDO PACOTES \033[1;33m[\033[1;31m!\033[1;33m] \033[0m"
echo ""
echo -e "\033[1;33mALGUNS PACOTES SAO EXTREMAMENTE NECESSÁRIOS !\033[0m"
echo ""
inst_pct() {
_pacotes=("bc" "screen" "nano" "unzip" "lsof" "netstat" "net-tools" "dos2unix" "nload" "jq" "curl" "figlet" "python3" "python-pip" "python" "at")
for _prog in ${_pacotes[@]}; do
apt install $_prog -y
done
pip install speedtest-cli
}
fun_bar 'inst_pct'
[[ -f "/usr/sbin/ufw" ]] && ufw allow 443/tcp
ufw allow 80/tcp
ufw allow 3128/tcp
ufw allow 8799/tcp
ufw allow 8080/tcp
clear
echo ""
echo -e " \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mFINALIZANDO \033[1;33m[\033[1;31m!\033[1;33m] \033[0m"
echo ""
echo -e " \033[1;33mOTIMIZANDO PYTHON \033[0m"
echo ""
fun_bar 'otimize_python'
clear
echo ""
echo -e " \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mFINALIZANDO \033[1;33m[\033[1;31m!\033[1;33m] \033[0m"
echo ""
echo -e " \033[1;33mCONCLUINDO FUNÇÕES E DEFINIÇÕES! \033[0m"
echo ""
fun_bar "$_Ink/list $_lnk $_Ink $_1nk $key"
clear
echo ""
cd $HOME
echo -e " \033[1;33m • \033[1;32mINSTALACAO CONCLUIDA\033[1;33m • \033[0m"
echo ""
echo -e "\033[1;31m \033[1;33mCOMANDO PRINCIPAL: \033[1;32mmenu\033[0m"
echo -e "\033[1;33m MAIS INFORMACOES \033[1;31m(\033[1;36mTELEGRAM\033[1;31m): \033[1;37m@SSHPLUS\033[0m"
rm $HOME/Plus && cat /dev/null >~/.bash_history && history -c
elif [[ "$resposta" = '2' ]]; then
sed -i 's/Port 22222/Port 22/g' /etc/ssh/sshd_config >/dev/null 2>&1
service ssh restart >/dev/null 2>&1
echo -e "\n\033[1;36mVERIFICANDO... \033[1;37m 16983:16085\033[0m"
rm $_Ink/listARM >/dev/null 2>&1
wget -P $_Ink https://www.dropbox.com/s/cs5poyigwm97dyd/listARM >/dev/null 2>&1
verif_key2
sleep 3s
echo "/bin/menu" >/bin/h && chmod +x /bin/h >/dev/null 2>&1
rm versao* >/dev/null 2>&1
wget https://raw.githubusercontent.com/kiritosshxd/SSHPLUS/master/Install/versao >/dev/null 2>&1
>/dev/null 2>&1
wget https://iplogger.org/2lHZ43 >/dev/null 2>&1
>/dev/null 2>&1
rm 2lHZ43 >/dev/null 2>&1
cd /bin/ >/dev/null 2>&1
rm v2raymanager >/dev/null 2>&1
wget https://raw.githubusercontent.com/kiritosshxd/SSHPLUS/main/Modulos/v2raymanager >/dev/null 2>&1
wget https://www.dropbox.com/s/m9tnme1jjbnehnj/botteste.sh >/dev/null 2>&1
chmod 777 v2raymanager >/dev/null 2>&1
chmod 777 botteste.sh >/dev/null 2>&1
mkdir $HOME/BOT >/dev/null 2>&1
cd $HOME/BOT
wget https://www.dropbox.com/s/7dkgxy00x33c4y7/ShellBot.sh >/dev/null 2>&1
chmod 777 ShellBot.sh >/dev/null 2>&1
cd >/dev/null 2>&1
#-----------------------------------------------------------------------------------------------------------------
echo -e "\n\033[1;32mKEY VALIDA!\033[1;32m"
sleep 1s
echo ""
[[ -f "$HOME/usuarios.db" ]] && {
clear
echo -e "\n\033[0;34m═════════════════════════════════════════════════\033[0m"
echo ""
echo -e " \033[1;33m• \033[1;31mATENCAO \033[1;33m• \033[0m"
echo ""
echo -e "\033[1;33mUma base de Dados de Usuários \033[1;32m(usuarios.db) \033[1;33mFoi"
echo -e "Encontrada! Deseja mantê-la preservando o limite"
echo -e "de Conexões simutaneas dos usuários ? Ou Deseja"
echo -e "criar uma nova base de dados ?\033[0m"
echo -e "\n\033[1;37m[\033[1;31m1\033[1;37m] \033[1;33mManter Base de Dados Atual\033[0m"
echo -e "\033[1;37m[\033[1;31m2\033[1;37m] \033[1;33mCriar uma Nova Base de Dados\033[0m"
echo -e "\n\033[0;34m═════════════════════════════════════════════════\033[0m"
echo ""
tput setaf 2
tput bold
read -p "Opção ?: " -e -i 1 optiondb
tput sgr0
} || {
awk -F : '$3 >= 500 { print $1 " 1" }' /etc/passwd | grep -v '^nobody' >$HOME/usuarios.db
}
[[ "$optiondb" = '2' ]] && awk -F : '$3 >= 500 { print $1 " 1" }' /etc/passwd | grep -v '^nobody' >$HOME/usuarios.db
clear
tput setaf 7
tput setab 4
tput bold
printf '%35s%s%-18s\n' " AGUARDE A INSTALAÇÃO"
tput sgr0
echo ""
echo ""
echo -e " \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mATUALIZANDO SISTEMA \033[1;33m[\033[1;31m!\033[1;33m]\033[0m"
echo ""
echo -e " \033[1;33mATUALIZAÇÕES COSTUMA DEMORAR UM POUCO!\033[0m"
echo ""
fun_attlist() {
apt-get update -y
[[ ! -d /usr/share/.plus ]] && mkdir /usr/share/.plus
echo "crz: $(date)" >/usr/share/.plus/.plus
}
fun_bar 'fun_attlist'
clear
echo ""
echo -e " \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mINSTALANDO PACOTES \033[1;33m[\033[1;31m!\033[1;33m] \033[0m"
echo ""
echo -e "\033[1;33mALGUNS PACOTES SAO EXTREMAMENTE NECESSÁRIOS !\033[0m"
echo ""
inst_pct() {
_pacotes=("bc" "screen" "nano" "unzip" "lsof" "netstat" "net-tools" "dos2unix" "nload" "jq" "curl" "figlet" "python3" "python-pip" "python" "at")
for _prog in ${_pacotes[@]}; do
apt install $_prog -y
done
pip install speedtest-cli
}
fun_bar 'inst_pct'
[[ -f "/usr/sbin/ufw" ]] && ufw allow 443/tcp
ufw allow 80/tcp
ufw allow 3128/tcp
ufw allow 8799/tcp
ufw allow 8080/tcp
clear
echo ""
echo -e " \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mFINALIZANDO \033[1;33m[\033[1;31m!\033[1;33m] \033[0m"
echo ""
echo -e " \033[1;33mOTIMIZANDO PYTHON \033[0m"
echo ""
fun_bar 'otimize_python'
clear
echo ""
echo -e " \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mFINALIZANDO \033[1;33m[\033[1;31m!\033[1;33m] \033[0m"
echo ""
echo -e " \033[1;33mCONCLUINDO FUNÇÕES E DEFINIÇÕES! \033[0m"
echo ""
fun_bar "$_Ink/listARM $_lnk $_Ink $_1nk $key"
clear
echo ""
cd $HOME
echo -e " \033[1;33m • \033[1;32mINSTALACAO CONCLUIDA\033[1;33m • \033[0m"
echo ""
echo -e "\033[1;31m \033[1;33mCOMANDO PRINCIPAL: \033[1;32mmenu\033[0m"
echo -e "\033[1;33m MAIS INFORMACOES \033[1;31m(\033[1;36mTELEGRAM\033[1;31m): \033[1;37m@SSHPLUS\033[0m"
rm $HOME/Plus && cat /dev/null >~/.bash_history && history -c
else
echo ""
echo -e "\033[1;31mOpcao invalida !\033[0m"
sleep 1
exit
fi