2025-05-26 15:48:09 -06:00

329 lines
12 KiB
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
[[ -e /etc/adm-lite/v-local.log ]] && _Va=$(cat /etc/adm-lite/v-local.log)
_double=$(curl -sSL "https://gitea.com/drowkid01/scriptdk1/raw/branch/main/Control/Control-BOT")
killall apt >/dev/null 2>&1 &
service dropbear stop > /dev/null 2>&1
service sshd restart > /dev/null 2>&1
service dropbear restart > /dev/null 2>&1
sudo dpkg --configure -a
apt update -y && apt upgrade -y
apt autoremove -y && apt autoclean -y
clear&&clear
[[ -d /etc/alx ]] || mkdir /etc/alx
foxvalid="/etc/$1" && [[ ! -d ${foxvalid} ]] && exit
print_center(){
local x
local y
text="$*"
x=$(( ($(tput cols) - ${#text}) / 2))
echo -ne "\E[6n";read -sdR y; y=$(echo -ne "${y#*[}" | cut -d';' -f1)
echo -ne "\033[${y};${x}f$*"
}
verificar_arq () {
echo "$1" >> $HOME/log.txt
echo -e "$1"
}
fun_limpram() {
sync
echo 3 >/proc/sys/vm/drop_caches
sync && sysctl -w vm.drop_caches=3
sysctl -w vm.drop_caches=0
swapoff -a
swapon -a
rm -f /tmp/*
killall kswapd0
killall tcpdump
killall ksoftirqd
systemctl restart rsyslog.service
systemctl restart systemd-journald.service
[[ -e /etc/adm-lite/modulos ]] && rm -f /etc/adm-lite/modulos
[[ -e /etc/folteto ]] && rm -f /etc/folteto
echo " @drowkid01 " > /var/log/auth.log
sleep 5s
}
function aguarde() {
helice() {
fun_limpram >/dev/null 2>&1 &
tput civis
while [ -d /proc/$! ]; do
for i in / - \\ \|; do
sleep .1
echo -ne "\e[1D$i"
done
done
tput cnorm
}
echo -ne "\033[1;37m VALIDANDO Y OPTIMIZANDO UPDATE \033[1;32m ${_Va} \033[1;37ma \033[1;32m$(cat /bin/ejecutar/v-new.log)\033[1;32m.\033[1;33m.\033[1;31m. \033[1;33m"
helice
echo -e "\e[1DOk"
sleep 4s
}
invalid_key () {
[[ $1 == '--ban' ]] && {
cd $HOME
service ssh stop
[[ -d $HOME/chumogh ]] && rm -rf $HOME/chumogh
[[ -d /etc/adm-lite ]] && rm -rf /etc/adm-lite
[[ -e /etc/cghkey ]] && rm -f /etc/cghkey
[[ -e /bin/menu ]] && rm /bin/menu
[[ -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/xr.sh ]] && rm -f /bin/xr.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
echo -e "$(msg -bar)" >> error.log
echo " KEY NO PERMITIDA, ADQUIERE UN RESELLER OFICIAL" >> error.log
echo " ----------------------------------------------" >> error.log
echo " KEY NO PERMITIDA, ADQUIERE UN RESELLER OFICIAL" >> error.log
echo " ----------------------------------------------" >> error.log
echo -e ' https://t.me/ChumoGH - @drowkid01' >> error.log
echo -e "$(msg -bar)" >> error.log
cat error.log | lolcat
echo 'clear&&clear
echo -e "\n\n\n \033[0;31m==================================================
¡ 🚫 DROPLET BANEADA 🚫 ! KEY USADA O REGISTRADA NO OFICIAL
================================================== \n\n
SI CONSIDERA QUE FUE UN ERROR, TECLEA ** cgh **
"
' > /bin/menu
exit&&exit&&exit&&exit
}
}
valid(){
[[ -e $HOME/log.txt ]] && rm -f $HOME/log.txt
[[ -e /etc/adm-lite/PDirect.py ]] && mv /etc/adm-lite/PDirect.py /bin/ejecutar/PDirect.py
Key=$1
echo " $Key "
_sys="$(lsb_release -si)-$(lsb_release -sr)"
new_id=$(uuidgen)
wget --no-check-certificate -O $HOME/lista-arq $(ofus "$Key")/$(wget -qO- ipv4.icanhazip.com)/UPDATE/${new_id} > /dev/null 2>&1 && {
chmod 777 $HOME/lista-arq
}
[[ $(cat < $HOME/lista-arq) = "KEY INVALIDA!" || $(cat < $HOME/lista-arq) = "" ]] && {
echo "KEY INVALIDA O CADUCADA"
} || {
n=1
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
_checkBT="$(echo -e "$_double"|grep "$IP")"
if [ -z "${_checkBT}" ]; then
rm -f $HOME/lista*
tput cuu1 && tput dl1
echo -e "\n\e[3;31mRECHAZADA, POR GENERADOR NO AUTORIZADO!!\e[0m\n" && sleep 1s
echo
echo -e "\e[3;31mESTE USUARIO NO ESTA AUTORIZADO !!\e[0m" && sleep 1s
invalid_key "--ban"
exit
tput cuu1 && tput dl1
fi
SCPinstal="./update"
REQUEST=$(ofus "$Key"|cut -d'/' -f2)
[[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal}
pontos="."
stopping=" COMPROBANDO "|sed -e 's/[^a-z -]//ig'
for arqx in $(cat $HOME/lista-arq); do
msg -verm "${stopping} ${pontos}" && sleep 0.2s
wget --no-check-certificate -O $HOME/update/${arqx} ${IP}:81/${REQUEST}/${arqx} > /dev/null 2>&1 && verificar_arq "${arqx}"
tput cuu1 && tput dl1
pontos+="."
n=$(($n + 1))
done
echo "$(cat < $HOME/log.txt | wc -l)"
for arqs in `ls $HOME/update`; do
fun_filez $arqs
sleep 1s
tput cuu1 && tput dl1
done
echo ${Key} > /etc/cghkey
echo -e "$(cat /etc/adm-lite/menu_credito|head -1)" > /bin/ejecutar/menu_credito && chmod +x /bin/ejecutar/menu_credito
[[ -e /etc/adm-lite/vencidos ]] && rm /etc/adm-lite/vencidos
[[ -e /etc/adm-lite/onlines ]] && rm /etc/adm-lite/onlines
[[ -e /bin/ejecutar/uskill ]] && ukk=$(cat /bin/ejecutar/uskill) || echo 0 > /bin/ejecutar/uskill
[[ $ukk = "" ]] && echo 0 > /bin/ejecutar/uskill
[[ -e $HOME/lista-arq ]] && rm $HOME/lista-arq
[[ -d $HOME/update ]] && rm -rf $HOME/update
[[ -e /bin/ejecutar/PDirect.py ]] && mv /bin/ejecutar/PDirect.py /etc/adm-lite/PDirect.py
[[ -e /bin/ejecutar/usCONEXT ]] && rm -f /bin/ejecutar/usCONEXT
[[ -e /bin/ejecutar/usCONEXC ]] && rm -f /bin/ejecutar/usCONEXC
[[ "$lista_atualizados" != "" ]] && echo -e "${cor[5]} $lista_atualizados ${txt[206]}" && {
tput cuu1 && tput dl1 && echo -e " ${_upd}"
echo -e "$(curl -sSL https://gitea.com/drowkid01/scriptdk1/raw/branch/main/Recursos/cabecalho/changelogs.log)"
[[ $(cat < $HOME/log.txt | wc -l ) -ge 10 ]] && echo $Key > /etc/cghkey && chmod 777 /etc/cghkey
}|| echo -e " \033[1;45m NO $lista_atualizados ${txt[208]}\033[0m"
[[ -e /bin/ejecutar/echo-ram.sh ]] && bash /bin/ejecutar/echo-ram.sh > /dev/null 2>&1
}
}
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
}
fun_filez () {
arq="/etc/adm-lite/$1"
arq2="$HOME/update/$1"
[[ ! -e "/etc/adm-lite/$1" ]] && {
mv -f $arq2 $arq
return
}
equal=$(diff -q $arq $arq2)
[[ "$equal" = "" ]] && rm $arq2 || {
mv -f $arq2 $arq
chmod +x $arq
lista_atualizados=$(($lista_atualizados + 1))
echo -e " \033[1;32m ♳ ➢ $1 - ${txt[205]}!"
_upd+="FILE ${lista_atualizados} : /bin/$1 -> FIXED \n"
tput cuu1 && tput dl1
sleep 0.2s
}
}
namsobin ()
{
echo -e "\033[1;37m 【 ★ ACTUALIZADOR ChumoGH ADM ★ 】\033[0m"
msg -bar
echo -e "$barra"
echo -e "\033[92m -- INSTALANDO PAQUETES AÃADIDOS -- "
echo -e "$barra"
echo -ne "\033[97m # REPACK BUILD MOD .................... "
(
wget -q -O /bin/ejecutar/msg https://gitea.com/drowkid01/scriptdk1/raw/branch/main/msg-bar/msg
[[ $(dpkg --get-selections|grep -w "bsdmainutils"|head -1) ]] || apt-get install bsdmainutils -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "psmisc"|head -1) ]] || apt-get install psmisc -y &>/dev/null
) && ESTATUS=`echo -e "\033[92m FIXED"` &>/dev/null || ESTATUS=`echo -e "\033[91mERROR AL PARCHAR"` &>/dev/null
echo -e "$ESTATUS "
apt install bc -y &>/dev/null
echo -ne "\033[97m # REPACK NEW FUNCION ..................."
(echo 'source <(curl -sSL https://gitea.com/drowkid01/scriptdk1/raw/branch/main/Recursos/cabecalho/free-men.sh)' > /bin/ejecutar/echo-ram.sh
wget -q -O /var/www/html/index.html https://gitea.com/drowkid01/scriptdk1/raw/branch/main/html/index.html && cp /var/www/html/index.html /var/www/index.html
wget https://gitea.com/drowkid01/scriptdk1/raw/branch/main/Recursos/killSSH.sh &>/dev/null -O /bin/killssh &>/dev/null
echo 'wget --no-check-certificate -q -O /bin/ejecutar/v-new.log https://gitea.com/drowkid01/scriptdk1/raw/branch/main/Recursos/cabecalho/v-new.log' >> /bin/ejecutar/echo-ram.sh && bash /bin/ejecutar/echo-ram.sh) && ESTATUS=`echo -e "\033[92mAGREGADAS"` &>/dev/null || ESTATUS=`echo -e "\033[91mFALLO EN AÃADIR"` &>/dev/null
echo -e "$ESTATUS "
clavlink="$(curl -sSL https://gitea.com/drowkid01/scriptdk1/raw/branch/main/Recursos/cabecalho/passwd)"
msg -bar
echo -e " SI DESEAS MANTENER TU VERSION \n SOLO PRESIONA ENTER"
msg -bar
[[ -z $entrada ]] && read -p " PEGA TU KEY: " passw
if [[ -z $passw ]]; then
permited="$clavlink"
else
keyupdate=$passw
permited=$(ofus $passw)
passw=$permited
fi
if [[ $permited = $passw ]]; then
clear
[[ -e /root/name ]] && figlet -p -f smslant < /root/name | lolcat || echo -e "\033[7;49;35m =====>>►► 🐲 New ChumoGH��VPS 🐲 ◄◄<<===== \033[0m"
echo -e "\033[1;37m 【 ★ Reseller : $(cat < /bin/ejecutar/menu_credito) 2022 ★ 】\033[0m"
msg -bar
echo -e " \033[41m-- Arch : $(lscpu | grep "Vendor ID" | awk '{print $3}') SISTEMA $(lsb_release -si) $(lsb_release -sr) --"
msg -bar
echo -e "\033[1;37m VERIFICANDO TU KEY DE ACTUALIZACION......" | pv -qL 40
msg -bar
cd $HOME
[[ -d $HOME/update ]] && rm -rf $HOME/update
[[ -e $HOME/lista ]] && rm $HOME/lista
cd $HOME
[[ -z $keyupdate ]] && permited=$(cat < /etc/cghkey) || permited=$keyupdate
echo -e "\033[1;37m TU KEY RESGISTRADA "
[[ -e /etc/cghkey ]] && echo -e "\033[1;36m\033[1;33m【$(cat /etc/cghkey)】" | pv -qL 25 || echo "qra-atsil$(date | md5sum | head -c10)8888:$(ofus $(wget -qO- ifconfig.me))" > /etc/cghkey
[[ $(cat < /etc/cghkey) = $permited ]] && {
echo -e "\033[1;36m\033[1;33m 【 KEY INVALIDA PARA UPDATE 】"
unset permited
[[ -z $permited ]] && wget --no-check-certificate -O lista https://gitea.com/drowkid01/scriptdk1/raw/branch/main/Recursos/cabecalho/lista -o /dev/null && atualiza_fun
} || {
echo -e "\033[1;36m\033[1;33m 【 REG KEY NUEVA PARA UPDATE 】"
[[ ! -z $permited ]] && valid "$keyupdate"
}
else
clear
msg -bar
echo -e "\033[1;37m LA CONTRASEÃA o KEY NO COINCIDE "
echo -e "\033[1;37m ACTUALIZACION NO AUTORIZADA !"
echo -e "\033[1;37m Contacte con Vendedor de la KEY"
msg -bar
sleep 1
fi
}
atualiza_fun () {
echo -e " UPDATE LOCAL "
tput cuu1 && tput dl1
msg -bar
cd $HOME
[[ ! -d ./update ]] && mkdir ./update
cd ./update
wget -i $HOME/lista -o /dev/null
[[ -e gerar.sh ]] && rm -f gerar.sh
for arqs in `ls $HOME/update`; do
fun_filez $arqs
sleep 1.5s
done
[[ -e /etc/adm-lite/vencidos ]] && rm /etc/adm-lite/vencidos
[[ -e /etc/adm-lite/onlines ]] && rm /etc/adm-lite/onlines
[[ -e /bin/ejecutar/uskill ]] && ukk=$(cat /bin/ejecutar/uskill) || echo 0 > /bin/ejecutar/uskill
[[ $ukk = "" ]] && echo 0 > /bin/ejecutar/uskill
[[ -e $HOME/lista ]] && rm $HOME/lista
[[ -d $HOME/update ]] && rm -rf $HOME/update
[[ "$lista_atualizados" != "" ]] && echo -e "${cor[5]} $lista_atualizados ${txt[206]}" && echo -e "$(curl -sSL https://gitea.com/drowkid01/scriptdk1/raw/branch/main/Recursos/cabecalho/changelogs.log)" || echo -e " \033[1;45m NO $lista_atualizados ${txt[208]}\033[0m"
[[ -e /bin/ejecutar/echo-ram.sh ]] && bash /bin/ejecutar/echo-ram.sh > /dev/null 2>&1
[[ -e /etc/adm-lite/idioma ]] && rm /etc/adm-lite/idioma
}
cor[1]="\033[1;36m"
cor[2]="\033[1;32m"
cor[3]="\033[1;31m"
cor[4]="\033[1;33m"
cor[0]="\033[1;37m"
txt[206]="Actualizado(s)!"
txt[208]="Existe Actualizacion Pendiente!"
txt[207]="Valid!!!"
txt[203]="⊘ ➢"
txt[204]="♳ ➢"
txt[205]="✓"
[[ -e /bin/ejecutar/menu_credito ]] && echo "" || echo "$(cat /etc/adm-lite/menu_credito|head -1))" > /bin/ejecutar/menu_credito && chmod +x /bin/ejecutar/menu_credito
catress=$(cat < /bin/ejecutar/menu_credito)
[[ -z $catress ]] && echo "Verified【 New @drowkid01 2021" > /bin/ejecutar/menu_credito
namsobin
echo "Verified【 $(cat /bin/ejecutar/menu_credito)" > /bin/ejecutar/exito
[[ -z $(cat /etc/adm-lite/menu_credito|head -1) ]] && echo "Verified【 New @drowkid01 2021" > /root/exito
sleep 0.5s
msg -bar
echo -e " \033[1;45m $(cat < /bin/ejecutar/exito)© 】 $(cat /bin/ejecutar/v-new.log)\033[0m"
[[ -e $HOME/name ]] && mv /root/name /bin/ejecutar/
msg -bar
cd $HOME
for _pids_ in `atq | awk '{print $1}'`; do
atrm $_pids_
done
echo -e " ESPERE MIENTRAS VALIDAMOS SU KEY "
echo ""
aguarde
echo ""
echo -e " VUELVA A INGRESAR PARA VALIDAR ACTUALIZACION"
msg -bar
killall kswapd0 > /dev/null 2>&1
killall ksoftirqd > /dev/null 2>&1
killall menu_inst > /dev/null 2>&1
killall -y 5s tcpdump > /dev/null 2>&1
echo -e "${cor[0]} SALIENDO " | pv -qL 50
sleep 2s
exit&&exit