Subir archivos a "/"

This commit is contained in:
darnix 2025-11-22 12:58:21 +00:00
parent b2f2e537a5
commit e05cf0963b

468
LATAM
View File

@ -1,27 +1,35 @@
#!/bin/bash #!/bin/bash
# INSTALADO --- ACTULIZADO EL 12-01-2023 --By @Kalix1 ##-->> INSTALADOR --- ACTUALIZADO EL 16-03-2023 -- >> By @Kalix1 << ---
rm -f $HOME/setup*
rm -f $HOME/install*
clear && clear clear && clear
colores="$(pwd)/colores" colores="$(pwd)/colores"
rm -rf ${colores} rm -rf ${colores}
wget -O ${colores} "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/colores" &>/dev/null wget -O ${colores} "https://raw.githubusercontent.com/darnix1/license/refs/heads/main/colores" &>/dev/null
[[ ! -e ${colores} ]] && exit [[ ! -e ${colores} ]] && exit
chmod +x ${colores} &>/dev/null chmod +x ${colores} &>/dev/null
source ${colores} ##-->> CARGAR SC EXTERNO
source $(pwd)/colores
CTRL_C() { CTRL_C() {
rm -rf ${colores} rm -rf ${colores}
rm -rf /root/LATAM rm -rf $(pwd)/LATAM
exit exit
} }
##-->> DETECTAR CANCELAR Y ELIMINAR ARCHIVO
trap "CTRL_C" INT TERM EXIT trap "CTRL_C" INT TERM EXIT
#rm $(pwd)/$0 &>/dev/null rm $(pwd)/$0 &>/dev/null
#-- VERIFICAR ROOT #-->> DETECTAR ROOT
if [ $(whoami) != 'root' ]; then if [ $(whoami) != 'root' ]; then
echo "" echo ""
echo -e "\033[1;31m NECESITAS SER USER ROOT PARA EJECUTAR EL SCRIPT \n\n\033[97m DIGITE: \033[1;32m sudo su\n" echo -e "\033[1;31m NECESITAS SER USER ROOT PARA EJECUTAR EL SCRIPT \n\n\033[97m DIGITE: \033[1;32m sudo su\n"
exit exit
fi fi
if fuser /var/lib/dpkg/lock >/dev/null 2>&1; then
echo -e "\033[1;31mEl sistema de actualización está siendo utilizado por otro proceso. Deteniendo el proceso..."
pid=$(fuser /var/lib/dpkg/lock 2>/dev/null)
if [ ! -z "$pid" ]; then
echo -e "\033[1;31mDeteniendo el proceso $pid..."
kill -9 $pid >/dev/null 2>&1
fi
fi
os_system() { os_system() {
system=$(cat -n /etc/issue | grep 1 | cut -d ' ' -f6,7,8 | sed 's/1//' | sed 's/ //') system=$(cat -n /etc/issue | grep 1 | cut -d ' ' -f6,7,8 | sed 's/1//' | sed 's/ //')
distro=$(echo "$system" | awk '{print $1}') distro=$(echo "$system" | awk '{print $1}')
@ -37,7 +45,7 @@ repo() {
8 | 9 | 10 | 11 | 16.04 | 18.04 | 20.04 | 20.10 | 21.04 | 21.10 | 22.04) wget -O /etc/apt/sources.list ${link} &>/dev/null ;; 8 | 9 | 10 | 11 | 16.04 | 18.04 | 20.04 | 20.10 | 21.04 | 21.10 | 22.04) wget -O /etc/apt/sources.list ${link} &>/dev/null ;;
esac esac
} }
## PRIMER PASO DE INSTALACION ##-->> PREPARAR PAQUETERIAS Y DIRECTORIOS
install_inicial() { install_inicial() {
clear && clear clear && clear
#CARPETAS PRINCIPALES #CARPETAS PRINCIPALES
@ -66,6 +74,7 @@ install_inicial() {
return $stat return $stat
} }
if val_ip $IP; then if val_ip $IP; then
mkdir -p /root/.ssh
echo "$IP" >/root/.ssh/authrized_key.reg echo "$IP" >/root/.ssh/authrized_key.reg
else else
echo "" echo ""
@ -92,11 +101,37 @@ install_inicial() {
echo -e "\033[1;97m TU CONTRASEÑA ROOT AHORA ES: \e[41m $pass \033[0;37m" echo -e "\033[1;97m TU CONTRASEÑA ROOT AHORA ES: \e[41m $pass \033[0;37m"
} }
##-->>AGREGAR NOTIFICADOR ROOT
avi_login() {
for i in {1..4}; do tput cuu 1 && tput el; done
wget -O /etc/profile.d/notify-lroot.sh https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/notify-lroot.sh >/dev/null 2>&1
chmod +x /etc/profile.d/notify-lroot.sh
msgi -bar
echo -e "\033[1;97m NOTIFICADOR VIA PUSH DE LOGINS ROOT"
msgi -bar
echo -e "\033[1;97mEsta es una herramianta que te Notificara mediante\nuna apk cuando alguien ingrese ssh root en la VPS"
echo -e "\033[1;97m Descarge la Aplicasion directo de Play Store"
echo -e "\033[1;96m https://play.google.com/store/apps/details?id=net.xdroid.pn"
msgi -bar
echo -ne "\033[1;97m DIGITE SU KEY: \033[1;32m" && read keyapk
echo "$keyapk" >/etc/SCRIPT-LATAM/temp/keyapk
echo -ne "\033[1;97m INGRESE ALGUN NOMBRE PARA SU VPS: \033[1;32m" && read nomvpsapk
echo "$nomvpsapk" >/etc/SCRIPT-LATAM/temp/nomvpsapk
KEY=$(cat /etc/SCRIPT-LATAM/temp/keyapk)
IP=$(cat /root/.ssh/authrized_key.reg)
NOMBREVPS=$(cat /etc/SCRIPT-LATAM/temp/nomvpsapk | tr '[:space:]' '+' | tr -d 'ñ' | sed '/^$/d')
curl -s "http://xdroid.net/api/message?k=$KEY&t=%F0%9F%98%8E+Mensaje+de+Prueba%E2%9C%8C%EF%B8%8F&c=%F0%9F%96%A5%EF%B8%8F+VPS%3A+$NOMBREVPS%0A%F0%9F%8C%90+IP%3A+$IP&u=" >/dev/null 2>&1
msgi -bar
echo -e "\033[1;97mSe envio un mensaje de prueba si no le llevo contacte @Kalix1"
sleep 10s
for i in {1..8}; do tput cuu 1 && tput el; done
}
#-- VERIFICAR VERSION #-- VERIFICAR VERSION
v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version") v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version")
echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
v22=$(cat /etc/SCRIPT-LATAM/temp/version_instalacion) v22=$(cat /etc/SCRIPT-LATAM/temp/version_instalacion)
vesaoSCT="\033[1;31m [ \033[1;32m($v22)\033[1;97m\033[1;31m ]" vesaoSCT="\033[1;31m [ \033[1;32m($v22)\033[1;97m\033[1;31m ]"
echo "not_banned" >/etc/SCRIPT-LATAM/temp/ban_status
#-- CONFIGURACION BASICA #-- CONFIGURACION BASICA
os_system os_system
repo "${vercion}" repo "${vercion}"
@ -120,7 +155,7 @@ password required pam_permit.so' >/etc/pam.d/common-password && chmod +x /etc/pa
echo "" echo ""
msgi -bar2 msgi -bar2
fun_ip() { fun_ip() {
TUIP=$(curl -sSL https://ipinfo.io/ip) TUIP=$(wget -qO- ipinfo.io/ip || wget -qO- ifconfig.me)
echo "$TUIP" >/root/.ssh/authrized_key.reg echo "$TUIP" >/root/.ssh/authrized_key.reg
echo -e "\033[1;97m ESTA ES TU IP PUBLICA? \033[32m$TUIP" echo -e "\033[1;97m ESTA ES TU IP PUBLICA? \033[32m$TUIP"
msgi -bar2 msgi -bar2
@ -129,6 +164,7 @@ password required pam_permit.so' >/etc/pam.d/common-password && chmod +x /etc/pa
[[ "$tu_ip" = "n" || "$tu_ip" = "N" ]] && tu_ip [[ "$tu_ip" = "n" || "$tu_ip" = "N" ]] && tu_ip
} }
fun_ip fun_ip
for i in {1..4}; do tput cuu 1 && tput el; done
msgi -bar2 msgi -bar2
echo -e "\033[1;93m AGREGAR Y EDITAR PASS ROOT\033[1;97m" echo -e "\033[1;93m AGREGAR Y EDITAR PASS ROOT\033[1;97m"
msgi -bar msgi -bar
@ -137,6 +173,16 @@ password required pam_permit.so' >/etc/pam.d/common-password && chmod +x /etc/pa
echo -ne "\033[1;97m Seleccione \033[1;31m[\033[1;93m S \033[1;31m/\033[1;93m N \033[1;31m]\033[1;97m: \033[1;93m" && read pass_root echo -ne "\033[1;97m Seleccione \033[1;31m[\033[1;93m S \033[1;31m/\033[1;93m N \033[1;31m]\033[1;97m: \033[1;93m" && read pass_root
#read -p " Seleccione [ S / N ]: " tu_ip #read -p " Seleccione [ S / N ]: " tu_ip
[[ "$pass_root" = "s" || "$pass_root" = "S" ]] && pass_root [[ "$pass_root" = "s" || "$pass_root" = "S" ]] && pass_root
for i in {1..6}; do tput cuu 1 && tput el; done
msgi -bar2
echo -e "\033[1;93m AGREGAR NOTIFY \033[1;97m"
msgi -bar
echo -e "\033[1;97m AGREGAR REGISTRO DE NOTYFY? \033[32m"
msgi -bar2
echo -ne "\033[1;97m Seleccione \033[1;31m[\033[1;93m S \033[1;31m/\033[1;93m N \033[1;31m]\033[1;97m: \033[1;93m" && read avi_login
#read -p " Seleccione [ S / N ]: " tu_ip
[[ "$avi_login" = "s" || "$avi_login" = "S" ]] && avi_login
for i in {1..6}; do tput cuu 1 && tput el; done
msgi -bar2 msgi -bar2
echo -e "\033[1;93m\a\a\a SE PROCEDERA A INSTALAR LAS ACTULIZACIONES\n PERTINENTES DEL SISTEMA, ESTE PROCESO PUEDE TARDAR\n VARIOS MINUTOS Y PUEDE PEDIR ALGUNAS CONFIRMACIONES \033[0;37m" echo -e "\033[1;93m\a\a\a SE PROCEDERA A INSTALAR LAS ACTULIZACIONES\n PERTINENTES DEL SISTEMA, ESTE PROCESO PUEDE TARDAR\n VARIOS MINUTOS Y PUEDE PEDIR ALGUNAS CONFIRMACIONES \033[0;37m"
msgi -bar msgi -bar
@ -144,7 +190,7 @@ password required pam_permit.so' >/etc/pam.d/common-password && chmod +x /etc/pa
clear && clear clear && clear
apt update apt update
apt upgrade -y apt upgrade -y
wget /root/LATAM https://raw.githubusercontent.com/darnix1/Botcgh/refs/heads/main/LATAM -O /usr/bin/LATAM &>/dev/null wget -O /usr/bin/LATAM https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Instalador/LATAM &>/dev/null
chmod +x /usr/bin/LATAM chmod +x /usr/bin/LATAM
} }
@ -171,40 +217,29 @@ time_reboot() {
dependencias() { dependencias() {
dpkg --configure -a >/dev/null 2>&1 dpkg --configure -a >/dev/null 2>&1
apt -f install -y >/dev/null 2>&1 apt -f install -y >/dev/null 2>&1
soft="sudo bsdmainutils zip unzip ufw curl python python3 python3-pip openssl cron iptables lsof pv boxes at mlocate gawk bc jq curl npm nodejs socat netcat netcat-traditional net-tools cowsay figlet lolcat apache2" packages="zip unzip python python3 python3-pip openssl iptables lsof pv boxes at mlocate gawk bc jq npm nodejs socat net-tools cowsay figlet lolcat"
for i in $soft; do for i in $packages; do
paquete="$i" paquete="$i"
echo -e "\033[1;97m INSTALANDO PAQUETE \e[93m >>> \e[36m $i" echo -e "\033[1;97m INSTALANDO PAQUETE \e[93m >>> \e[36m $i"
barra_intall "apt-get install $i -y" barra_intall "apt-get install $i -y"
done done
} }
install_paquetes() { install_paquetes() {
wget /root/LATAM https://raw.githubusercontent.com/darnix1/Botcgh/refs/heads/main/LATAM -O /usr/bin/LATAM &>/dev/null
chmod +x /usr/bin/LATAM
clear && clear clear && clear
#------- BARRA DE ESPERA
msgi -bar2 msgi -bar2
echo -e " \e[5m\033[1;100m =====>> ►► 🖥 SCRIPT | LATAM 🖥 ◄◄ <<===== \033[1;37m" echo -e " \e[33m\e[5m\033[1;100m =====>> ►► 🖥 SCRIPT | LATAM 🖥 ◄◄ <<===== \033[1;37m"
msgi -bar msgi -bar
echo -e " \033[1;41m -- INSTALACION DE PAQUETES PARA LATAM -- \e[49m" echo -e " \033[1;41m -- INSTALACION DE PAQUETES PARA LATAM -- \e[49m"
msgi -bar msgi -bar
[[ -e dp.ok ]] && echo "DEPENDENCIAS YA INSTALADAS " || dependencias dependencias
sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf >/dev/null 2>&1 echo -e "\e[1;97m REMOVIENDO PAQUETES OBSOLETOS \e[1;32m"
service apache2 restart >/dev/null 2>&1 barra_intallb "apt autoremove -y "
[[ $(sudo lsof -i :81) ]] || ESTATUSP=$(echo -e "\033[1;91m >>> FALLO DE INSTALACION EN APACHE <<<") &>/dev/null
[[ $(sudo lsof -i :81) ]] && ESTATUSP=$(echo -e "\033[1;92m PUERTO APACHE ACTIVO CON EXITO") &>/dev/null
echo ""
echo -e "$ESTATUSP"
echo ""
echo -e "\e[1;97m REMOVIENDO PAQUETES OBSOLETOS - \e[1;32m OK"
apt autoremove -y &>/dev/null
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections
msgi -bar2 msgi -bar2
read -t 30 -n 1 -rsp $'\033[1;97m Preciona Enter Para continuar\n' read -t 30 -n 1 -rsp $'\033[1;97m Preciona Enter Para continuar\n'
} }
#SELECTOR DE INSTALACION #SELECTOR DE INSTALACION
while :; do while :; do
case $1 in case $1 in
@ -222,241 +257,178 @@ while :; do
esac esac
done done
## PASO DOS instalador_final() {
Install_key() { tput cuu1 && tput dl1
wget /root/LATAM https://raw.githubusercontent.com/darnix1/Botcgh/refs/heads/main/LATAM -O /usr/bin/LATAM &>/dev/null tput cuu1 && tput dl1
echo -e " \033[1;4;32mLA KEY ES VALIDA FINALIZANDO INSTALACION \033[0;39m"
##-->> ACOPLANDO INSTALL EN /BIN
wget /root/LATAM https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Instalador/LATAM -O /usr/bin/LATAM &>/dev/null
chmod +x /usr/bin/LATAM chmod +x /usr/bin/LATAM
##-->> LIMPIAR BASHRC
/bin/cp /etc/skel/.bashrc ~/ /bin/cp /etc/skel/.bashrc ~/
clear && clear ##-->> DESCARGAR FICHEROS
cd /etc
wget https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/SCRIPT-LATAM.tar.gz >/dev/null 2>&1
tar -xf SCRIPT-LATAM.tar.gz >/dev/null 2>&1
chmod +x SCRIPT-LATAM.tar.gz >/dev/null 2>&1
rm -rf SCRIPT-LATAM.tar.gz
cd
##-->> ADPTAR SLOGAN
wget -O /etc/SCRIPT-LATAM/message.txt http://155.138.245.13:81/Slogan/message.txt &>/dev/null
SCPdir="/etc/SCRIPT-LATAM" SCPdir="/etc/SCRIPT-LATAM"
SCPinstal="$HOME/install" SCPinstal="$HOME/install"
Filbot="${SCPdir}/botmanager" Filbot="${SCPdir}/botmanager"
Filpy="${SCPdir}/filespy" Filpy="${SCPdir}/filespy"
Filotros="${SCPdir}/temp" Filotros="${SCPdir}/temp"
IP=$(cat /root/.ssh/authrized_key.reg) IP=$(cat /root/.ssh/authrized_key.reg)
function_verify() { ### INSTALAR VERSION DE SCRIPT
permited=$(curl -sSL "https://raw.githubusercontent.com/darnix1/permission/refs/heads/main/ipmini") v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version")
[[ $(echo $permited | grep "${IP}") = "" ]] && { echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
clear && clear FIns=$(printf '%(%D-%H:%M:%S)T')
echo -e "\n\n\n\033[1;91m————————————————————————————————————————————————————\n ¡ESTA KEY NO CONCUERDA CON EL INSTALADOR! \n CONATACTE A @Kalix1\n————————————————————————————————————————————————————\n\n\n" echo "$FIns" >/etc/SCRIPT-LATAM/F-Instalacion
# [[ -d /etc/SCRIPT-LATAM ]] && rm -rf /etc/SCRIPT-LATAM last_check_file="/etc/SCRIPT-LATAM/temp/last_check"
exit 1 date "+%Y-%m-%d %H:%M:%S" >"$last_check_file"
} || { wget -O /bin/rebootnb https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/rebootnb.sh &>/dev/null
### INSTALAR VERSION DE SCRIPT chmod +x /bin/rebootnb
v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version") wget -O /bin/autoinicios https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/autoinicios &>/dev/null
echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion chmod +rwx /bin/autoinicios
FIns=$(printf '%(%D-%H:%M:%S)T') wget -O /etc/systemd/system/iniciolatam.service https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/iniciolatam.service &>/dev/null
echo "$FIns" >/etc/SCRIPT-LATAM/F-Instalacion sudo systemctl enable -q iniciolatam.service
} wget -O /bin/check-update https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/check-update &>/dev/null
} chmod +rwx /bin/check-update
fun_idi() { wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null
clear && clear echo '#!/bin/sh -e' >/etc/rc.local
msgi -bar2
echo -e "\033[1;32m————————————————————————————————————————————————————"
figlet -w 85 -f smslant " SCRIPT
LATAM " | lolcat
msgi -ama " [ ----- \033[1;97m 🐲 By @ChumoGH 🐲\033[1;33m ----- ]"
echo -e "\033[1;32m————————————————————————————————————————————————————"
pv="$(echo es)"
[[ ${#id} -gt 2 ]] && id="es" || id="$pv"
byinst="true"
}
install_fim() {
echo -e " \033[1;4;32mFinalizando Instalacion\033[0;39m"
wget -O /bin/rebootnb https://www.dropbox.com/s/d77e1vaknc0hhqi/rebootnb.sh &>/dev/null
chmod +x /bin/rebootnb
wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null
msgi -bar2
echo '#!/bin/sh -e' >/etc/rc.local
sudo chmod +x /etc/rc.local sudo chmod +x /etc/rc.local
echo "sudo rebootnb reboot" >>/etc/rc.local echo "sudo rebootnb reboot" >>/etc/rc.local
echo "sleep 2s" >>/etc/rc.local echo "sleep 2s" >>/etc/rc.local
echo "exit 0" >>/etc/rc.local echo "exit 0" >>/etc/rc.local
echo 'clear && clear' >>.bashrc msgi -bar2
echo 'rebootnb login >/dev/null 2>&1' >>.bashrc echo 'clear && clear' >>.bashrc
echo 'echo -e "\033[1;31m————————————————————————————————————————————————————" ' >>.bashrc echo 'rebootnb login >/dev/null 2>&1' >>.bashrc
echo 'echo -e "\033[1;93m════════════════════════════════════════════════════" ' >>.bashrc echo 'echo -e "\033[1;31m————————————————————————————————————————————————————" ' >>.bashrc
echo 'sudo figlet -w 85 -f smslant " SCRIPT echo 'echo -e "\033[1;93m════════════════════════════════════════════════════" ' >>.bashrc
echo 'sudo figlet -w 85 -f smslant " SCRIPT
LATAM" | lolcat' >>.bashrc LATAM" | lolcat' >>.bashrc
echo 'echo -e "\033[1;93m════════════════════════════════════════════════════" ' >>.bashrc echo 'echo -e "\033[1;93m════════════════════════════════════════════════════" ' >>.bashrc
echo 'echo -e "\033[1;31m————————————————————————————————————————————————————" ' >>.bashrc echo 'echo -e "\033[1;31m————————————————————————————————————————————————————" ' >>.bashrc
echo 'mess1="$(less -f /etc/SCRIPT-LATAM/message.txt | head -1)" ' >>.bashrc echo 'mess1="$(less -f /etc/SCRIPT-LATAM/message.txt)" ' >>.bashrc
echo 'echo "" ' >>.bashrc echo 'echo "" ' >>.bashrc
echo 'echo -e "\033[92m -->> SLOGAN:\033[93m $mess1 "' >>.bashrc echo 'echo -e "\033[92m -->> SLOGAN:\033[93m $mess1 "' >>.bashrc
echo 'echo "" ' >>.bashrc echo 'echo "" ' >>.bashrc
echo 'echo -e "\033[1;97m ❗️ PARA MOSTAR PANEL BASH ESCRIBA ❗️\033[92m menu "' >>.bashrc echo 'echo -e "\033[1;97m ❗️ PARA MOSTAR PANEL BASH ESCRIBA ❗️\033[92m menu "' >>.bashrc
echo 'wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null' >>.bashrc echo 'wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null' >>.bashrc
echo 'echo ""' >>.bashrc echo 'echo ""' >>.bashrc
#-BASH SOPORTE ONLINE echo "${SCPdir}/menu.sh" >/usr/bin/menu && chmod +x /usr/bin/menu
wget https://www.dropbox.com/s/np0ycjehuiequ2m/SPR.sh -O /usr/bin/SPR >/dev/null 2>&1 echo "${SCPdir}/menu.sh" >/usr/bin/MENU && chmod +x /usr/bin/MENU
chmod +x /usr/bin/SPR echo "$Key" >${SCPdir}/key.txt
SPR >/dev/null 2>&1 #-BASH SOPORTE ONLINE
timeespera="1" wget https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Fixs%20Remotos/SPR.sh -O /usr/bin/SPR >/dev/null 2>&1
times="10" chmod +x /usr/bin/SPR
if [ "$timeespera" = "1" ]; then SPR >/dev/null 2>&1
echo -e "\033[1;97m ❗️ REGISTRANDO IP y KEY EN LA BASE ❗️ " timeespera="1"
msgi -bar2 times="10"
while [ $times -gt 0 ]; do if [ "$timeespera" = "1" ]; then
echo -ne " -$times-\033[0K\r" echo -e "\033[1;97m ❗️ REGISTRANDO IP y KEY EN LA BASE ❗️ "
sleep 1
: $((times--))
done
tput cuu1 && tput dl1
tput cuu1 && tput dl1
tput cuu1 && tput dl1
msgi -bar2
echo -e " \033[1;92m LISTO REGISTRO COMPLETO "
echo -e " \033[1;97m COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
echo -e " \033[1;41m menu o MENU \033[0;37m" && msgi -bar2
fi
meu_ip() {
if [[ -e /tmp/IP ]]; then
echo "$(cat /tmp/IP)"
else
MEU_IP=$(curl -sSL ifconfig.me)
echo "$MEU_IP" >/tmp/IP
fi
}
meu_ip
exit
}
ofus() {
unset server
#server=$(echo ${txt_ofuscatw} | cut -d':' -f1)
unset txtofus
number=$(expr length $1)
for ((i = 1; i < $number + 1; i++)); do
txt[$i]=$(echo "$1" | cut -b $i)
case ${txt[$i]} in
".") txt[$i]="v" ;;
"v") txt[$i]="." ;;
"1") txt[$i]="@" ;;
"@") txt[$i]="1" ;;
"2") txt[$i]="?" ;;
"?") txt[$i]="2" ;;
"4") txt[$i]="p" ;;
"p") txt[$i]="4" ;;
"-") txt[$i]="L" ;;
"L") txt[$i]="-" ;;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
verificar_arq() {
case $1 in
"menu.sh" | "message.txt") ARQ="${SCPdir}/" ;;
"LATAMbot.sh") ARQ="${Filbot}/" ;;
"PDirect.py" | "PPub.py" | "PPriv.py" | "POpen.py" | "PGet.py") ARQ="${Filpy}/" ;;
*) ARQ="${Filotros}/" ;;
esac
mv -f ${SCPinstal}/$1 ${ARQ}/$1
chmod +x ${ARQ}/$1
}
#fun_ip
[[ $1 = "" ]] && fun_idi || {
[[ ${#1} -gt 2 ]] && fun_idi || id="$1"
}
error_fun() {
msgi -bar2 msgi -bar2
msgi -bar2 while [ $times -gt 0 ]; do
sleep 3s echo -ne " -$times-\033[0K\r"
clear && clear sleep 1
echo "Codificacion Incorrecta" >/etc/SCRIPT-LATAM/errorkey : $((times--))
msgi -bar2 done
[[ $1 = "" ]] && fun_idi || {
[[ ${#1} -gt 2 ]] && fun_idi || id="$1"
}
echo -e "\033[1;31m ¡# ERROR INESPERADO #¡\n ESTA KEY YA FUE USADA O EXPIRO "
echo -e "\033[0;93m -SI EL ERROR PERCISTE REVISAR PUERTO 81 TCP -"
msgi -bar2
echo -ne "\033[1;97m DESEAS REINTENTAR CON OTRA KEY \033[1;31m[\033[1;93m S \033[1;31m/\033[1;93m N \033[1;31m]\033[1;97m: \033[1;93m" && read incertar_key
service apache2 restart >/dev/null 2>&1
[[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && incertar_key
clear && clear
msgi -bar2
msgi -bar2
rm -rf lista-arq
echo -e "\033[1;97m ---- INSTALACION CANCELADA -----"
msgi -bar2
msgi -bar2
exit 1
}
invalid_key() {
msgi -bar2
msgi -bar2
sleep 3s
clear && clear
echo "Codificacion Incorrecta" >/etc/SCRIPT-LATAM/errorkey
msgi -bar2
[[ $1 = "" ]] && fun_idi || {
[[ ${#1} -gt 2 ]] && fun_idi || id="$1"
}
echo -e "\033[1;31m CIFRADO INVALIDO -- #¡La Key fue Invalida#! "
msgi -bar2
echo -ne "\033[1;97m DESEAS REINTENTAR CON OTRA KEY \033[1;31m[\033[1;93m S \033[1;31m/\033[1;93m N \033[1;31m]\033[1;93m: \033[1;93m" && read incertar_key
[[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && incertar_key
clear && clear
msgi -bar2
msgi -bar2
echo -e "\033[1;97m ---- INSTALACION CANCELADA -----"
msgi -bar2
msgi -bar2
exit 1
}
incertar_key() {
[[ -d /etc/SCRIPT-LATAM/errorkey ]] && rm -rf /etc/SCRIPT-LATAM/errorkey >/dev/null 2>&1
echo "By Kalix1" >/etc/SCRIPT-LATAM/errorkey
msgi -bar2
echo -ne "\033[1;96m >>> INTRODUZCA LA KEY ABAJO <<<\n\033[1;31m " && read Key
[[ -z "$Key" ]] && Key="NULL"
tput cuu1 && tput dl1 tput cuu1 && tput dl1
msgi -ne " \033[1;93m# Verificando Key # : " tput cuu1 && tput dl1
cd $HOME tput cuu1 && tput dl1
IPL=$(cat /root/.ssh/authrized_key.reg) msgi -bar2
wget -O $HOME/lista-arq $(ofus "$Key")/$IPL/LATAM >/dev/null 2>&1 && echo -e "\033[1;32m Codificacion Correcta" || { echo -e " \033[1;93m LISTO REGISTRO COMPLETO "
echo -e "\033[1;31m Codificacion Incorrecta" echo -e " \033[1;97m COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
invalid_key echo -e " \033[1;41m menu o MENU \033[0;37m " && msgi -bar2
exit fi
} meu_ip() {
IP=$(ofus "$Key" | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') && echo "$IP" >/usr/bin/vendor_code if [[ -e /tmp/IP ]]; then
sleep 1s echo "$(cat /tmp/IP)"
function_verify
updatedb
if [[ -e $HOME/lista-arq ]] && [[ ! $(cat /etc/SCRIPT-LATAM/errorkey | grep "Codificacion Incorrecta") ]]; then
msgi -bar2
msgi -verd " Ficheros Copiados \e[97m[\e[93m Key By @Panel_NetVPS_bot \e[97m]"
REQUEST=$(ofus "$Key" | cut -d'/' -f2)
[[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal}
pontos="."
stopping="Configurando Directorios"
for arqx in $(cat $HOME/lista-arq); do
msgi -verm "${stopping}${pontos}"
wget --no-check-certificate -O ${SCPinstal}/${arqx} ${IP}:81/${REQUEST}/${arqx} >/dev/null 2>&1 && verificar_arq "${arqx}" || {
error_fun
exit
}
tput cuu1 && tput dl1
pontos+="."
done
sleep 1s
msgi -bar2
listaarqs="$(locate "lista-arq" | head -1)" && [[ -e ${listaarqs} ]] && rm $listaarqs
cat /etc/bash.bashrc | grep -v '[[ $UID != 0 ]] && TMOUT=15 && export TMOUT' >/etc/bash.bashrc.2
echo -e '[[ $UID != 0 ]] && TMOUT=15 && export TMOUT' >>/etc/bash.bashrc.2
mv -f /etc/bash.bashrc.2 /etc/bash.bashrc
echo "${SCPdir}/menu.sh" >/usr/bin/menu && chmod +x /usr/bin/menu
echo "${SCPdir}/menu.sh" >/usr/bin/MENU && chmod +x /usr/bin/MENU
echo "$Key" >${SCPdir}/key.txt
[[ -d ${SCPinstal} ]] && rm -rf ${SCPinstal}
[[ ${byinst} = "true" ]] && install_fim
else else
invalid_key MEU_IP=$(wget -qO- ipinfo.io/ip || wget -qO- ifconfig.me)
echo "$MEU_IP" >/tmp/IP
fi fi
} }
incertar_key meu_ip &>/dev/null
exit
} }
Install_key
error_fun() {
tput cuu 2
tput el
tput el
echo -e "\033[1;31m ¡# ERROR INESPERADO #¡"
echo -e "\033[1;31m ESTA KEY YA FUE USADA O EXPIRO "
msgi -bar2
echo -ne "\033[1;97m DESEAS REINTENTAR CON OTRA KEY \033[1;31m[\033[1;93m S \033[1;31m/\033[1;93m N \033[1;31m]\033[1;97m: \033[1;93m" && read incertar_key
[[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && check_key
clear && clear
msgi -bar2
echo -e "\033[1;97m ---- INSTALACION CANCELADA -----"
msgi -bar2
exit
}
check_key() {
clear && clear
msgi -bar2
echo -e "\033[1;32m————————————————————————————————————————————————————"
figlet -w 85 -f smslant " SCRIPT
LATAM " | lolcat
msgi -ama " [ ----- \033[1;97m 🐲 By @Kalix1 🐲\033[1;33m ----- ]"
echo -e "\033[1;32m————————————————————————————————————————————————————"
msgi -bar2
echo -ne "\033[1;96m >>> INTRODUZCA LA KEY ABAJO <<<\n\033[1;31m " && read Key
# TU IP AQUI
IP_SERVIDOR="50.116.47.166"
# 1. Validar la Key
respuesta=$(curl -s --data "clave=$Key" http://${IP_SERVIDOR}:81/CheckPHP/CheckKey.php)
# Limpiar respuesta
respuesta=$(echo $respuesta | tr -d '[:space:]')
if [[ "$respuesta" == "clave_valida" ]]; then
echo -e "\n\033[1;92m ✅ ¡KEY VALIDA! ACCESO CONCEDIDO.\033[0m"
# --- NUEVO: Descargar y GUARDAR en /var/local/ ---
# 1. Definimos la ruta de destino
DESTINO="/var/local/message.txt"
# 2. Descargamos el archivo y lo guardamos en esa ruta (-O mayúscula)
wget -q -O "$DESTINO" http://${IP_SERVIDOR}:81/CheckPHP/message.txt
# 3. Leemos el archivo recién guardado para mostrar el nombre
if [[ -e "$DESTINO" ]]; then
NOMBRE_USUARIO=$(cat "$DESTINO")
else
NOMBRE_USUARIO="Usuario"
fi
echo -e "\033[1;97m Bienvenido: \033[1;93m$NOMBRE_USUARIO\033[0m"
#echo -e "\033[1;97m Archivo guardado en: \033[1;90m$DESTINO\033[0m"
echo -e "\033[1;32m————————————————————————————————————————————————————\033[0m"
# -------------------------------------------------
sleep 2
# INICIAR INSTALACIÓN
instalador_final
elif [[ "$respuesta" == "clave_expirada" ]]; then
echo -e "\n\033[1;93m ⚠️ LA KEY HA EXPIRADO.\033[0m"
sleep 5
exit 1
else
#echo -e "\n\033[1;91m ❌ KEY INVALIDA O NO EXISTE.\033[0m"
#sleep 5
error_fun
#exit 1
fi
}
check_key