This commit is contained in:
drowkid01 2025-06-06 08:51:42 -06:00
parent 6c15ed4783
commit 658eaa098d
3 changed files with 1653 additions and 0 deletions

View File

@ -0,0 +1,464 @@
#!/bin/bash
##-->> INSTALADOR --- ACTUALIZADO EL 16-03-2023 -- >> By @Kalix1 << ---
clear && clear
colores="$(pwd)/colores"
rm -rf ${colores}
wget -O ${colores} "https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/colores" &>/dev/null
[[ ! -e ${colores} ]] && exit
chmod +x ${colores} &>/dev/null
##-->> CARGAR SC EXTERNO
source $(pwd)/colores
CTRL_C() {
rm -rf ${colores}
rm -rf $(pwd)/LATAM
exit
}
##-->> DETECTAR CANCELAR Y ELIMINAR ARCHIVO
trap "CTRL_C" INT TERM EXIT
rm $(pwd)/$0 &>/dev/null
#-->> DETECTAR ROOT
if [ $(whoami) != 'root' ]; then
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"
exit
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() {
system=$(cat -n /etc/issue | grep 1 | cut -d ' ' -f6,7,8 | sed 's/1//' | sed 's/ //')
distro=$(echo "$system" | awk '{print $1}')
case $distro in
Debian) vercion=$(echo $system | awk '{print $3}' | cut -d '.' -f1) ;;
Ubuntu) vercion=$(echo $system | awk '{print $2}' | cut -d '.' -f1,2) ;;
esac
}
repo() {
link="https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Source-List/$1.list"
case $1 in
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
}
##-->> PREPARAR PAQUETERIAS Y DIRECTORIOS
install_inicial() {
clear && clear
#CARPETAS PRINCIPALES
mkdir -p /etc/SCRIPT-LATAM >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/temp >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/filespy >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/botmanager >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/PortM >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/v2ray >/dev/null 2>&1
mkdir -p /root/.ssh >/dev/null 2>&1
#--VERIFICAR IP MANUAL
tu_ip() {
echo ""
echo -ne "\033[1;96m #Digite tu IP Publica (IPV4): \033[32m" && read IP
val_ip() {
local ip=$IP
local stat=1
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
OIFS=$IFS
IFS='.'
ip=($ip)
IFS=$OIFS
[[ ${ip[0]} -le 255 && ${ip[1]} -le 255 && ${ip[2]} -le 255 && ${ip[3]} -le 255 ]]
stat=$?
fi
return $stat
}
if val_ip $IP; then
mkdir -p /root/.ssh
echo "$IP" >/root/.ssh/authrized_key.reg
else
echo ""
echo -e "\033[31mLa IP Digitada no es valida, Verifiquela"
echo ""
sleep 5s
fun_ip
fi
}
#CONFIGURAR SSH-ROOT PRINCIPAL AMAZON, GOOGLE
pass_root() {
wget -O /etc/ssh/sshd_config https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/sshd_config >/dev/null 2>&1
chmod +rwx /etc/ssh/sshd_config
service ssh restart
msgi -bar
echo -ne "\033[1;97m DIGITE NUEVA CONTRASEÑA: \033[1;31m" && read pass
(
echo $pass
echo $pass
) | passwd root 2>/dev/null
sleep 1s
msgi -bar
echo -e "\033[1;94m CONTRASEÑA AGREGADA O EDITADA CORECTAMENTE"
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://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/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
v1=$(curl -sSL "https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Version")
echo "$v1" >/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 ]"
echo "not_banned" >/etc/SCRIPT-LATAM/temp/ban_status
#-- CONFIGURACION BASICA
os_system
repo "${vercion}"
msgi -bar2
echo -e " \e[5m\033[1;100m =====>> ►► 🖥 SCRIPT | LATAM 🖥 ◄◄ <<===== \033[1;37m"
msgi -bar2
msgi -ama " PREPARANDO INSTALACION | VERSION: $vesaoSCT"
msgi -bar2
## PAQUETES-UBUNTU PRINCIPALES
echo ""
echo -e "\033[1;97m 🔎 IDENTIFICANDO SISTEMA OPERATIVO"
echo -e "\033[1;32m | $distro $vercion |"
echo ""
echo -e "\033[1;97m ◽️ DESACTIVANDO PASS ALFANUMERICO "
[[ $(dpkg --get-selections | grep -w "libpam-cracklib" | head -1) ]] || barra_intallb "apt-get install libpam-cracklib -y &>/dev/null"
echo -e '# Modulo Pass Simple
password [success=1 default=ignore] pam_unix.so obscure sha512
password requisite pam_deny.so
password required pam_permit.so' >/etc/pam.d/common-password && chmod +x /etc/pam.d/common-password
[[ $(dpkg --get-selections | grep -w "libpam-cracklib" | head -1) ]] && barra_intallb "service ssh restart"
echo ""
msgi -bar2
fun_ip() {
TUIP=$(wget -qO- ipinfo.io/ip || wget -qO- ifconfig.me)
echo "$TUIP" >/root/.ssh/authrized_key.reg
echo -e "\033[1;97m ESTA ES TU IP PUBLICA? \033[32m$TUIP"
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 tu_ip
#read -p " Seleccione [ S / N ]: " tu_ip
[[ "$tu_ip" = "n" || "$tu_ip" = "N" ]] && tu_ip
}
fun_ip
for i in {1..4}; do tput cuu 1 && tput el; done
msgi -bar2
echo -e "\033[1;93m AGREGAR Y EDITAR PASS ROOT\033[1;97m"
msgi -bar
echo -e "\033[1;97m CAMBIAR PASS ROOT? \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 pass_root
#read -p " Seleccione [ S / N ]: " tu_ip
[[ "$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
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
read -t 120 -n 1 -rsp $'\033[1;97m Preciona Enter Para continuar\n'
clear && clear
apt update
apt upgrade -y
wget -O /usr/bin/LATAM https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Instalador/LATAM &>/dev/null
chmod +x /usr/bin/LATAM
}
post_reboot() {
/bin/cp /etc/skel/.bashrc ~/
echo 'LATAM -c' >>.bashrc
}
time_reboot() {
clear && clear
msgi -bar
echo -e "\e[1;93m CONTINUARA INSTALACION DESPUES DEL REBOOT"
echo -e "\e[1;93m O EJECUTE EL COMANDO: \e[1;92mLATAM -c "
msgi -bar
REBOOT_TIMEOUT="$1"
while [ $REBOOT_TIMEOUT -gt 0 ]; do
print_center -ne "-$REBOOT_TIMEOUT-\r"
sleep 1
: $((REBOOT_TIMEOUT--))
done
reboot
}
dependencias() {
dpkg --configure -a >/dev/null 2>&1
apt -f install -y >/dev/null 2>&1
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 $packages; do
paquete="$i"
echo -e "\033[1;97m INSTALANDO PAQUETE \e[93m >>> \e[36m $i"
barra_intall "apt-get install $i -y"
done
}
install_paquetes() {
clear && clear
msgi -bar2
echo -e " \e[33m\e[5m\033[1;100m =====>> ►► 🖥 SCRIPT | LATAM 🖥 ◄◄ <<===== \033[1;37m"
msgi -bar
echo -e " \033[1;41m -- INSTALACION DE PAQUETES PARA LATAM -- \e[49m"
msgi -bar
dependencias
echo -e "\e[1;97m REMOVIENDO PAQUETES OBSOLETOS \e[1;32m"
barra_intallb "apt autoremove -y "
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
msgi -bar2
read -t 30 -n 1 -rsp $'\033[1;97m Preciona Enter Para continuar\n'
}
#SELECTOR DE INSTALACION
while :; do
case $1 in
-s | --start) install_inicial && post_reboot && time_reboot "15" ;;
-c | --continue)
install_paquetes
rm -rf /root/LATAM &>/dev/null
break
;;
-k | --key)
clear && clear
break
;;
*) exit ;;
esac
done
instalador_final() {
tput cuu1 && tput dl1
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://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Instalador/LATAM -O /usr/bin/LATAM &>/dev/null
chmod +x /usr/bin/LATAM
##-->> LIMPIAR BASHRC
/bin/cp /etc/skel/.bashrc ~/
##-->> DESCARGAR FICHEROS
cd /etc
wget https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/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"
SCPinstal="$HOME/install"
Filbot="${SCPdir}/botmanager"
Filpy="${SCPdir}/filespy"
Filotros="${SCPdir}/temp"
IP=$(cat /root/.ssh/authrized_key.reg)
### INSTALAR VERSION DE SCRIPT
v1=$(curl -sSL "https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Version")
echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
FIns=$(printf '%(%D-%H:%M:%S)T')
echo "$FIns" >/etc/SCRIPT-LATAM/F-Instalacion
last_check_file="/etc/SCRIPT-LATAM/temp/last_check"
date "+%Y-%m-%d %H:%M:%S" >"$last_check_file"
wget -O /bin/rebootnb https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/rebootnb.sh &>/dev/null
chmod +x /bin/rebootnb
wget -O /bin/autoinicios https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/autoinicios &>/dev/null
chmod +rwx /bin/autoinicios
wget -O /etc/systemd/system/iniciolatam.service https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/iniciolatam.service &>/dev/null
sudo systemctl enable -q iniciolatam.service
wget -O /bin/check-update https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/check-update &>/dev/null
chmod +rwx /bin/check-update
wget -O /etc/SCRIPT-LATAM/temp/version_actual https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Version &>/dev/null
echo '#!/bin/sh -e' >/etc/rc.local
sudo chmod +x /etc/rc.local
echo "sudo rebootnb reboot" >>/etc/rc.local
echo "sleep 2s" >>/etc/rc.local
echo "exit 0" >>/etc/rc.local
msgi -bar2
echo 'clear && clear' >>.bashrc
echo 'rebootnb login >/dev/null 2>&1' >>.bashrc
echo 'echo -e "\033[1;31m————————————————————————————————————————————————————" ' >>.bashrc
echo 'echo -e "\033[1;93m════════════════════════════════════════════════════" ' >>.bashrc
echo 'sudo figlet -w 85 -f smslant " SCRIPT
LATAM" | lolcat' >>.bashrc
echo 'echo -e "\033[1;93m════════════════════════════════════════════════════" ' >>.bashrc
echo 'echo -e "\033[1;31m————————————————————————————————————————————————————" ' >>.bashrc
echo 'mess1="$(less -f /etc/SCRIPT-LATAM/message.txt)" ' >>.bashrc
echo 'echo "" ' >>.bashrc
echo 'echo -e "\033[92m -->> SLOGAN:\033[93m $mess1 "' >>.bashrc
echo 'echo "" ' >>.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://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Version &>/dev/null' >>.bashrc
echo 'echo ""' >>.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
#-BASH SOPORTE ONLINE
wget https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Fixs%20Remotos/SPR.sh -O /usr/bin/SPR >/dev/null 2>&1
chmod +x /usr/bin/SPR
SPR >/dev/null 2>&1
timeespera="1"
times="10"
if [ "$timeespera" = "1" ]; then
echo -e "\033[1;97m ❗️ REGISTRANDO IP y KEY EN LA BASE ❗️ "
msgi -bar2
while [ $times -gt 0 ]; do
echo -ne " -$times-\033[0K\r"
sleep 1
: $((times--))
done
tput cuu1 && tput dl1
tput cuu1 && tput dl1
tput cuu1 && tput dl1
msgi -bar2
echo -e " \033[1;93m 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=$(wget -qO- ipinfo.io/ip || wget -qO- ifconfig.me)
echo "$MEU_IP" >/tmp/IP
fi
}
meu_ip &>/dev/null
exit
}
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
}
verificar_arq(){
[[ ! -d ${SCPdir} ]] && mkdir $SCPdir
mv -f ${SCPinstal}/$1 ${SCPdir}/$1
chmod +rwx $SCPdir/$1
}
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]="x";;
"x")txt[$i]=".";;
"5")txt[$i]="s";;
"s")txt[$i]="5";;
"1")txt[$i]="@";;
"@")txt[$i]="1";;
"2")txt[$i]="?";;
"?")txt[$i]="2";;
"4")txt[$i]="0";;
"0")txt[$i]="4";;
"/")txt[$i]="K";;
"K")txt[$i]="/";;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
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
Key="$(echo "$Key" | tr -d '[[:space:]]')"
cd $HOME
IiP=$(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}')
[[ $(curl -s --connect-timeout 5 $IiP:8888 ) ]] && {
tput cuu1 && tput dl1
tput cuu1&&tput dl1
msg -bar
echo -ne " \e[90m\e[43m CHEK KEY : \033[0;33m"
echo -e " \e[3;32m ENLAZADA AL GENERADOR\e[0m" | pv -qL 50
ofen=$(wget -qO- $(ofus $Key))
tput cuu1 && tput dl1
msg -bar
echo -ne " \033[1;41m CHEK KEY : \033[0;33m"
tput cuu1 && tput dl1
wget --no-check-certificate -O $HOME/lista-arq $(ofus "$Key")/$IP > /dev/null 2>&1 && echo -ne "\033[1;34m [ \e[3;32m VERIFICANDO KEY \e[0m \033[1;34m]\033[0m" && pkrm=$(ofus "$Key")
} || {
invalid_key && exit
}
[[ -e $HOME/log.txt ]] && rm -f $HOME/log.txt
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
REQUEST=$(ofus "$Key"|cut -d'/' -f2)
[[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal}
for arqx in $(cat $HOME/lista-arq); do
wget --no-check-certificate -O ${SCPinstal}/${arqx} ${IP}:81/${REQUEST}/${arqx} > /dev/null 2>&1 && verificar_arq "${arqx}"
done
if [[ -e $HOME/lista-arq ]] && [[ ! $(cat $HOME/lista-arq|grep "KEY DE @drowkid01"") ]]; then
[[ -e ${SCPdir}/menu ]] && {
echo $Key > /etc/latamkey
clear
rm -f $HOME/log.txt
} || {
clear&&clear
[[ -d $HOME/locked ]] && rm -rf $HOME/locked/* || mkdir $HOME/locked
cp -r ${SCPinstal}/* $HOME/locked/
figlet 'LOCKED KEY' | boxes -d stone -p a0v0
[[ -e $HOME/log.txt ]] && ff=$(cat < $HOME/log.txt | wc -l) || ff='ALL'
msg -ne " ${aLerT} "
echo -e "\033[1;31m [ $ff FILES DE KEY BLOQUEADOS ] " | pv -qL 50 && msg -bar
echo -e " APAGA TU CORTAFUEGOS O HABILITA PUERTO 81 Y 8888"
echo -e " ---- AGREGANDO REGLAS AUTOMATICAS ----"
act_ufw
echo -e " Si esto no funciona PEGA ESTOS COMANDOS "
echo -e " sudo ufw allow 81 && sudo ufw allow 8888 "
msg -bar
echo -e " sudo apt purge ufw -y"
invalid_key && exit
}
}
check_key

View File

@ -0,0 +1,459 @@
#!/bin/bash
# INSTALADO --- ACTULIZADO EL 12-01-2023 --By @Kalix1
clear && clear
colores="$(pwd)/colores"
rm -rf ${colores}
wget -O ${colores} "https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/colores" &>/dev/null
[[ ! -e ${colores} ]] && exit
chmod +x ${colores} &>/dev/null
source ${colores}
CTRL_C() {
rm -rf ${colores}
rm -rf /root/LATAM
exit
}
trap "CTRL_C" INT TERM EXIT
#rm $(pwd)/$0 &>/dev/null
#-- VERIFICAR ROOT
if [ $(whoami) != 'root' ]; then
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"
exit
fi
os_system() {
system=$(cat -n /etc/issue | grep 1 | cut -d ' ' -f6,7,8 | sed 's/1//' | sed 's/ //')
distro=$(echo "$system" | awk '{print $1}')
case $distro in
Debian) vercion=$(echo $system | awk '{print $3}' | cut -d '.' -f1) ;;
Ubuntu) vercion=$(echo $system | awk '{print $2}' | cut -d '.' -f1,2) ;;
esac
}
repo() {
link="https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Source-List/$1.list"
case $1 in
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
}
## PRIMER PASO DE INSTALACION
install_inicial() {
clear && clear
#CARPETAS PRINCIPALES
mkdir -p /etc/SCRIPT-LATAM >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/temp >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/filespy >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/botmanager >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/PortM >/dev/null 2>&1
mkdir -p /etc/SCRIPT-LATAM/v2ray >/dev/null 2>&1
mkdir -p /root/.ssh >/dev/null 2>&1
#--VERIFICAR IP MANUAL
tu_ip() {
echo ""
echo -ne "\033[1;96m #Digite tu IP Publica (IPV4): \033[32m" && read IP
val_ip() {
local ip=$IP
local stat=1
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
OIFS=$IFS
IFS='.'
ip=($ip)
IFS=$OIFS
[[ ${ip[0]} -le 255 && ${ip[1]} -le 255 && ${ip[2]} -le 255 && ${ip[3]} -le 255 ]]
stat=$?
fi
return $stat
}
if val_ip $IP; then
echo "$IP" >/root/.ssh/authrized_key.reg
else
echo ""
echo -e "\033[31mLa IP Digitada no es valida, Verifiquela"
echo ""
sleep 5s
fun_ip
fi
}
#CONFIGURAR SSH-ROOT PRINCIPAL AMAZON, GOOGLE
pass_root() {
wget -O /etc/ssh/sshd_config https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/sshd_config >/dev/null 2>&1
chmod +rwx /etc/ssh/sshd_config
service ssh restart
msgi -bar
echo -ne "\033[1;97m DIGITE NUEVA CONTRASEÑA: \033[1;31m" && read pass
(
echo $pass
echo $pass
) | passwd root 2>/dev/null
sleep 1s
msgi -bar
echo -e "\033[1;94m CONTRASEÑA AGREGADA O EDITADA CORECTAMENTE"
echo -e "\033[1;97m TU CONTRASEÑA ROOT AHORA ES: \e[41m $pass \033[0;37m"
}
#-- VERIFICAR VERSION
v1=$(curl -sSL "https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Version")
echo "$v1" >/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 ]"
#-- CONFIGURACION BASICA
os_system
repo "${vercion}"
msgi -bar2
echo -e " \e[5m\033[1;100m =====>> ►► 🖥 SCRIPT | LATAM 🖥 ◄◄ <<===== \033[1;37m"
msgi -bar2
msgi -ama " PREPARANDO INSTALACION | VERSION: $vesaoSCT"
msgi -bar2
## PAQUETES-UBUNTU PRINCIPALES
echo ""
echo -e "\033[1;97m 🔎 IDENTIFICANDO SISTEMA OPERATIVO"
echo -e "\033[1;32m | $distro $vercion |"
echo ""
echo -e "\033[1;97m ◽️ DESACTIVANDO PASS ALFANUMERICO "
[[ $(dpkg --get-selections | grep -w "libpam-cracklib" | head -1) ]] || barra_intallb "apt-get install libpam-cracklib -y &>/dev/null"
echo -e '# Modulo Pass Simple
password [success=1 default=ignore] pam_unix.so obscure sha512
password requisite pam_deny.so
password required pam_permit.so' >/etc/pam.d/common-password && chmod +x /etc/pam.d/common-password
[[ $(dpkg --get-selections | grep -w "libpam-cracklib" | head -1) ]] && barra_intallb "service ssh restart"
echo ""
msgi -bar2
fun_ip() {
TUIP=$(wget -qO- ipinfo.io/ip || wget -qO- ifconfig.me)
echo "$TUIP" >/root/.ssh/authrized_key.reg
echo -e "\033[1;97m ESTA ES TU IP PUBLICA? \033[32m$TUIP"
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 tu_ip
#read -p " Seleccione [ S / N ]: " tu_ip
[[ "$tu_ip" = "n" || "$tu_ip" = "N" ]] && tu_ip
}
fun_ip
msgi -bar2
echo -e "\033[1;93m AGREGAR Y EDITAR PASS ROOT\033[1;97m"
msgi -bar
echo -e "\033[1;97m CAMBIAR PASS ROOT? \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 pass_root
#read -p " Seleccione [ S / N ]: " tu_ip
[[ "$pass_root" = "s" || "$pass_root" = "S" ]] && pass_root
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"
msgi -bar
read -t 120 -n 1 -rsp $'\033[1;97m Preciona Enter Para continuar\n'
clear && clear
apt update
apt upgrade -y
wget /root/LATAM https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Instalador/LATAM -O /usr/bin/LATAM &>/dev/null
chmod +x /usr/bin/LATAM
}
post_reboot() {
/bin/cp /etc/skel/.bashrc ~/
echo 'LATAM -c' >>.bashrc
}
time_reboot() {
clear && clear
msgi -bar
echo -e "\e[1;93m CONTINUARA INSTALACION DESPUES DEL REBOOT"
echo -e "\e[1;93m O EJECUTE EL COMANDO: \e[1;92mLATAM -c "
msgi -bar
REBOOT_TIMEOUT="$1"
while [ $REBOOT_TIMEOUT -gt 0 ]; do
print_center -ne "-$REBOOT_TIMEOUT-\r"
sleep 1
: $((REBOOT_TIMEOUT--))
done
reboot
}
dependencias() {
dpkg --configure -a >/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"
for i in $soft; do
paquete="$i"
echo -e "\033[1;97m INSTALANDO PAQUETE \e[93m >>> \e[36m $i"
barra_intall "apt-get install $i -y"
done
}
install_paquetes() {
wget /root/LATAM https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Instalador/LATAM -O /usr/bin/LATAM &>/dev/null
chmod +x /usr/bin/LATAM
clear && clear
#------- BARRA DE ESPERA
msgi -bar2
echo -e " \e[5m\033[1;100m =====>> ►► 🖥 SCRIPT | LATAM 🖥 ◄◄ <<===== \033[1;37m"
msgi -bar
echo -e " \033[1;41m -- INSTALACION DE PAQUETES PARA LATAM -- \e[49m"
msgi -bar
dependencias
sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf >/dev/null 2>&1
service apache2 restart >/dev/null 2>&1
[[ $(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_v6 boolean true | sudo debconf-set-selections
msgi -bar2
read -t 30 -n 1 -rsp $'\033[1;97m Preciona Enter Para continuar\n'
}
#SELECTOR DE INSTALACION
while :; do
case $1 in
-s | --start) install_inicial && post_reboot && time_reboot "15" ;;
-c | --continue)
install_paquetes
rm -rf /root/LATAM &>/dev/null
break
;;
-k | --key)
clear && clear
break
;;
*) exit ;;
esac
done
## PASO DOS
Install_key() {
wget /root/LATAM https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Instalador/LATAM -O /usr/bin/LATAM &>/dev/null
chmod +x /usr/bin/LATAM
/bin/cp /etc/skel/.bashrc ~/
clear && clear
SCPdir="/etc/SCRIPT-LATAM"
SCPinstal="$HOME/install"
Filbot="${SCPdir}/botmanager"
Filpy="${SCPdir}/filespy"
Filotros="${SCPdir}/temp"
IP=$(cat /root/.ssh/authrized_key.reg)
function_verify() {
permited=$(curl -sSL "https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Control-IP")
[[ $(echo $permited | grep "${IP}") = "" ]] && {
clear && clear
echo -e "\n\n\n\033[1;91m————————————————————————————————————————————————————\n ¡ESTA KEY NO CONCUERDA CON EL INSTALADOR! \n CONATACTE A @Kalix1\n————————————————————————————————————————————————————\n\n\n"
# [[ -d /etc/SCRIPT-LATAM ]] && rm -rf /etc/SCRIPT-LATAM
exit 1
} || {
### INSTALAR VERSION DE SCRIPT
v1=$(curl -sSL "https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Version")
echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
FIns=$(printf '%(%D-%H:%M:%S)T')
echo "$FIns" >/etc/SCRIPT-LATAM/F-Instalacion
}
}
fun_idi() {
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————————————————————————————————————————————————————"
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://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Ejecutables/rebootnb.sh &>/dev/null
chmod +x /bin/rebootnb
wget -O /etc/SCRIPT-LATAM/temp/version_actual https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Version &>/dev/null
msgi -bar2
echo '#!/bin/sh -e' >/etc/rc.local
sudo chmod +x /etc/rc.local
echo "sudo rebootnb reboot" >>/etc/rc.local
echo "sleep 2s" >>/etc/rc.local
echo "exit 0" >>/etc/rc.local
echo 'clear && clear' >>.bashrc
echo 'rebootnb login >/dev/null 2>&1' >>.bashrc
echo 'echo -e "\033[1;31m————————————————————————————————————————————————————" ' >>.bashrc
echo 'echo -e "\033[1;93m════════════════════════════════════════════════════" ' >>.bashrc
echo 'sudo figlet -w 85 -f smslant " SCRIPT
LATAM" | lolcat' >>.bashrc
echo 'echo -e "\033[1;93m════════════════════════════════════════════════════" ' >>.bashrc
echo 'echo -e "\033[1;31m————————————————————————————————————————————————————" ' >>.bashrc
echo 'mess1="$(less -f /etc/SCRIPT-LATAM/message.txt)" ' >>.bashrc
echo 'echo "" ' >>.bashrc
echo 'echo -e "\033[92m -->> SLOGAN:\033[93m $mess1 "' >>.bashrc
echo 'echo "" ' >>.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://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Version &>/dev/null' >>.bashrc
echo 'echo ""' >>.bashrc
#-BASH SOPORTE ONLINE
wget https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/.exp/scripts/repos/LATAM_Oficial/Fixs%20Remotos/SPR.sh -O /usr/bin/SPR >/dev/null 2>&1
chmod +x /usr/bin/SPR
SPR >/dev/null 2>&1
timeespera="1"
times="10"
if [ "$timeespera" = "1" ]; then
echo -e "\033[1;97m ❗️ REGISTRANDO IP y KEY EN LA BASE ❗️ "
msgi -bar2
while [ $times -gt 0 ]; do
echo -ne " -$times-\033[0K\r"
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=$(wget -qO- ipinfo.io/ip || wget -qO- 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
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 ¡# 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
msgi -ne " \033[1;93m# Verificando Key # : "
cd $HOME
IPL=$(cat /root/.ssh/authrized_key.reg)
wget -O $HOME/lista-arq $(ofus "$Key")/$IPL >/dev/null 2>&1 && echo -e "\033[1;32m Codificacion Correcta" || {
echo -e "\033[1;31m Codificacion Incorrecta"
invalid_key
exit
}
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
sleep 1s
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
invalid_key
fi
}
incertar_key
}
Install_key

View File

@ -0,0 +1,730 @@
#!/bin/bash
#CREADOR Henry Chumo | 25/08/2022
#Alias : @ChumoGH
# -*- ENCODING: UTF-8 -*-
export PATH=$PATH:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin:/usr/games;
fecha=`date +"%d-%m-%y"`;
SCPdir="/etc/adm-lite"
SCPinstal="$HOME/install"
rm -f instala.*
[[ -e /etc/folteto ]] && rm -f /etc/folteto
[[ ! -z $1 ]] && {
rm -f wget*
echo -e " ESPERE UN MOMENTO "
apt-get install curl -y &>/dev/null
apt install sudo -y &> /dev/null
source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg)
COLS=$(tput cols)
os_system(){
system=$(cat -n /etc/issue |grep 1 |cut -d ' ' -f6,7,8 |sed 's/1//' |sed 's/ //')
distro=$(echo "$system"|awk '{print $1}')
case $distro in
Debian)vercion=$(echo $system|awk '{print $3}'|cut -d '.' -f1);;
Ubuntu)vercion=$(echo $system|awk '{print $2}'|cut -d '.' -f1,2);;
esac
link="https://raw.githubusercontent.com/rudi9999/ADMRufu/main/Repositorios/${vercion}.list"
#case $vercion in
#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
}
rutaSCRIPT () {
rm -f setup*
act_ufw() {
[[ -f "/usr/sbin/ufw" ]] && ufw allow 81/tcp ; ufw allow 8888/tcp
}
[[ -z $(cat /etc/resolv.conf | grep "8.8.8.8") ]] && echo "nameserver 8.8.8.8" >> /etc/resolv.conf
[[ -z $(cat /etc/resolv.conf | grep "1.1.1.1") ]] && echo "nameserver 1.1.1.1" >> /etc/resolv.conf
cd $HOME
fun_ip () {
MIP=$(ip addr | grep 'inet' | grep -v inet6 | 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}' | head -1)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
}
fun_install () {
clear
valid_fun
msg -bar
cd $HOME
[[ -e $HOME/lista ]] && rm -f $HOME/lista*
[[ -d ${SCPinstal} ]] && rm -rf ${SCPinstal}
}
## root check
if ! [ $(id -u) = 0 ]; then
clear
echo ""
echo " _________________________________________________"
echo " <09>21<32>21<32>21 Error Fatal!! x000e1 <20>21<32>21<32>21"
echo " _________________________________________________"
echo " <20>40 Este script debe ejecutarse como root! <20>40"
echo " Como Solucionarlo "
echo " Ejecute el script as<61>:"
echo " <20>30 <20>31 "
echo " ( sudo -i )"
echo " sudo su"
echo " Retornando . . ."
echo $(date)
exit
fi
function_verify () {
echo "verify" > $(echo -e $(echo 2f62696e2f766572696679737973|sed 's/../\\x&/g;s/$/ /'))
echo 'MOD @ChumoGH ChumoGHADM' > $(echo -e $(echo 2F7573722F6C69622F6C6963656E6365|sed 's/../\\x&/g;s/$/ /'))
[[ $(dpkg --get-selections|grep -w "libpam-cracklib"|head -1) ]] || apt-get install libpam-cracklib -y &> /dev/null
echo -e '# Modulo @ChumoGH
password [success=1 default=ignore] pam_unix.so obscure sha512
password requisite pam_deny.so
password required pam_permit.so' > /etc/pam.d/common-password && chmod +x /etc/pam.d/common-password
}
verificar_arq () {
[[ ! -d ${SCPdir} ]] && mkdir ${SCPdir}
mv -f ${SCPinstal}/$1 ${SCPdir}/$1 && chmod +x ${SCPdir}/$1
}
fun_ip
valid_fun () {
msg -bar
echo -e ""
echo -e "${cor[2]}\n\033[1;37m Script Patrocinado por: @ChumoGH - Henry Chumo" | pv -qL 12
echo -e ""
msg -bar
echo -e " ${cor[5]} NewScriptADM Mod ChumoGH-ADM REFACTORIZADO "
msg -bar
echo -e "${cor[3]} DESENCADENANDO FICHEROS DE LA KEY "
echo ""
echo '#!/bin/bash
# Creado por @ChumoGH
SCPdir="/etc/adm-lite"
cd ${SCPdir} && ./menu' > /bin/menu && chmod +x /bin/menu
echo '#!/bin/bash
# Creado por @ChumoGH
SCPdir="/etc/adm-lite"
cd ${SCPdir} && ./menu' > /bin/cgh && chmod +x /bin/cgh
echo '#!/bin/bash
# Creado por @ChumoGH
SCPdir="/etc/adm-lite"
cd ${SCPdir} && ./menu' > /bin/adm && chmod +x /bin/adm
msg -bar
echo ""
[[ -e ${SCPdir}/menu_credito ]] && ress="$(cat ${SCPdir}/menu_credito) " || ress="NULL ( no found ) "
echo -ne "${cor[2]}\n\033[1;37m RESELLER : " | pv -qL 50 && sleep 1s && echo -e "\033[0;35m$ress" | pv -qL 50
echo ""
[[ -e ${SCPdir}/cabecalho ]] && bash ${SCPdir}/cabecalho --instalar
}
error_conex () {
[[ -e $HOME/lista-arq ]] && list_fix="$(cat < $HOME/lista-arq)" || list_fix=""
msg -bar
echo -e "\033[41m -- SISTEMA ACTUAL $(lsb_release -si) $(lsb_release -sr) --"
[[ "$list_fix" = "" ]] && {
msg -bar
echo -e " ERROR (PORT 8888 TCP) ENTRE GENERADOR <--> VPS "
echo -e " NO EXISTE CONEXION ENTRE EL GENERADOR "
echo -e " - \e[3;32mGENERADOR O KEYGEN COLAPZADO\e[0m - "
}
invalid_key
}
invalid_key () {
[[ -e $HOME/lista-arq ]] && list_fix="$(cat < $HOME/lista-arq)" || list_fix=''
echo -e ' '
msg -bar
#echo -e "\033[41m -- SISTEMA ACTUAL $(lsb_release -si) $(lsb_release -sr) --"
echo -e " \033[41m-- CPU :$(lscpu | grep "Vendor ID" | awk '{print $3}') SISTEMA : $(lsb_release -si) $(lsb_release -sr) --"
[[ "$list_fix" = "" ]] && {
msg -bar
echo -e " ERROR (PORT 8888 TCP) ENTRE GENERADOR <--> VPS "
echo -e " NO EXISTE CONEXION ENTRE EL GENERADOR "
echo -e " - \e[3;32mGENERADOR O KEYGEN COLAPZADO\e[0m - "
}
[[ "$list_fix" = "KEY INVALIDA!" ]] && {
IiP="$(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}')"
cheklist="$(curl -sSL $IiP:81/ChumoGH/checkIP.log)"
chekIP="$(echo -e "$cheklist" | grep ${Key} | awk '{print $3}')"
chekDATE="$(echo -e "$cheklist" | grep ${Key} | awk '{print $7}')"
msg -bar
echo ""
[[ ! -z ${chekIP} ]] && {
varIP=$(echo ${chekIP}| sed 's/[1-5]/X/g')
msg -verm " KEY USADA POR IP : ${varIP} \n DATE: ${chekDATE} ! "
echo ""
msg -bar
} || {
echo -e " PRUEBA COPIAR BIEN TU KEY "
[[ $(echo "$(ofus "$Key"|cut -d'/' -f2)" | wc -c ) = 18 ]] && echo -e "" || echo -e "\033[1;31m CONTENIDO DE LA KEY ES INCORRECTO"
echo -e " KEY NO COINCIDE CON EL CODEX DEL ADM "
msg -bar
tput cuu1 && tput dl1
}
}
msg -bar
[[ $(echo "$(ofus "$Key"|cut -d'/' -f2)" | wc -c ) = 18 ]] && echo -e "" || echo -e "\033[1;31m CONTENIDO DE LA KEY ES INCORRECTO"
[[ -e $HOME/lista-arq ]] && rm $HOME/lista-arq
cd $HOME
[[ -e ${SCPinstal} ]] && rm -rf ${SCPinstal}
[[ -d $HOME/chumogh ]] && rm -rf $HOME/chumogh
[[ -d ${SCPdir} ]] && rm -rf ${SCPdir}
[[ -d $HOME/chumogh ]] && rm -rf $HOME/chumogh
[[ -e /bin/menu ]] && rm /bin/menu
[[ -e $HOME/chumogh ]] && rm -rf $HOME/chumogh
[[ -e $HOME/log.txt ]] && rm -f $HOME/log.txt
[[ -e /bin/troj.sh ]] && rm -f /bin/troj.sh
[[ -e /bin/v2r.sh ]] && rm -f /bin/v2r.sh
[[ -e /bin/clash.sh ]] && rm -f /bin/clash.sh
rm -f instala.* > /dev/null
rm -f /bin/cgh > /dev/null
rm -rf /bin/ejecutar > /dev/null
figlet " Key Invalida" | boxes -d stone -p a2v1 > error.log
msg -bar >> error.log
echo " Key Invalida, Contacta con tu Provehedor" >> error.log
echo -e ' https://t.me/ChumoGH - @ChumoGH' >> error.log
msg -bar >> error.log
cat error.log | lolcat
#msg -bar
echo -e " \033[1;44m Deseas Reintentar con OTRA KEY\033[0;33m :v"
echo -ne "\033[0;32m "
read -p " Responde [ s | n ] : " -e -i "n" x
[[ $x = @(s|S|y|Y) ]] && funkey || return
}
funkey () {
unset Key
while [[ ! $Key ]]; do
echo 3 > /proc/sys/vm/drop_caches 1> /dev/null 2> /dev/null
sysctl -w vm.drop_caches=3 1> /dev/null 2> /dev/null
swapoff -a && swapon -a 1> /dev/null 2> /dev/null
#[[ -f "/usr/sbin/ufw" ]] && ufw allow 443/tcp ; ufw allow 80/tcp ; ufw allow 3128/tcp ; ufw allow 8799/tcp ; ufw allow 8080/tcp ; ufw allow 81/tcp ; ufw allow 8888/tcp
clear
fun_ip
[[ $(uname -m 2> /dev/null) != x86_64 ]] && {
msg -bar3
echo -e " PROCESADOR ARM DETECTADO "
}
_cpu=$(lscpu | grep "Vendor ID" | awk '{print $3}')
[[ ${_cpu} = "ARM" ]] && _cpu='ARM64 Pro'
msg -bar3
echo -e " \033[41m- CPU: \033[100m$_cpu\033[41m SISTEMA : \033[100m$(lsb_release -si) $(lsb_release -sr)\033[41m -\033[0m"
msg -bar3
echo -e " ${FlT}${rUlq} ScriptADM LITE | MOD @ChumoGH OFICIAL ${rUlq}${FlT} -" | lolcat
msg -bar3
figlet ' . KEY ADM . ' | boxes -d stone -p a0v0 | lolcat
echo " PEGA TU KEY DE INSTALACION " | lolcat
echo -ne " " && msg -bar3
echo -ne " \033[1;41m Key : \033[0;33m" && read Key
tput cuu1 && tput dl1
done
Key="$(echo "$Key" | tr -d '[[:space:]]')"
cd $HOME
IiP=$(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}')
[[ $(curl -s --connect-timeout 5 $IiP:8888 ) ]] && {
tput cuu1 && tput dl1
msg -bar
echo -ne " \e[90m\e[43m CHEK KEY : \033[0;33m"
echo -e " \e[3;32m ENLAZADA AL GENERADOR\e[0m" | pv -qL 50
ofen=$(wget -qO- $(ofus $Key))
tput cuu1 && tput dl1
msg -bar3
echo -ne " \033[1;41m CHEK KEY : \033[0;33m"
tput cuu1 && tput dl1
wget --no-check-certificate -O $HOME/lista-arq $(ofus "$Key")/$IP > /dev/null 2>&1 && echo -ne "\033[1;34m [ \e[3;32m VERIFICANDO KEY \e[0m \033[1;34m]\033[0m" && pkrm=$(ofus "$Key")
} || {
echo -e "\e[3;31mCONEXION FALLIDA\e[0m" && sleep 1s
invalid_key && exit
}
[[ -e $HOME/log.txt ]] && rm -f $HOME/log.txt
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
REQUEST=$(ofus "$Key"|cut -d'/' -f2)
[[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal}
for arqx in $(cat $HOME/lista-arq); do
wget --no-check-certificate -O ${SCPinstal}/${arqx} ${IP}:81/${REQUEST}/${arqx} > /dev/null 2>&1 && verificar_arq "${arqx}"
done
if [[ -e $HOME/lista-arq ]] && [[ ! $(cat $HOME/lista-arq|grep "KEY INVALIDA!") ]]; then
[[ -e ${SCPdir}/menu ]] && {
echo $Key > /etc/cghkey
clear
rm -f $HOME/log.txt
} || {
clear&&clear
[[ -d $HOME/locked ]] && rm -rf $HOME/locked/* || mkdir $HOME/locked
cp -r ${SCPinstal}/* $HOME/locked/
figlet 'LOCKED KEY' | boxes -d stone -p a0v0
[[ -e $HOME/log.txt ]] && ff=$(cat < $HOME/log.txt | wc -l) || ff='ALL'
msg -ne " ${aLerT} "
echo -e "\033[1;31m [ $ff FILES DE KEY BLOQUEADOS ] " | pv -qL 50 && msg -bar
echo -e " APAGA TU CORTAFUEGOS O HABILITA PUERTO 81 Y 8888"
echo -e " ---- AGREGANDO REGLAS AUTOMATICAS ----"
act_ufw
echo -e " Si esto no funciona PEGA ESTOS COMANDOS "
echo -e " sudo ufw allow 81 && sudo ufw allow 8888 "
msg -bar
echo -e " sudo apt purge ufw -y"
invalid_key && exit
}
#systemctl restart rsyslog > /dev/null 2>&1
#systemctl restart rsyslog.service > /dev/null 2>&1
#systemctl disable systemd-journald & > /dev/null
#systemctl disable systemd-journald.service & > /dev/null
#systemd-journald.socket
#systemd-journald-audit.socket
#systemd-journald-dev-log.socket
#[[ -d /var/log/journal ]] && rm -rf /var/log/journal
[[ -d /etc/alx ]] || mkdir /etc/alx
[[ -e /etc/folteto ]] && rm -f /etc/folteto
msg -bar
killall apt apt-get &> /dev/null
fun_install
function_verify
else
invalid_key
fi
sudo sync
echo 3 > /proc/sys/vm/drop_caches
sysctl -w vm.drop_caches=3 > /dev/null 2>&1
}
funkey
}
ofus () {
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]="x";;
"x")txt[$i]=".";;
"5")txt[$i]="s";;
"s")txt[$i]="5";;
"1")txt[$i]="@";;
"@")txt[$i]="1";;
"2")txt[$i]="?";;
"?")txt[$i]="2";;
"4")txt[$i]="0";;
"0")txt[$i]="4";;
"/")txt[$i]="K";;
"K")txt[$i]="/";;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
[[ $1 == "--ban" ]] && {
#xyz=$(curl -sSL "https://www.dropbox.com/s/jzkd6fzey2u0m0g/token.sh")
#ID="$(echo $xyz| awk '{print $2}')"
#TOKEN="$(echo $xyz| awk '{print $1}')"
#urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage"
unset Key
while [[ ! $Key ]]; do
clear
msg -bar3
echo -e " ${FlT}${rUlq} ADM - LITE | MOD @ChumoGH OFICIAL ${rUlq}${FlT} -" | lolcat
msg -bar3
figlet ' . BAN KEY . ' | boxes -d stone -p a0v0 | lolcat
echo " PEGA TU KEY DE VERIFICACION " | lolcat
echo -ne " " && msg -bar3
echo -ne " \033[1;41m Key : \033[0;33m" && read Key
tput cuu1 && tput dl1
done
Key="$(echo "$Key" | tr -d '[[:space:]]')"
echo -e "${Key}" > /etc/cghkey
IiP="$(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}')"
wget -q --no-check-certificate -O /etc/folteto $IiP:81/ChumoGH/checkIP.log
cheklist="$(cat /etc/folteto)"
chekKEY="$(echo -e "$cheklist" | grep ${Key})"
checkID="$(echo -e "${chekKEY}" | grep ${IP} | awk '{print $1}')"
chekIP="$(echo -e "${chekKEY}" | grep ${IP} | awk '{print $3}')"
[[ -z ${chekKEY} || -z ${chekIP} ]] && {
echo 'clear&&clear
echo -e "\n\n\n \033[0;31m==================================================
<20> <20>253 KEY BANEADA <20>253 ! CONTACTE Su ADMINISTRADOR
==================================================
RAZON, NO ES POSIBLE VERIFICAR ESTA KEY
==================================================
\n\n"
' > /bin/menu \
chmod +x /bin/menu
rm -f /etc/folteto
exit && exit
} || {
echo -e "\n\n\n \033[0;32m==================================================
<20> KEY DESBANEADA !
================================================== \n\n"
# MENSAJE="<22>42<34>42<34>42 22<32>351<35>110<31>100<30>111<31>116<31>074<37>105<30>100 <20>115<31>100<30>076<37>104<30>075<37>104<30>077<37>112<31>351 22 22 22 22\n"
# MENSAJE+=" IP : $(wget -qO- ifconfig.me)\n"
# MENSAJE+=" INTENTO FALLIDO \n"
# MENSAJE+=" <20>735017: ${keybot} > $1 \n"
# MENSAJE+=" <20>42 22<32>42<34>42 22 22 22 22 22 22 22<32>42<34>42<34>42<34>42 22 22<32>42<34>42<34>42 22 22<32>42 22<32>42<34>42<34>42<34>42 22<32>42 22<32>42 22 22<32>42<34>42<34>42 22<32>42<34>42 22 22<32>42 22<32>42<34>42 22 22\n"
# MENSAJE+=" IP : ${IP} HORA : $_hora\n"
# MENSAJE+=" 22<32>42 22<32>42<34>42 22 22<32>42<34>42<34>42 22 22<32>42 22 22<32>42 22 22<32>42<34>42 22<32>42 22 22<32>42 22<32>42<34>42<34>42 22 22 22 22<32>42<34>42<34>42 22 22 22<32>42<34>42<34>42 22 22 22<32>42 22 22\n"
# MENSAJE+=' <20>460 Bot generador de key <20>460\n'
# MENSAJE+=' <20>34 By @ChumoGH <20>34 \n'
# MENSAJE+=" 22 22 22 22 22<32>42<34>42 22<32>42 22 22 22<32>42<34>42 22 22 22<32>42 22 22 22<32>42 22 22<32>42<34>42<34>42<34>42<34>42<34>42<34>42<34>42 22 22<32>42<34>42 22<32>42<34>42<34>42<34>42 22<32>42<34>42<34>42 22 22<32>42\n"
#curl -s --max-time 10 -d "chat_id=$ID&disable_web_page_preview=1&text=$(echo -e "$MENSAJE")" $urlBOT &>/dev/null
echo '#!/bin/bash
# Creado por @ChumoGH
SCPdir="/etc/adm-lite"
cd ${SCPdir} && ./menu' > /bin/menu && chmod +x /bin/menu
sleep 2s
exit 0
}
exit && exit
}
function printTitle
{
echo ""
echo -e "\033[1;92m$1\033[1;91m"
printf '%0.s-' $(seq 1 ${#1})
echo ""
}
killall apt apt-get &> /dev/null
TIME_START="$(date +%s)"
DOWEEK="$(date +'%u')"
[[ -e $HOME/cgh.sh ]] && rm $HOME/cgh.*
fun_bar () {
comando[0]="$1"
(
[[ -e $HOME/fim ]] && rm $HOME/fim
${comando[0]} -y > /dev/null 2>&1
touch $HOME/fim
) > /dev/null 2>&1 &
echo -ne "\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 0.5s
tput cuu1
tput dl1
echo -ne "\033[1;33m ["
done
echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
}
msg -bar
printTitle " ORGANIZANDO INTERFAZ DEL INSTALADOR "
echo ""
update_pak () {
echo ""
[[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || apt install pv -y &> /dev/null
os_system
echo -e " [ ! ] ESPERE UN MOMENTO [ ! ]"
[[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] || apt-get install lolcat -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || apt-get install figlet -y &>/dev/null
echo ""
msg -bar
echo -e "\e[1;31m SISTEMA: \e[33m$distro $vercion \e[1;31m CPU: \e[33m$(lscpu | grep "Vendor ID" | awk '{print $3}')"
msg -bar
dpkg --configure -a > /dev/null 2>&1 && echo -e "\033[94m ${TTcent} INTENTANDO RECONFIGURAR UPDATER ${TTcent}" | pv -qL 80
msg -bar
echo -e "\033[94m ${TTcent} UPDATE DATE : $(date +"%d/%m/%Y") & TIME : $(date +"%H:%M") ${TTcent}" | pv -qL 80
[[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || apt-get install net-tools -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "boxes"|head -1) ]] || apt-get install boxes -y &>/dev/null
echo ""
apt-get install software-properties-common -y > /dev/null 2>&1 && echo -e "\033[94m ${TTcent} INSTALANDO NUEVO PAQUETES ( S|P|C ) ${TTcent}" | pv -qL 80
echo ""
echo -e "\033[94m ${TTcent} PREPARANDO BASE RAPIDA INSTALL ${TTcent}" | pv -qL 80
msg -bar
echo " "
#[[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || apt-get install figlet -y -qq --silent &>/dev/null
clear&&clear
rm $(pwd)/$0 &> /dev/null
return
}
clear&&clear
update_pak
clear&&clear
rutaSCRIPT ${distro} ${vercion}
rm -f instala.* lista*
echo -e " Duracion $((($(date +%s)-$TIME_START)/60)) min."
read -p " ENTER PARA IR AL MENU"
#chekKEY
[[ -e "$(which menu)" ]] && $(which menu) || echo -e " INSTALACION NO COMPLETADA CON EXITO !"
} || {
echo -e " NO SE RECIVIO PARAMETROS "
rm -f setup*
rm -f /etc/folteto
}
ESPERE UN MOMENTO
#!/bin/bash
# menu maker (opciones 1, 2, 3,.....)
flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜'
cOpyRig='©' && mbar2=' •••••••••••••••••••••••'
menu_func(){
local options=${#@}
local array
for((num=1; num<=$options; num++)); do
echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") "
array=(${!num})
case ${array[0]} in
"-vd")echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}";;
"-vm")echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}";;
"-fi")echo -e "${array[@]:2} ${array[1]}";;
-bar|-bar2|-bar3|-bar4)echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})";;
*)echo -e "\033[1;37m${array[@]}";;
esac
done
}
selection_fun () {
local selection="null"
local range
for((i=0; i<=$1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do
echo -ne "\033[1;37m ► Opcion : " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
tittle () {
[[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh'
clear&&clear
msg -bar
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 ChumoGH 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
msg -bar
}
in_opcion(){
unset opcion
if [[ -z $2 ]]; then
msg -nazu " $1: " >&2
else
msg $1 " $2: " >&2
fi
read opcion
echo "$opcion"
}
# centrado de texto
print_center(){
if [[ -z $2 ]]; then
text="$1"
else
col="$1"
text="$2"
fi
while read line; do
unset space
x=$(( ( 54 - ${#line}) / 2))
for (( i = 0; i < $x; i++ )); do
space+=' '
done
space+="$line"
if [[ -z $2 ]]; then
msg -azu "$space"
else
msg "$col" "$space"
fi
done <<< $(echo -e "$text")
}
# titulos y encabesados
title(){
clear
msg -bar
if [[ -z $2 ]]; then
print_center -azu "$1"
else
print_center "$1" "$2"
fi
msg -bar
}
# finalizacion de tareas
enter(){
msg -bar
text="►► Presione enter para continuar ◄◄"
if [[ -z $1 ]]; then
print_center -ama "$text"
else
print_center "$1" "$text"
fi
read
}
# opcion, regresar volver/atras
back(){
msg -bar
echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER"
msg -bar
}
msg () {
local colors="/etc/new-adm-color"
if [[ ! -e $colors ]]; then
COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
COLOR[1]='\e[31m' #VERMELHO='\e[31m'
COLOR[2]='\e[32m' #VERDE='\e[32m'
COLOR[3]='\e[33m' #AMARELO='\e[33m'
COLOR[4]='\e[34m' #AZUL='\e[34m'
COLOR[5]='\e[35m' #MAGENTA='\e[35m'
COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
COLOR[7]='\033[1;49;95m'
COLOR[8]='\033[1;49;96m'
else
local COL=0
for number in $(cat $colors); do
case $number in
1)COLOR[$COL]='\033[1;37m';;
2)COLOR[$COL]='\e[31m';;
3)COLOR[$COL]='\e[32m';;
4)COLOR[$COL]='\e[33m';;
5)COLOR[$COL]='\e[34m';;
6)COLOR[$COL]='\e[35m';;
7)COLOR[$COL]='\033[1;36m';;
8)COLOR[$COL]='\033[1;49;95m';;
9)COLOR[$COL]='\033[1;49;96m';;
esac
let COL++
done
fi
NEGRITO='\e[1m'
SEMCOR='\e[0m'
case $1 in
-ne)cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-ama)cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-verm)cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";;
-verm2)cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-aqua)cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-azu)cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-verd)cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-bra)cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}";;
-nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-nverd)cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-verm3)cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";;
-teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-teal2)cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}";;
-blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-blak2)cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}";;
-blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}";;
#-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar1)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar2)ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar3)ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar4)ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
esac
}
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 &
echo -ne "\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;33m ["
done
echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
}
del(){
for (( i = 0; i < $1; i++ )); do
tput cuu1 && tput dl1
done
}
[[ -d /bin/ejecutar ]] && {
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg
} || mkdir /bin/ejecutar
cor[0]="\033[0m"
cor[1]="\033[1;34m"
cor[2]="\033[1;32m"
cor[3]="\033[1;37m"
cor[4]="\033[1;36m"
cor[5]="\033[1;33m"
cor[6]="\033[1;35m"
export -f msg
export -f fun_bar
export -f tittle
export -f enter
export -f back
export -f print_center
export -f in_opcion
export -f del
Key="$(echo "$Key" | tr -d '[[:space:]]')"
cd $HOME
IiP=$(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}')
[[ $(curl -s --connect-timeout 5 $IiP:8888 ) ]] && {
tput cuu1 && tput dl1
msg -bar
echo -ne " \e[90m\e[43m CHEK KEY : \033[0;33m"
echo -e " \e[3;32m ENLAZADA AL GENERADOR\e[0m" | pv -qL 50
ofen=$(wget -qO- $(ofus $Key))
tput cuu1 && tput dl1
msg -bar3
echo -ne " \033[1;41m CHEK KEY : \033[0;33m"
tput cuu1 && tput dl1
wget --no-check-certificate -O $HOME/lista-arq $(ofus "$Key")/$IP > /dev/null 2>&1 && echo -ne "\033[1;34m [ \e[3;32m VERIFICANDO KEY \e[0m \033[1;34m]\033[0m" && pkrm=$(ofus "$Key")
} || {
echo -e "\e[3;31mCONEXION FALLIDA\e[0m" && sleep 1s
invalid_key && exit
}
[[ -e $HOME/log.txt ]] && rm -f $HOME/log.txt
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
REQUEST=$(ofus "$Key"|cut -d'/' -f2)
[[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal}
for arqx in $(cat $HOME/lista-arq); do
wget --no-check-certificate -O ${SCPinstal}/${arqx} ${IP}:81/${REQUEST}/${arqx} > /dev/null 2>&1 && verificar_arq "${arqx}"
done
if [[ -e $HOME/lista-arq ]] && [[ ! $(cat $HOME/lista-arq|grep "KEY INVALIDA!") ]]; then
[[ -e ${SCPdir}/menu ]] && {
echo $Key > /etc/cghkey
clear
rm -f $HOME/log.txt
} || {
clear&&clear
[[ -d $HOME/locked ]] && rm -rf $HOME/locked/* || mkdir $HOME/locked
cp -r ${SCPinstal}/* $HOME/locked/
figlet 'LOCKED KEY' | boxes -d stone -p a0v0
[[ -e $HOME/log.txt ]] && ff=$(cat < $HOME/log.txt | wc -l) || ff='ALL'
msg -ne " ${aLerT} "
echo -e "\033[1;31m [ $ff FILES DE KEY BLOQUEADOS ] " | pv -qL 50 && msg -bar
echo -e " APAGA TU CORTAFUEGOS O HABILITA PUERTO 81 Y 8888"
echo -e " ---- AGREGANDO REGLAS AUTOMATICAS ----"
act_ufw
echo -e " Si esto no funciona PEGA ESTOS COMANDOS "
echo -e " sudo ufw allow 81 && sudo ufw allow 8888 "
msg -bar
echo -e " sudo apt purge ufw -y"
invalid_key && exit
}