From bdbaec0b9251feafa590638ba73cbef23696ed4a Mon Sep 17 00:00:00 2001 From: "@drowkid01" Date: Mon, 26 May 2025 21:24:35 -0600 Subject: [PATCH] @drowkid1 --- .instaladorBot.sh.swp | Bin 1024 -> 0 bytes init.sh | 31 ++++++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) delete mode 100644 .instaladorBot.sh.swp diff --git a/.instaladorBot.sh.swp b/.instaladorBot.sh.swp deleted file mode 100644 index bc8b6178eb5a2010010b5f25fd8ce6025be2dbd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1024 zcmYc?$V<%2S1{4DU_b%?{Mi_a^7Bhj1aWY3@{<#DGV+TFDbCC*E=kNuOvx{D$}iC? S&cI>ZsPJeAjD`T6LI41iZV)&C diff --git a/init.sh b/init.sh index 9a4835b..cc33d6a 100755 --- a/init.sh +++ b/init.sh @@ -1,5 +1,6 @@ #!/bin/bash flech='=>' +#==>> funciones generales. menu_func(){ local options=${#@} local array @@ -79,7 +80,7 @@ enter(){ # opcion, regresar volver/atras back(){ msg -b - echo -ne " \033[0;35m [\033[0;36m0\033[0;35m]\033[0;33m ${flech} \e[1;37m\e[41mSALIR\e[0m\n" + echo -ne " \033[1;30m [\033[1;36m0\033[1;30m] <<====>> [\e[48;5;99m#\e[1;37mSALIR\e[1;30m]\e[0m\n" msg -b } @@ -218,6 +219,7 @@ export -f enter export -f back export -f print_center export -f del printext mportas +#==>> instalador unset -v sdir sdir[0]='/etc/adm-db' sdir[1]='/usr/local/lib/exec-dk' @@ -297,12 +299,13 @@ soft='bc gawk jq screen curl socat netcat netstat netcat-traditional net-tools c } } - msg -bar&&enter + enter ;; esac } download(){ +local urL='https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main' case $1 in -s | --script) #url=( "https://www.dropbox.com/s/3ujxegx15hoh1w2/SCRIPT-LATAM.zip" "https://www.dropbox.com/s/o3wyvhaxxb5sj8h/SCRIPTMX.zip" "https://raw.githubusercontent.com/kelokepe/scriptcgh/main/Control/chukk.tar") @@ -420,15 +423,16 @@ if [[ $1 == @('-i'|'--install') ]]; then download --script download --botgen elif [[ $1 == @('-m'|'--menu') ]]; then +#==>>> menĂº botgen clear&&clear figlet 'BOTGEN'|lolcat echo -ne "\e[1;30m[#\e[1;34mIP: \e[1;36m$(cat /usr/local/lib/exec-dk/ipdk)\e[1;30m] \e[1;30m[#\e[0;34mversion: \e[1;36mv1.1\e[1;30m]\n" msg -b unset pb pB ph pH - [[ $(systemctl status BotGen) == 'inactive' ]] && { + [[ $(systemctl is-active BotGen|grep -w 'inactive') == 'inactive' ]] && { pb="\e[1;31m[OFF]"&&pB="\e[1;32mACTIVAR/INICIAR BOTGEN" } || { pb="\e[1;32m[ON] "&&pB="\e[1;31mAPAGAR BOTGEN"; } - [[ $(systemctl status http-server) == 'inactive' ]] && { + [[ $(systemctl is-active http-server|grep -v grep|grep 'inactive') == 'inactive' ]] && { ph="\e[1;31m[OFF]"&&pH="\e[1;32mACTIVAR/INICIAR GEN/SERVER" } || { ph="\e[1;32m[ON] "&&pH="\e[1;31mDESACTIVAR GEN/SERVER" ; } for i in `seq 0 2`; do @@ -459,7 +463,7 @@ elif [[ $1 == @('-m'|'--menu') ]]; then case $(selection_fun 2) in 0) ./$0 --menu;; 1)packages -i&&download --botgen;; - 2)packages -i&&download --scripts;; + 2)packages -i&&download --script;; esac ;; 3) @@ -474,27 +478,28 @@ elif [[ $1 == @('-m'|'--menu') ]]; then lnk="https://api.telegram.org/bot$token/sendMessage" curl -s --max-time 10 -d "chat_id=$id&disable_web_page_preview=1&text=$msj" $lnk >/dev/null 2>&1 echo -e "\e[1;32m[+] mensaje enviado exitosamente [+]" - enter&&./$0 --menu + $0 --menu ;; 6) - if systemctl status BotGen|grep -w 'active' >/dev/null 2>&1; then + if [[ $(systemctl is-active BotGen) != 'inactive' ]]; then msg -r 'BOTGEN APAGADO CORRECTAMENTE' - systemctl stop BotGen >/dev/null + eval $(systemctl stop BotGen) else msg -v "BOTGEN ACTIVADO CORRECTAMENTE" - systemctl start BotGen >/dev/null 2>&1 + eval $(systemctl start BotGen) fi enter&&./$0 --menu ;; 7) - if systemctl status http-server|grep -w 'active' >/dev/null 2>&1; then + if [[ $(systemctl is-active http-server) == 'active' ]]; then msg -r 'GENERADOR APAGADO CORRECTAMENTE' - systemctl stop http-server >/dev/null + systemctl stop http-server else msg -v "GENERADOR ACTIVADO CORRECTAMENTE" - systemctl start http-server >/dev/null 2>&1 + systemctl start http-server fi - enter&&./$0 -m + enter + $0 --menu ;; *);; esac