From ed0838c08b3d4f25dc4692980ebfecfa950d3d52 Mon Sep 17 00:00:00 2001 From: Qm90R2VuIDIwMjQgQ2h1bW9HSCsK Date: Mon, 10 Jun 2024 17:19:56 -0500 Subject: [PATCH] Add files via upload --- init.M/BotGen.sh | 2606 ++++++++++++++++++++++++++++++++++++++++++++++ init/setup.bot | 866 +++++++++++++++ init/setup.gen | 304 ++++++ 3 files changed, 3776 insertions(+) create mode 100644 init.M/BotGen.sh create mode 100644 init/setup.bot create mode 100644 init/setup.gen diff --git a/init.M/BotGen.sh b/init.M/BotGen.sh new file mode 100644 index 0000000..278bd5f --- /dev/null +++ b/init.M/BotGen.sh @@ -0,0 +1,2606 @@ +#!/bin/bash +# -*- ENCODING: UTF-8 -*- +#https://github.com/joao-lucas/ShellBot + +#TOKEN BOT +bot_token=$1 +#ID ADMINISTRADOR +permited=$2 +#NOMBRE-USUARIOS-FILE +usersAUTH=$3 +#ALIAS DE ADMINISTRADOR +alias_admin=$4 +[[ -z ${bot_token} ]] && exit +[[ -z ${permited} ]] && exit +[[ -z ${usersAUTH} ]] && usersAUTH=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1) +[[ -z ${alias_admin} ]] && exit +#permited=$(echo -e "${permited}" | awk '{print $1}') +CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} +CIDimg=/etc/tokenIMG && [[ ! -d ${CIDimg} ]] && mkdir ${CIDimg} +SRC="${CIDdir}/sources" && [[ ! -d ${SRC} ]] && mkdir ${SRC} +CID="${CIDdir}/User-${usersAUTH}" && [[ ! -e ${CID} ]] && echo > ${CID} +keytxt="${CIDdir}/keys" && [[ ! -d ${keytxt} ]] && mkdir ${keytxt} +[[ -d /root/RegBOT ]] || mkdir /root/RegBOT +timg="${CIDimg}/img" && [[ ! -d ${timg} ]] && mkdir ${timg} +[[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || apt-get install jq -y &>/dev/null +#[[ ! -e "/bin/ShellBot.sh" ]] && wget -O /bin/ShellBot.sh https://www.dropbox.com/s/iyce2b0e180wynr/ShellBot.sh &> /dev/null +[[ ! -e "/bin/ShellBot.sh" ]] && wget -O /bin/ShellBot.sh https://raw.githubusercontent.com/ChumoGH/ADMcgh/main/BINARIOS/ShellBot/ShellBot.sh &> /dev/null +[[ -e /etc/texto-bot ]] && rm /etc/texto-bot +LINE=" ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" +[[ ! -e /etc/urlCT ]] && echo "" > /etc/urlCT +[[ ! -e /etc/urlDN ]] && echo "" > /etc/urlDN +_fecha=`date +%d-%m-%y` +#_hora=$(printf '%(%D-%H:%M:%S)T') +_hora=$(date +"%H:%M:%S") +source <(curl -sSL https://www.dropbox.com/s/w2ic8ewvfk6zpp5/tokenapis.sh) +_globales=$(curl -sSL "https://www.dropbox.com/s/5hr0wv1imo35j1e/Control-Bot.txt" | cut -d '|' -f1) + + +# Importando API +source ShellBot.sh + +[[ -e ${SRC}/menu ]] && source ${SRC}/menu +#[[ -e ${SRC}/ayuda ]] && source ${SRC}/ayuda +[[ -e ${SRC}/cache ]] && source ${SRC}/cache +[[ -e ${SRC}/invalido ]] && source ${SRC}/invalido +[[ -e ${SRC}/status ]] && source ${SRC}/status +[[ -e ${SRC}/reinicio ]] && source ${SRC}/reinicio +[[ -e /bin/ejecutar/IPcgh ]] && _myIP=$(cat < /bin/ejecutar/IPcgh) +#[[ -e ${SRC}/id ]] && source ${SRC}/id +[[ -e ${SRC}/back_ID ]] && source ${SRC}/back_ID +[[ -e ${SRC}/link ]] && source ${SRC}/link +#[[ -e ${SRC}/listID ]] && source ${SRC}/listID +[[ -e ${SRC}/gerar_key ]] && source ${SRC}/gerar_key +[[ -e ${SRC}/power ]] && source ${SRC}/power +#[[ -e ${SRC}/comandos ]] && source ${SRC}/comandos +[[ -e ${SRC}/donar ]] && source ${SRC}/donar +[[ -e ${SRC}/costes ]] && source ${SRC}/costes +#source ${SRC}/kill_drop.sh +titulosC='Bienvenido al BotGen ADMcgh/Plus' + + +# Inicializando el bot +ShellBot.init --token "$bot_token" --monitor --flush --return map +ShellBot.username + + + + +comand () { + if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then + if [[ $(cat ${CID}|grep "${chatuser}") = "" ]]; then + case ${comando[0]} in + /[Ii]d|/[Ii]D)myid_src &;; + /[Mm]enu|[Mm]enu|/[Ss]tart|[Ss]tart|[Cc]omensar|/[Cc]omensar)menu_src &;; + /[Aa]yuda|[Aa]yuda|[Hh]elp|/[Hh]elp)ayuda_src &;; + /[Dd]onar|[Dd]onar)donar &;; + /[Ii]mg|[Ii]mg)reply &;; + /[Pp]rice|[Pp]price|[Pp]rices|/[Pp]rices)prices_on &;; + /sendid)send_ID &;; + /chekid)send_ID &;; + /kfree) kads &;; + #/folteto)reply &;; + /[Uu]pfile|[Uu]pfile|[Uu]pfile|/[Uu]pfile)reply &;; + /[Tt]erm|[Tt]erm)call.terminos &;; + /[Cc]upon|[Cc]upon)reply &;; + /[Rr]cupon|[Rr]cupon)call.cange.cuponC "${comando[1]}" &;; + /*|*)invalido_fun &;; + esac + if [[ ${message_reply_to_message_message_id[$id]} ]]; then + case ${message_reply_to_message_text[$id]} in + '/cupon')call.cange.cupon;; + '/hsjdhsdhjsgdf')Cat.BOTON;; + #*)invalido_fun;; + esac + return + fi + else + if [[ ${message_text[$id]} || ${callback_query_data[$id]} ]]; then + case ${comando[0]} in + /[Mm]enu|[Mm]enu|/[Ss]tart|[Ss]tart|[Cc]omensar|/[Cc]omensar)menu_src &;; + /[Aa]yuda|[Aa]yuda|[Hh]elp|/[Hh]elp)ayuda_src &;; + /[Ii]d|/[Ii]D)myid_src &;; + /[Ii]nstal)link_src &;; + /[Kk]eygen)gerar_key &;; + /[Rr]estart)call.revoc &;; + /[Kk]ltm)gerar_keyLTM &;; + /[Bb]anIP|[Bb]anIP)reply &;; + /[Pp]rice|[Pp]price|[Pp]rices|/[Pp]rices)prices_on &;; + /[Dd]onar|[Dd]onar)donar &;; + /[Uu]pfile|[Uu]pfile|[Uu]pfile|/[Uu]pfile)reply & ;; + /[Aa]ddrev|/[Rr]emote|/folteto)reply &;; + /[Dd]omainA|[Dd]omainA|[Dd]omainNS|/[Dd]omainNS|/domainns|/domaina)reply &;; + /[Cc]cupon|[Cc]cupon)reply &;; + /upfile)reply &;; + /*|*)invalido_fun &;; + esac + fi + if [[ ${message_reply_to_message_message_id[$id]} ]]; then + case ${message_reply_to_message_text[$id]} in + #'/domainA')call.domainA;; + /[Dd]omainA|[Dd]omainA|/domaina)call.domainA;; + '/remote')call.remote;; + #'/domainNS')call.domainNS;; + [Dd]omainNS|/[Dd]omainNS|/domainns)call.domainNS;; + '/addrev')addID_reventa;; + '/banIP')killIP_reply;; + '/upfile')download_FAC;; + '/folteto')dupdate2;; + '/img')img_reply;; + '/ccupon')call.CrearCuponNew ;; + #'/cupon')call.cange.cupon ;; + *)invalido_fun;; + esac + return + fi + sleep .1 + fi + else + if [[ ${message_reply_to_message_message_id[$id]} ]]; then + case ${message_reply_to_message_text[$id]} in + '/del')deleteID_reply;; + '/chat')call.msgENV;; + '/remote')call.remote;; + '/domainA')call.domainA;; + '/domainNS')call.domainNS;; + '/add')addID_reply;; + '/addrev')addID_reventa;; + '/buscar')searchID_reply;; + '/banID')call.banID;; + '/Uban')call.UbanID;; + '/banIP')killIP_reply;; + '/upfile')download_FAC;; + '/folteto')dupdate2;; + '/img')img_reply;; + '/CPrecios')call.cambio_precios;; + '/ccupon')call.CrearCuponNew;; + *)invalido_fun;; + esac + + elif [[ ${message_document_file_id[$id]} ]]; then + download_file + + elif [[ ${message_text[$id]} || ${callback_query_data[$id]} ]]; then + + case ${comando[0]} in + /[Mm]enu|[Mm]enu|/[Ss]tart|[Ss]tart|[Cc]omensar|/[Cc]omensar)menu_src &;; + /[Dd]omainA|[Dd]omainA|[Dd]omainNS|/[Dd]omainNS|/domainns|/domaina)reply &;; + /[Aa]yuda|[Aa]yuda|[Hh]elp|/[Hh]elp)ayuda_src &;; + /[Ii]d|/[Ii]D)myid_src &;; + /[Kk]illid|[Kk]illid) dropID &;; + #/[Cc]hat|[Ch]hat)msj_chat &;; + /[Cc]hat|[Ch]hat)reply &;; + /[Ii]mg|[Ii]mg)reply &;; + /[Aa]dd|/[Dd]el)reply &;; + /upfile)reply &;; + /banID)reply &;; + /Uban)reply &;; + /[Rr]estart)call.revoc &;; + /[Aa]ddrev|/[Rr]emote|/folteto)reply &;; + /[Bb]uscar|[Bb]uscar)reply &;; + /[Bb]anIP|[Bb]anIP)reply &;; + /[Cc]atip|[Cc]atip)list_IP &;; + /[Pp]ower)start_gen &;; + /[Kk]eygen)gerar_key &;; + /[Kk]eyplus)gerar_plus &;; + /[Kk]ltm)gerar_keyLTM &;; + /[Ii]nfosys)infosys_src &;; + /[Ll]ist)listID_src &;; + /[Ii]dgen|[Ii]dgen)listID_GEN &;; + /[Rr]eboot)reboot_src &;; + /[Ii]nstal)link_src &;; + /[Cc]ache)cache_src &;; + /[Uu]pdate|/[Aa]ctualizar)update &;; + /[Dd]onar|[Dd]onar)donar_OnOff &;; + /[Pp]rice|[Pp]price|[Pp]rices|/[Pp]rices)prices_on &;; + /[Uu]pfile|[Uu]pfile|[Uu]pfile|/[Uu]pfile)reply & ;; + /[Cc]Precios)reply & ;; + /[Cc]upon|/[Cc]cupon)reply & ;; + /aggBT) addID_reply &;; + /kfree) kads &;; + /kid) _killID &;; + /*|*)invalido_fun &;; + esac + + fi + + fi +} + +_killID(){ +if [[ ! -e /etc/systemd/system/btkill.service ]]; then +wget -O /etc/ADM-db/sources/kill_drop.sh https://www.dropbox.com/scl/fi/xmnhcci2mm7irvhepf6e2/kill_drop.sh?rlkey=gjkwzg4ocs6a6hh9flr65jqw0 +[[ -e /etc/ADM-db/sources/kill_drop.sh ]] && chmod +x /etc/ADM-db/sources/kill_drop.sh +local MSG_id=$((${message_message_id} + 1 )) +echo -e "[Unit] +Description=BotGen Service by @ChumoGH +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +User=root +WorkingDirectory=/root +ExecStart=/bin/bash /etc/ADM-db/sources/kill_drop.sh +Restart=always +RestartSec=60s + +[Install] +WantedBy=multi-user.target" > /etc/systemd/system/btkill.service +systemctl daemon-reload &>/dev/null +systemctl enable btkill &>/dev/null +systemctl start btkill &>/dev/null +local bot_retorno=" ✉️ ====== NOTIFICACION ====== ✉️ \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" KILL ID : ACTIVADO ✅\n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +ShellBot.sendMessage --chat_id ${permited} \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html +sleep 2s +msj_del ${message_message_id} +msj_del ${MSG_id} +else +killall kill_drop.sh &>/dev/null +systemctl daemon-reload &>/dev/null +systemctl stop btkill &>/dev/null +systemctl disable btkill &>/dev/null +rm /etc/systemd/system/btkill.service &>/dev/null +local MSG_id=$((${message_message_id} + 1 )) +[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username} +local bot_retorno=" ✉️ ====== NOTIFICACION ====== ✉️ \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" KILL ID : DESCATIVADO ❌\n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +ShellBot.sendMessage --chat_id ${permited} \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html +sleep 2s +msj_del ${message_message_id} +msj_del ${MSG_id} +fi +} + + +reply () { + [[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + + ShellBot.sendMessage --chat_id $var \ + --text "$comando" \ + --parse_mode html \ + --reply_markup "$(ShellBot.ForceReply)" + [[ "${callback_query_data}" = /del || "${message_text}" = /del ]] && listID_src + [[ "${callback_query_data}" = /add || "${message_text}" = /add ]] && call.add + #[[ "${callback_query_data}" = /img || "${message_text}" = /img ]] && listID_src + [[ "${callback_query_data}" = '/banIP' || "${message_text}" = '/banIP' ]] && list_IP + [[ "${callback_query_data}" = '/folteto' || "${message_text}" = '/folteto' ]] && dupdate2 + [[ "${callback_query_data}" = '/CPrecios' || "${message_text}" = '/CPrecios' ]] && call.MPrecios + [[ "${callback_query_data}" = /cupon || "${message_text}" = /cupon ]] && call.cupon + [[ "${callback_query_data}" = /kid || "${message_text}" = /kid ]] && _killID + [[ "${callback_query_data}" = /ccupon || "${message_text}" = /ccupon ]] && call.CREARcupon + [[ "${callback_query_data}" = /domainA || "${message_text}" = /domainA || "${callback_query_data}" = '/domaina' || "${message_text}" = '/domaina' ]] && call.domain + [[ "${callback_query_data}" = /chat || "${message_text}" = /chat ]] && call.msgUSER + [[ "${callback_query_data}" = /domainNS || "${message_text}" = /domainNS || "${callback_query_data}" = '/domainns' || "${message_text}" = '/domainns' ]] && call.domainB + [[ "${callback_query_data}" = /upfile || "${message_text}" = /upfile ]] && call.mssFAC + [[ "${callback_query_data}" = /remote || "${message_text}" = /remote ]] && call.RMT +} + +call.cambio_precios(){ +#my_ip=$(echo ${message_text[$id]} | cut -d "|" -f1) +#opcion=$(echo ${message_text[$id]} | cut -d "|" -f2) +#name=$(echo ${message_text[$id]} | cut -d "|" -f3) +[[ -z ${message_text[$id]} ]] && _urlC='https://raw.githubusercontent.com/ChumoGH/ADMcgh/main/costos' || _urlC="${message_text[$id]}" +precios=$(curl -sSL "${_urlC}") +[[ -z ${precios} ]] && precios=$(curl -sSL "https://raw.githubusercontent.com/ChumoGH/ADMcgh/main/costos") +echo -e "${_urlC}" > /etc/ADM-db/costos.url +chmod +x /etc/ADM-db/costos.url +_NPrecios=" ⚠️ PRECIOS ALTERADOS!!! ⚠️\n" +_NPrecios=" ⚠️ PRECIOS ALTERADOS!!! ⚠️\n" +ShellBot.sendMessage --chat_id "${permited}" \ + --text "$(echo -e ${_NPrecios})" \ + --parse_mode html +prices_on +} + +call.file(){ + + +ShellBot.sendDocument --chat_id ${message_chat_id[$id]} \ + --document @$HOME/payloads.txt +} + + +fun_kfree () { + rm /etc/SCRIPT/*.x.c &> /dev/null + unset KEY + KEY="$1" + #CRIA DIR + [[ ! -e ${DIR} ]] && mkdir ${DIR} + #CRIA KEY + [[ ! -e ${DIR}/${KEY} ]] && mkdir ${DIR}/${KEY} + #PASSA ARQS + nombrevalue="${chatuser}" + #ADM BASIC + arqslist="$(ls /etc/SCRIPT/)" + for arqx in `echo "${arqslist}"`; do + [[ -e ${DIR}/${KEY}/$arqx ]] && continue #ANULA ARQUIVO CASO EXISTA + cp ${scriptDIR}/$2/$arqx ${DIR}/${KEY}/ + echo "$arqx" >> ${DIR}/${KEY}/${LIST} + done + echo "$nombrevalue" > ${DIR}/${KEY}.name + [[ ! -z $IPFIX ]] && echo "$IPFIX" > ${DIR}/${KEY}/keyfixa + + if [[ $2 -gt '0' ]]; then + at now +$2 hours <<< "rm -rf ${DIR}/${KEY} && rm -rf ${DIR}/${KEY}.name" + fi +} + +kads() { +validKF=1 +[[ -z ${callback_query_from_username} ]] && usrLOP=${message_from_username} || usrLOP=${callback_query_from_username} +[[ -z ${usrLOP} ]] && { + local error="=================================\n" + error+=" Estimado Usuario, imposible permitirle\n" + error+=" crear una Key sin un ALIAS.\n" + error+=" Su ID : ${chatuser} REGISTRADO !!\n" + error+=" ADQUIERE UN ACCESO 🛒🛍️ PINCHANDO 👉AQUI👈 \n" + error+=" Validado en @$(ShellBot.username)\n" + error+="=================================\n" +msj_add "${chatuser}" "${error}" +return +} +[[ ${validKF} = 0 ]] && { + local error="=================================\n" + error+=" Estimado Usuario, ESTA FUNCION FUE REMOVIDA\n" + error+=" VERIFICA CON UN ADMINISTRADOR CON\n" + error+=" SU ID : ${chatuser} REGISTRADO !!\n" + error+=" ADQUIERE UN ACCESO 🛒🛍️ PINCHANDO 👉AQUI👈 \n" + error+=" Validado en @$(ShellBot.username)\n" + error+="=================================\n" +msj_add "${chatuser}" "${error}" +return +} +local chuliss="=================================\n" +chuliss+=" GENERANDO . . . . . . !!\n Porfavor Espere la respuesta del CHAT\n Registramos esta sesion para validar su KEY" +chuliss+="\n================================= \n" +msj_add "${chatuser}" "${chuliss}" +#[[ ! -e $HOME/RegBOT/free_check ]] && touch $HOME/RegBOT/free_check +unset bot_retor +[[ -z ${_ress} ]] && _ress='ChumoGH' +[[ -e ${SRC}/gerar_key ]] && source ${SRC}/gerar_key +meu_ip_fun +[[ -e $HOME/RegBOT/API1 ]] && tokenAPI=$(cat $HOME/RegBOT/API1) || tokenAPI='7471ad0fab169d252bc4631a8' +[[ -e $HOME/RegBOT/API2 ]] && tokenAPI2=$(cat $HOME/RegBOT/API2) || tokenAPI2='0583bebaf93c2c8978085355f79162871f966ec2' +local _link='https://api.cuty.io/full' +local _link2='https://exe.io/api?' +local _nameADS='FreeKey' +#_ads='www.google.com' +[[ -e $HOME/RegBOT/free_check.txt ]] && _cADS=$(cat $HOME/RegBOT/free_check.txt | grep ${chatuser} | wc -l) || _cADS=1 +[[ $_cADS -ge 1 ]] && { +ShellBot.deleteMessage --chat_id ${return[chat_id]} --message_id "${return[message_id]}" +local _line=1 +local _enlaces='' +for _lADS in $(cat $HOME/RegBOT/free_check.txt | grep -w ${chatuser} | cut -d '|' -f2) ; do + _enlaces+=" ${_line}] - ${_lADS} \n" + let _line++ +done +sleep 1s +local mss_ads="=================================\n" + mss_ads+=" 🔴《 @${usrLOP} UD YA GENERO ${_cADS} KEY GRATIS 》⚫️\n" + mss_ads+="=================================\n" + mss_ads+=" AMA AL PROJIMO COMO A TI MISMO!! \n" + mss_ads+="=================================\n" + mss_ads+=" Revisa los Enlaces que se generaron \n Y obten tu key antes que se anulen\n" + mss_ads+="=================================\n" + mss_ads+=" ${_enlaces}" + mss_ads+="=================================\n" + mss_ads+=" ADQUIERE UN ACCESO 🛒🛍️ PINCHANDO 👉AQUI👈 \n" + mss_ads+=" SU ID : ${chatuser} \n Validado en @$(ShellBot.username)\n" + mss_ads+="=================================\n" + mss_ads+="\n 💥 POWER BY @${_ress} 💥 \n" + mss_ads+="\n================================= \n" +msj_add "${chatuser}" "${mss_ads}" +return +} +[[ $(cat ${CID}|grep "${chatuser}") = "" ]] && { +local valuekey="$(echo $RANDOM | md5sum | head -c 15)" +oUP=${IP} +#fun_kfree "$valuekey" '1' 'FREE' +[[ -e $(cat < $HOME/RegBOT/free_check.txt |grep -w ${chatuser}| cut -d '|' -f3) ]] && { +ShellBot.deleteMessage --chat_id ${return[chat_id]} --message_id "${return[message_id]}" +local mss_ads="=================================\n" + mss_ads+=" IMPOSIBLE CREAR NUEVO URL KEY\n" + mss_ads+="=================================\n" + mss_ads+=" UD YA TIENE UNA KEY SIN USAR\n" + mss_ads+="=================================\n" + mss_ads+=" NOTA \n" + mss_ads+="=================================\n" + mss_ads+=" SOLO ABRE EL ENLAZE, SALTA LOS ADS\n" + mss_ads+=" Y OBTEN TU KEY GRSTIS\n" + mss_ads+="=================================\n" + mss_ads+=" No nos cansemos de hacer el bien\n y a su debido tiempo, cosecharemos \n numerosas bendiciones ( GALATAS 6:9 )\n" + mss_ads+="=================================\n" + mss_ads+=" @${usrLOP}, Click 👉AQUI👈 PARA OBTENER SU KEY\n" + mss_ads+=" O COPIE : $(cat < $HOME/RegBOT/free_check.txt |grep -w ${chatuser}| cut -d '|' -f2| tail -1) \n" + mss_ads+=" Validado en @$(ShellBot.username)\n" + #mss_ads+=" Reclame su Key en : ${_ads} \n" + mss_ads+="=================================\n" +msj_add "${chatuser}" "${mss_ads}" +return +} +fun_list "$valuekey" '1' 'FREE' ' ' +local keyfinal="$(ofus "$oUP:8888/${valuekey}/$LIST")" +local _ads="${oUP}:81/ChumoGH/${valuekey}" +[[ -e /dominio.txt ]] && _ads="$(cat < /dominio.txt):81/ChumoGH/${valuekey}.html" +[[ -e $HOME/RegBOT/ADM.reg ]] && { +_banner=$(cat $HOME/RegBOT/ADM.reg) +} || { +_banner=$(curl -s -X GET "https://t.me/ChumoGH" -H "Content-Type: application/json" | grep tgme_page_title | cut -d '<' -f3 | cut -d '>' -f2) +echo -e "${_banner}" > $HOME/RegBOT/ADM.reg +} +echo -e "${_banner}" > ${SCPT_DIR}/menu_credito +echo -e "$(cat /etc/ADM-db/Admin-ID|head -1)" >> ${SCPT_DIR}/menu_credito +#ls_ads=$(curl -s -X POST "${_link}?token=${tokenAPI}&url=${_ads}&alias=${_nameADS}" -H "Content-Type: application/json" | jq '.') +ls_ads=$(curl -s -X POST "${_link}?token=${tokenAPI}&url=${_ads}" -H "Content-Type: application/json" | jq '.') +url_short=$(echo $ls_ads | jq -r '.data.short_url') +[[ -z ${url_short} ]] && url_short=null +echo -e "${url_short} | ${_ads}" +[[ "${url_short}" != "null" ]] && { +ls_ads2=$(curl -s -X GET "${_link2}api=${tokenAPI2}&url=${url_short}" -H "Content-Type: application/json" | jq '.') +url_short=$(echo $ls_ads2 | jq -r '.shortenedUrl') +#echo " " > /var/www/html/ChumoGH/${valuekey} +at now +30 minutes <<< "bash $HOME/RegBOT/${valuekey}.sh" +cat << atnow > $HOME/RegBOT/${valuekey}.sh +rm -f /var/www/html/ChumoGH/${valuekey}.html +rm -f $HOME/RegBOT/${valuekey}.sh +atnow + +#>> /var/www/html/ChumoGH/${valuekey} +#echo -e "=================================" >> /var/www/html/ChumoGH/${valuekey} +less << KeyFREE > /var/www/html/ChumoGH/${valuekey}.html + + + + + ADM - ChumoGH + + + +
+
+
+KEY GRATIS GENERARA EL $(printf '%(%D)T') A LAS $(printf '%(%H:%M:%S)T') +
+${keyfinal} +
+ INSTALADOR OFICIAL $(cat < /etc/SCRIPT/v-local.log) +
+apt update -y; apt upgrade -y; wget -q https://plus.admcgh.site/setup; chmod 777 setup; ./setup --ADMcgh +
+ESTE URL SE ELIMINARA A LAS $(at -l | sort -n | awk '{print $5}' | tail -1) +
+ +KeyFREE +local mss_ads="=================================\n" + mss_ads+=" 🔴《 ${_cADS} KEY GENERADA 》⚫️\n" + mss_ads+="=================================\n" + mss_ads+=" ABRA EL ENLACE ACORTADOR DE ABAJO \n SALTA LA PUBLICIDAD Y OBTEN TU KEY GRATIS\n" + mss_ads+="=================================\n" + mss_ads+=" ⚜️ NOTA MOTIVACIONAL ⚜️\n" + mss_ads+="=================================\n" + mss_ads+=" No nos cansemos de hacer el bien\n y a su debido tiempo, cosecharemos \n numerosas bendiciones ( GALATAS 6:9 )\n" + mss_ads+=" ENLACE VALIDO POR 30 MINUTOS\n" + mss_ads+="=================================\n" + mss_ads+=" 🔰 NOTA REFERENCIAL 🔰\n" + mss_ads+="=================================\n" + mss_ads+=" SI GENERAS UN ENLACE Y NO LO USAS,\n" + mss_ads+=" ⚠️ SERAS BANEADO INMEDIATAMENTE ⚠️\n" + mss_ads+="=================================\n" + mss_ads+=" @${usrLOP}, Click 👉AQUI👈 PARA OBTENER SU KEY\n" + mss_ads+=" O COPIE : ${url_short} \n" + mss_ads+=" Validado en @$(ShellBot.username)\n" + #mss_ads+=" Reclame su Key en : ${_ads} \n" + mss_ads+="=================================\n" + [[ -z $(echo $permited|grep "${chatuser}") ]] && { + echo -e "${chatuser}|${url_short}|/var/www/html/ChumoGH/${valuekey}|$(at -l | sort -n | awk '{print $1}' | tail -1)" >> $HOME/RegBOT/free_check.txt + #echo -e "${chatuser}|${url_short}" >> + } || { + [[ ${_cADS} -le 1 ]] && echo -e "${chatuser}|${url_short}" >> $HOME/RegBOT/free_check.txt + } +} || { +echo " +================================= +ERROR AL GENERAR LA KEY +================================= +" > /var/www/html/ChumoGH/${valuekey} +at now +15 minutes <<< "rm -f /var/www/html/ChumoGH/${valuekey}.html" +at -l | tail -1 >> /var/www/html/ChumoGH/${valuekey}.html +echo -e "=================================" >> /var/www/html/ChumoGH/${valuekey}.html +local mss_ads="=================================\n" + mss_ads+=" 🔴《 Hubo un error Interno 》⚫️\n" + mss_ads+="=================================\n" + mss_ads+=" PERO SU ENLACE FUE REDIRIGIDO!!\n" + mss_ads+="=================================\n" + mss_ads+=" ABRA EL ENLACE ACORTADOR DE ABAJO \n SALTA LA PUBLICIDAD Y OBTEN TU KEY GRATIS\n" + mss_ads+="=================================\n" + mss_ads+=" NOTA \n" + mss_ads+="=================================\n" + mss_ads+=" NO GENERES OTRO ENLACE SI NO CANJEASTE EL ANTERIOR\n" + mss_ads+=" ENLACE VALIDO POR 15 MINUTOS\n" + mss_ads+=" SOLO ABRE EL ENLACE EN EL NAVEGADOR, SALTA LA PUBLICIDAD\n" + mss_ads+=" Y E TE ENTREGARA TU KEY TOTALMENTE FREE\n" + mss_ads+="=================================\n" + mss_ads+=" Click 👉AQUI👈\n" + mss_ads+=" O COPIE : ${url_short} \n" + mss_ads+=" Estimado @${usrLOP} , Disfrute su KEY\n" + #mss_ads+="================================= \n" + #mss_ads+=" Reclame su Key en : ${_ads} \n" + mss_ads+="=================================\n" +#echo -e "${chatuser}|${url_short}" >> $HOME/RegBOT/free_check.txt +} +} +mensajeID="${return[message_id]}" +chatID="${return[chat_id]}" +ShellBot.deleteMessage --chat_id ${return[chat_id]} --message_id "${return[message_id]}" +echo -e " --chat_id ${chatID} --message_id $((${mensajeID} + 1 ))" +[[ -z $(echo $permited|grep "${chatuser}") ]] && { +msj_add "${permited}" "${mss_ads}" +} +[[ -z ${_ress} ]] && _ress='ChumoGH' +local bot_retorno=" ========📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩========\n" + bot_retorno+=" ${mss_ads} " + bot_retorno+="\n 💥 POWER BY @${_ress} 💥 \n" + bot_retorno+="\n================================= \n" +msj_fun +} + +call.cupon(){ +local bot_retorno="=================================\n" + bot_retorno+=" 🔴《 CANGEO DE CUPON 》⚫️\n" + bot_retorno+="=================================\n" + bot_retorno+=" FECHA : $(date '+%Y-%m-%d') | HORA $(printf '%(%H:%M:%S)T')\n" + bot_retorno+="=================================\n" + bot_retorno+=" ❒ FIJATE EN LA HORA DEL BOT!!\n" + bot_retorno+=" ❒ PEGA TU CUPON, SIN ESPACIOS\n" + bot_retorno+=" ❒ MUESTRA LOS PRECIOS CON /prices\n" + bot_retorno+=" ❒ CUPONES/ACCESOS CADUCAN A LAS 00:00 DEL BOT\n" + bot_retorno+="================================= \n" + bot_retorno+=" EJEMPLO : AdmCGH-xXxX123 \n" + bot_retorno+="=================================\n" +msj_fun +} + +call.CREARcupon(){ +local bot_retorno="=================================\n" + bot_retorno+=" 🔴《 CREAR NUEVO CUPON STANDAR 》⚫️\n" + bot_retorno+="=================================\n" + bot_retorno+=" ❒ CREA CODIGO DE CUPON, SIN ESPACIOS\n" + bot_retorno+=" ❒ AÑADE : codigo|tiempo|dueño|false\n" + bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" + bot_retorno+=" EJEMPLO : AdmCGH123|2|ChumoGH|false \n" + bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" + bot_retorno+=" RECUERDA NO ESPACIOS \n" +msj_fun +} + +call.CrearCuponNew(){ +[[ ${chatuser} = ${permited} ]] && { +cupon=$(echo ${message_text[$id]} | cut -d "|" -f1) +[[ ${#cupon} -gt 6 ]] || unset cupon +[[ -z ${cupon} ]] && cupon=$(echo $RANDOM | md5sum | head -c 15) +tm=$(echo ${message_text[$id]} | cut -d "|" -f2) +[[ -z ${tm} ]] && tm='1' +rg=$(echo ${message_text[$id]} | cut -d "|" -f3) +[[ -z ${rg} ]] && rg='ChumoGH' +mb=$(echo ${message_text[$id]} | cut -d "|" -f4) +[[ -z ${mb} ]] && mb=false +echo -e "${cupon}|${tm}|${rg}|${mb}" >> /root/RegBOT/cupones +mssg=" ====================================\n" +mssg+=" 🔰 CUPON AÑADIDO CREADO EXITOSAMENTE 🔰 \n" +mssg+=" ====================================\n" +mssg+=" Creado el $(date '+%Y-%m-%d') a las $(printf '%(%H:%M:%S)T') Horas\n" +mssg+=" ====================================\n" +mssg+=" CUPON VALIDO POR ${tm} DIAS \n" +[[ ${mb} = true ]] && mssg+=" SU MEMBRESIA DUAL ESTA ACTIVADA \n" +mssg+=" PARA CANJEARLO DIRIGETE A @$(ShellBot.username)\n" +mssg+=" ESCRIBE EL COMANDO /cupon \n" +mssg+=" Y LEE LAS INSTRUCCIONES DEL BOT \n" +mssg+=" ====================================\n" +mssg+=" O PEGA /rcupon ${cupon} \n" +mssg+=" ====================================\n" +mssg+=" ⚠️ SU CUPON 👉🏻${cupon}👈🏿\n" +mssg+=" ====================================\n" +} || { +mssg=" ====================================\n" +mssg+=" FUNCION SOLO CREADA PARA EL ADMIN !!\n" +mssg+=" ====================================\n" +} +ShellBot.sendMessage --chat_id "${chatuser}" \ + --text "$(echo -e ${mssg})" \ + --parse_mode html +} + +send_ID() { +local id_solicitante=${chatuser} +MSG_id=$((${message_message_id} + 1 )) +[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}" +[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}" +[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username} +[[ -e /root/RegBOT/U_check.txt ]] && n_soli=$(cat /root/RegBOT/U_check.txt | grep ${chatuser} | wc -l) || n_soli=1 +[[ $n_soli < 3 ]] && { +echo "${id_solicitante}" >> /root/RegBOT/U_check.txt + bot_retor=" ================================= \n" + bot_retor+=" $MSG_id EL USUARIO -> ${firsnme} ${lastnme} \n" + [[ -z ${nUSER} ]] && bot_retor+=" ⚠️ USUARIO SIN ALIAS SOLICITO $(cat < /root/RegBOT/U_check.txt | wc -l) VECES ⚠️\n" || bot_retor+=" ALIAS: @${nUSER} SOLICITO $(($n_soli + 1)) VECES\n" + bot_retor+=" SOLICITUD N° $(cat < /root/RegBOT/U_check.txt | wc -l) RECIVIDA ✅\n" + bot_retor+=" ================================= \n" + #bot_retor+=" FORMATO NORMAL ${chatuser} | DIAS \n" + #bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" FORMATO DualGen ${id_solicitante} | DIAS | true \n" + bot_retor+=" ================================= \n" + #bot_retor+=" FORMATO DualGen ${chatuser} | DIAS | true \n" + #bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + #bot_retor+=" PARA ACEPTAR DA CLICK AQUI 👉 /add , LUEGO\n" + #bot_retor+=" 4 DIAS COPY 👉 ${chatuser} | 4 | false \n" + #bot_retor+=" 7 DIAS COPY 👉 ${chatuser} | 7 | false \n" + #bot_retor+=" 15 DIAS COPY 👉 ${chatuser} | 15 | false \n" + #bot_retor+=" 30 DIAS COPY 👉 ${chatuser} | 30 | false \n" + #bot_retor+=" 60 DIAS COPY 👉 ${chatuser} | 60 | false \n" + #bot_retor+=" 90 DIAS COPY 👉 ${chatuser} | 90 | false \n" + #bot_retor+=" 180 DIAS COPY 👉 ${chatuser} | 179 | false \n" + #bot_retor+=" 1 AÑO COPY 👉 ${chatuser} | 364 | false \n" + #bot_retor+=" CUSTOM COPY 👉 ♨️ ${chatuser} | dias | false ♨️\n" + #bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" VERIFIQUE SU INFORMACION ANTES DE APROBAR\n" + bot_retor+=" ================================= \n" + call.ITEM.fijos "${permited}" "${bot_retor}" "${id_solicitante}" + #msj_add "${permited}" #----------------------------------AQUIIIIII + #--reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'item_access')" + #[[ -z ${callback_query_data} ]] && codigo=$(echo ${message_text[$id]} | cut -d ' ' -f2) || codigo=$(echo ${callback_query_data} | cut -d ' ' -f2) + #msj_add "${1}" + bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 🔰 𝚂𝚞 𝙸𝙳 【 ${id_solicitante} 】 🔰\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ AÑADA UN ALIAS PARA PODER SOLICITAR ⚠️\n" || bot_retorno+=" UD SOLICITO AUTORIZACION A ${alias_admin}\n" + [[ -z ${nUSER} ]] && bot_retorno+=" IMPOSIBLE VERIFICAR ID SIN ALIAS\n REMARCA SU $(($n_soli + 1)) SOLITUD INVALIDA \n" || bot_retorno+=" ESTA ES SU $(($n_soli + 1)) SOLICITUD MEDIANTE ID DE REGISTRO\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ -z ${nUSER} ]] && bot_retorno+=" ⚠ ID ENVIADO CON ADVERTENCIA (POSIBLE BANEO DE ID) ⚠️\n" || bot_retorno+=" ✅ SOLICITUD N° $(cat < /root/RegBOT/U_check.txt | wc -l) REGISTRADA ✅\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ❒ SOLICITUD FUE ENVIADA EXITOSAMENTE ✅\n" + bot_retorno+=" ❒ NO NECECISA QUE VUELVA A SOLICITAR ♻️\n" + bot_retorno+=" ❒ PODRAS GENERAR SUBDOMINIOS 999+ ♻️\n" + bot_retorno+=" ❒ EVITE BANEO DE SU ID 🪬\n" + bot_retorno+=" ❒ CANJEA TU CUPON CON /cupon \n" + bot_retorno+=" ❒ SE ADMITEN MAXIMO 3 SOLICITUDES \n" + bot_retorno+=" ❒ REVISA PRECIOS Y COSTOS 👉AQUI👈 \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ENVIE SU COPIA/CAPTURA/CORREO DE PAGO PARA SU AUTORIZACION\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + } || { + bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 🔰 𝚂𝚞 𝙸𝙳 【 ${id_solicitante} 】 🔰\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ USUARIO SIN ALIAS ⚠️\n" || bot_retorno+=" ALIAS: @${nUSER} CON ID : ${id_solicitante}\n" + [[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ AÑADA UN ALIAS PARA VALIDAR SU ${n_soli} SOLICITUD ⚠️\n" || bot_retorno+=" UD ENVIO ${n_soli} SOLICITUDES A ${alias_admin}\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ -z ${nUSER} ]] && bot_retorno+=" IMPOSIBLE VERIFICAR ID SIN ALIAS\n REMARCA SU $(($n_soli + 1)) SOLITUD INVALIDA \n" || bot_retorno+=" ❒ EL BOT OMITIO TODAS SUS SOLICITUDES\n" + bot_retorno+=" ❒ YA NO PODRA REALIZAR SOLICITUDES\n" + bot_retorno+=" ❒ CONTACTE DIRECTAMENTE AL ADMINISTRADOR \n" + bot_retorno+=" ❒ SOLICITIO 3 VECES SIN APROBACION \n" + bot_retorno+=" ❒ DESBANEOS SOLO ADQUIRIENDO ACCESO!! \n" + bot_retorno+=" ❒ REVISA PRECIOS Y COSTOS 👉AQUI👈 \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 🚫🚫️ SU ID FUE BANEADO 🚫🚫 \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + echo "${id_solicitante} | $(date '+%C%y-%m-%d')-$(date +%R)" >> /root/RegBOT/banID + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + } +} + + +call.banID(){ +idBAN=$(echo ${message_text[$id]} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig') +idMSS=$(echo ${message_text[$id]} | awk '{print $3}') +echo "${idBAN} | ${idMSS} | $(date '+%C%y-%m-%d')-$(date +%R)" >> /root/RegBOT/banID + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R)\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + if sed -i "/${message_text[$id]}/d" /root/RegBOT/banID; then + bot_retorno+=" ✅ ID BANEADO EXITOSAMENTE ✅\n" + bot_retorno+=" ID : ${message_text[$id]} \n" + else + bot_retorno+=" ERROR AL ELIMINAR ID DE REGISTROS \n" + bot_retorno+=" POSIBLEMENTE ${message_text[$id]} NO EXISTA REG \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + fi + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+="RAZON : ${idMSS}\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" + msj_fun +} + +call.UbanID () { +if sed -i "/${message_text[$id]}/d" /root/RegBOT/banID; then +bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" ID DESBANEADO EXITOSAMENTE!\n" +bot_retorno+=" ID : ${message_text[$id]} \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +else +bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" ERROR AL ELIMINAR ID DE REGISTROS \n" +bot_retorno+=" POSIBLEMENTE ${message_text[$id]} NO EXISTA \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +fi +msj_fun +} + +myid_src () { +MSG_id=$((${message_message_id} + 1 )) +[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username} +[[ ! -z $(echo -e "${permited}"|grep "${chatuser}" ) ]] && { #ENTRA A VERIFICAR ADM +bot_retorno+=" ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" HOLA @${nUSER} UD ES ADM \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" DIJITA MENU /menu 🔰\n" +bot_retorno+="\n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" +bot_retorno+=" ⚜ by @ChumoGH ⚜\n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +#bot_retorno+="bold, bold \n +#italic, italic\n" +bot_retorno+=" BORRAREMOS ESTE PRE ${message_message_id} \n" +bot_retorno+=" BORRAREMOS ESTE CODE ${MSG_id} \n" +msj_fun +sleep 1s +msj_del ${message_message_id} +msj_del ${MSG_id} +} || { # SINO ES ADM - CAMBIA A USUARIOS AUTORIZADOS + [[ $(cat ${CID}|grep "${chatuser}" ) = "" ]] && { # ENTRA A VERIFCAR USUARIOS QUE NO EXISTEN + bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ USUARIO SIN ALIAS ⚠️\n" || bot_retorno+="𝙃𝙤𝙡𝙖 【 @${nUSER} 】, SU ID NO ESTA AUTORIZADO\n" + bot_retorno+=" ADQUIERE UNA MENBRESIA O DIJITA /prices \n" + bot_retorno+=" VISITA LA TIENDA 🛒🛍️ PINCHANDO 👉AQUI👈\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+="𝚂𝚞 𝙸𝙳 【 ${chatuser} 】\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+="👇PINCHA 👇 EN EL BOTON PARA QUE ${alias_admin} TE AUTORICE!!\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + menu_printSN + sleep 1s + msj_del ${message_message_id} + msj_del ${MSG_id} + } || { # ENTRA A IDS YA REGISTRADOS + bot_retorno+=" ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" HOLA @${nUSER} SU ID ESTA REGISTRADO \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 🆔 : ${chatuser} 🔰\n" + bot_retorno+=" FECHA DE CORTE : ⏳ $(cat ${CID} | grep ${chatuser}| awk '{print $3}') | $(date +%R)\n" + bot_retorno+="\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + } + } # FIN VERIFICAR ADM +} + +killIP_reply () { + +[[ $(cat /var/www/html/ChumoGH/checkIP.log | grep -w "${message_text[$id]}") ]] && { +sed -i "/${message_text[$id]}/d" /var/www/html/ChumoGH/checkIP.log +bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" IP ELIMINADA DE REGISTRO EXITOSAMENTE!\n" +bot_retorno+=" IP : ${message_text[$id]} \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +} || { +bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" ERROR AL ELIMINAR IP DE REGISTROS \n" +bot_retorno+=" POSIBLEMENTE ${message_text[$id]} NO EXISTA \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +} +msj_fun +} + +deleteID_reply () { +ids=$(echo ${message_text[$id]} | cut -d '|' -f1 | sed -e 's/[^a-z0-9 -]//ig') +idc=$(echo ${message_text[$id]} | cut -d '|' -f2 | sed -e 's/[^a-z0-9 -]//ig') +# ids=$(echo ${message_text[$id]} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig') +# idc=$(echo ${message_text[$id]} | awk '{print $3}' | sed -e 's/[^a-z0-9 -]//ig') +#sed -i "/${message_text[$id]}/d" ${CID} +[[ $(cat ${CID} | grep -w ${ids}) ]] && { +sed -i "/${ids}/d" ${CID} +bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ID ELIMINADO EXITOSAMENTE!\n" + bot_retorno+="Fecha de Corte : $(date '+%C%y-%m-%d') - $(date +%R) \n" + bot_retorno+=" ID Eliminado: ${ids}\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n" + bot_retor+=" ESTIMADO USUARIO ${chat_username} TU MEMBRESIA FUE REMOVIDA\n" + bot_retor+="SI QUIERES APELAR ESCRIBE A ${alias_admin}\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + msj_add ${ids} + #upfile_src + call.file2 "${CID}" " Respaldo con @${nUSER} \n ID : ${nombrevalue} \n FECHA $(date '+%C%y-%m-%d')" + } || { + + bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ID NO EXISTE \n" + bot_retorno+=" ID Eliminado: ${ids}\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + } +} + +img_reply () { +local file_id + ShellBot.getFile --file_id ${message_document_file_id[$id]} + ShellBot.downloadFile --file_path "${return[file_path]}" --dir "/root/" + [[ -e ${return[file_path]} ]] && mv ${return[file_path]} "/root/" +local bot_retorno="ID user botgen\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" FILE ${return[file_path]} \n" + bot_retorno+=" ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +ID_img=${message_photo_file_unique_id} + bot_retorno+=" CALCULANDO ID DE MENSAJES \n" + bot_retorno+=" ID FILE PHOTO : ${message_photo_file_id}\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ID UNICO FILE PHOTO : ${message_photo_file_unique_id}\n" + bot_retorno+=" CAPTION : ${message_caption}\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + #upfile_src + msj_img "${ID_img}" +} + +searchID_reply () { +searchID=$(cat -n ${CID} | grep "${message_text[$id]}") +bot_retorno="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" MOSTRANDO RESULTADOS DE BUSQUEDA!\n" + bot_retorno+=" ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ ! -z ${searchID} ]] && bot_retorno+=" N°${searchID} \n" || bot_retorno+=" ID NO ENCONTRADO \n" + msj_fun +} + +addID_reply () { +[[ -z ${callback_query_message_chat_id} ]] && delete_mss=${return[message_id]} || delete_mss=${callback_query_message_chat_id} +mensajeID="${return[message_id]}" +chatID="${return[chat_id]}" +#ShellBot.deleteMessage --chat_id ${return[chat_id]} --message_id "${delete_mss}" +[[ -z ${callback_query_data} ]] && ids=$(echo ${message_text[$id]} | cut -d '|' -f1 | sed -e 's/[^a-z0-9 -]//ig') || ids=$(echo ${callback_query_data} | cut -d '|' -f1 | cut -d ' ' -f2 | sed -e 's/[^0-9]//ig') +[[ -z ${callback_query_data} ]] && idc=$(echo ${message_text[$id]} | cut -d '|' -f2 | sed -e 's/[^a-z0-9 -]//ig') || idc=$(echo ${callback_query_data} | cut -d '|' -f2 | sed -e 's/[^a-z0-9 -]//ig') +[[ -z ${callback_query_data} ]] && _tru=$(echo ${message_text[$id]} | cut -d '|' -f3) || _tru=$(echo ${callback_query_data} | cut -d '|' -f3) + # ids=$(echo ${message_text[$id]} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig') + # idc=$(echo ${message_text[$id]} | awk '{print $3}' | sed -e 's/[^a-z0-9 -]//ig') + # _tru=$(echo ${message_text[$id]} | awk '{print $5}') + [[ -z $_tru ]] && _tru='false' + [[ -z ${idc} ]] && idc='30' + valid=$(date '+%C%y-%m-%d' -d " +$idc days") + [[ $(cat ${CID}|grep "$ids" ) = "" ]] && { + [[ ${idc} > 366 ]] && idc='30' + [[ -e $HOME/RegBOT/banID ]] && sed -i "/${ids}/d" $HOME/RegBOT/banID + [[ -e $HOME/RegBOT/U_check.txt ]] && sed -i "/${ids}/d" $HOME/RegBOT/U_check.txt + [[ -e $HOME/RegBOT/killID.log ]] && sed -i "/${ids}/d" $HOME/RegBOT/killID.log + echo "/${ids} | $valid | ${_tru} | ${Id-ADMIN}" >> ${CID} + echo "/${ids} | $(date '+%C%y-%m-%d') | $(date +%R)" >> $HOME/RegBOT/${ids}.reg + bot_retorno="==== ✉️ REGISTRO APROBADO ✉️ ====\n" + bot_retorno+=" 🆔 : ${ids} | ACEPTADO 🧾\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid} | 00:00\n" + bot_retorno+=" MEMBRESIA DUALGEN EN ${_tru}\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ✅ ID REGISTRADO EXITOSAMENTE ✅\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" +unset i +[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username} +[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}" +[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}" + bot_retor=" ✉️ ESTIMADO @${nUSER} SU REGISTRO FUE APROBADO ✉️ \n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" EL ADM ${alias_admin} APROBO TU SOLICITUD\n" + bot_retor+=" ☺️ GRACIAS POR CONFIAR EN NOSOTROS ☺️\n" + bot_retor+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid} | 00:00\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" SU RESELLER : ${firsnme} ${lastnm} \n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" 🆔 : ${ids} | 🔐 ACEPTADO 🧾\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" MEMBRESIA DUALGEN EN : ${_tru}\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" GENERAR Key's ChumoGH /keygen\n" + bot_retor+=" GENERAR Key's LATAM /kltm\n" + bot_retor+=" DOMINIO CloudFlare /domainA /domainNS\n" + bot_retor+=" Para MENU Digita el comando /menu\n" + bot_retor+=" INSTALAR SCRIPT REMOTO /remote\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" DUDAS Y SOLUCIONES CONTACTE A SU ADM!!\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @ChumoGH " + #bot_retor+=" RENUEVA TU ACCESO 🛒🛍️ PINCHANDO 👉AQUI👈 \n" + bot_retor+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + #menu_BT_ADD + msj_fun + #msj_add ${ids} + ShellBot.sendMessage --chat_id ${ids} \ + --text "$(echo -e $bot_retor)" \ + --parse_mode html + #--reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_user')" + + #upfile_src + call.file2 "${CID}" " Respaldo con @${nUSER} \n ID : ${nombrevalue} \n FECHA $(date '+%C%y-%m-%d')" + } || { + bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ID ${ids} ya esta Registrado\n" + bot_retorno+=" ❌ ID NO REGISTRADO ❌\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + } +} + +addREVID_reply () { + ids=$(echo ${message_text[$id]} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig') + idc=$(echo ${message_text[$id]} | awk '{print $3}' | sed -e 's/[^a-z0-9 -]//ig') + valid=$(date '+%C%y-%m-%d' -d " +$idc days") + [[ $(cat ${CID}|grep "$ids" ) = "" ]] && { + [[ -e /root/RegBOT/banID ]] && sed -i "/${ids}/d" /root/RegBOT/banID + echo "/${ids} | $valid" >> ${CID} + echo "/${ids} | $(date '+%C%y-%m-%d') | $(date +%R)" >> ${CID}.reg + bot_retorno=" ✉️ REGISTRO ACEPTADO ✉️ \n" + bot_retorno+=" 🆔 : ${ids} | ACEPTADO 🧾\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid}|$(date +%R)\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ✅ ID REGISTRADO EXITOSAMENTE ✅\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" +unset i +for i in $(cat ${CID} | awk '{print $3}'); do +[[ "$(date -d $(date '+%C%y-%m-%d') +%s)" -ge "$(date -d $i +%s)" ]] && { +for id in $(cat ${CID} | grep "$i" | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do +sed -i "/${id}/d" ${CID} + bot_retor=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n" + bot_retor+=" SU MEMBRESIA HA FINALIZADO POR CHECK ID\n" + bot_retor+=" FIN DE CONTRADO : $(date '+%C%y-%m-%d') - $(date +%R) \n" + bot_retor+=" SI DESEAS APELAR TU CONTRADO, CONTACTA CON ${alias_admin}\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" ADQUIERE TU MEMBRESIA DESDE @$(ShellBot.username) , DIGITANDO /prices \n" + bot_retor+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +msj_add ${id} +done +} +done +[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username} +[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}" +[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}" + bot_retor=" ✉️ ESTIMADO @${nUSER} SU REGISTRO FUE APROBADO ✉️ \n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" EL ADM ${alias_admin} APROBO TU SOLICITUD\n" + bot_retor+=" ☺️GRACIAS POR CONFIAR EN NOSOTROS ☺️\n" + bot_retor+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid}|$(date +%R)\n" + bot_retor+=" 🆔 : ${ids} | 🔐 ACEPTADO 🧾\n" + bot_retor+=" SU RESELLER : ${firsnme} ${lastnm} \n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" GENERAR Key's usar el comando /keygen\n" + bot_retor+=" Para MENU Digita el comando /menu\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" CONTACTA ESCRIBE AL ADM ${alias_admin}\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @ChumoGH " + bot_retor+=" ADQUIERE TU MEMBRESIA DESDE @$(ShellBot.username) , DIGITANDO /prices \n" + bot_retor+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + msj_add ${ids} + #upfile_src + call.file2 "${CID}" " Respaldo con @${nUSER} \n ID : ${nombrevalue} \n FECHA $(date '+%C%y-%m-%d')" + } || { + bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+="Este ID ya esta Registrado\n" + bot_retorno+=" ❌ ID NO REGISTRADO ❌\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + } +} + +addID_reventa () { +bot_retorno=" -----🫥 FUNCION EN ESTADO BETA 🫥 ------\n" +bot_retorno+=" ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" ID ${ids} VALIDO HASTA $(cat ${CID} | grep ${ids} | awk '{print $3}')\n" +bot_retorno+=" ❌ NO REGISTRAR DUPLICADOS ❌\n" +bot_retorno+=" SE PRESENTAN REGLAS DE ESTE FORMATO \n" +bot_retorno+=" 1 ID - Podra autorizar maximo 10 IDs \n" +bot_retorno+=" Por maximo de 6 meses de tiempo! \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +bot_retorno+=" EL ADMIN PRINCIPAL, PODRA CONTROLAR \n" +bot_retorno+=" ESTAS AUTORIZACIONES \n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" +bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +msj_fun +} + + +addID_REV () { + ids=$(echo ${message_text[$id]} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig') + #idc=$(echo ${message_text[$id]} | awk '{print $3}' | sed -e 's/[^a-z0-9 -]//ig') + idc=$(echo ${message_text[$id]} | awk '{print $3}' | sed -e 's/[^a-z0-9 -]//ig') + [[ ${idc} > 180 ]] && idc='180' + valid=$(date '+%C%y-%m-%d' -d " +$idc days") + [[ $(cat ${${CIDRESS}}|grep "$ids" ) = "" ]] && { + echo "/${ids} | $valid | ${permited}" >> ${CIDRESS} + bot_retorno=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 @${callback_query_from_username} 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" New ID: ${ids}\n" + bot_retorno+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid}|$(date +%R)\n" + bot_retorno+=" ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ✅ ID REGISTRADO ✅\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" +unset i +for i in $(cat ${CIDRESS} | awk '{print $3}'); do +[[ $(date -d $i +%s) -ge $(date -d $(date '+%C%y-%m-%d') +%s) ]] || { +idlog=$(cat ${CIDRESS} | grep "$i" | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig') +sed -i "/${idlog}/d" ${CIDRESS} + bot_retor=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n" + bot_retor+="Desafortunadamente tu Membresia ha Finalizado\n" + bot_retor+="Fecha de Corte : $i \n" + bot_retor+="Si tienes Dudas, Contacta con ${alias_admin}\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+="Recuerda adquirir creditos, o Realizar una Colaboracion\n $(cat < /etc/mpayu) \n" + bot_retor+="Para mantener tu acceso al BotGen Recuerda Mostrar tu Token de Donacion o Compra\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" +msj_add ${idlog} +} +done + bot_retor=" ✉️ Bienvenido al BotGen ADMcgh/Plus ✉️ \n" + bot_retor+="𝙃𝙤𝙡𝙖 『 ${callback_query_from_first_name} ${callback_query_from_last_name} 』\n" + bot_retor+=" EL ADM ${alias_admin} te autorizo\n" + bot_retor+=" AUTORIZACION EXTENDIDA HASTA EL ${valid}\n" + bot_retor+=" GENERAR Key's usar el comando /keygen\n" + bot_retor+=" Para MENU Digita el comando /menu\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" CONTACTA ESCRIBE AL ADM ${alias_admin}\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @ChumoGH " + bot_retor+=" ADQUIERE TU MEMBRESIA DESDE @$(ShellBot.username) , DIGITANDO /prices \n" + bot_retor+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + msj_add ${ids} + #upfile_src + call.file2 "${CID}" " Respaldo con @${nUSER} \n ID : ${nombrevalue} \n FECHA $(date '+%C%y-%m-%d')" + } || { + bot_retorno=" -----🫥 ID YA REGISTRADO 🫥 ------\n" + bot_retorno+=" ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" ID ${ids} VALIDO HASTA $(cat ${CID} | grep ${ids} | awk '{print $3}')\n" + bot_retorno+=" ❌ NO REGISTRAR DUPLICADOS ❌\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + } +} + + + +call.cange.cupon(){ +unset _cupon _lista _code _date _ress _tru nombrevalue usrLOP firsnme lastnme +[[ -z ${nombrevalue} ]] && nombrevalue="${message_from_id}" +[[ -z ${nombrevalue} ]] && nombrevalue="${callback_query_from_id}" +[[ -z ${callback_query_from_username} ]] && usrLOP=${message_from_username} || usrLOP=${callback_query_from_username} +[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}" +[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}" +#my_ip=$(echo ${message_text[$id]} | cut -d "|" -f1) +#opcion=$(echo ${message_text[$id]} | cut -d "|" -f2) +#name=$(echo ${message_text[$id]} | cut -d "|" -f3) +_cupon="${message_text[$id]}" + +[[ $(cat /root/RegBOT/banID | grep -w ${nombrevalue}) ]] && { + bot_retorno=" =============================================\n" + bot_retorno+=" SU ID FUE BANEADO $(date '+%C%y-%m-%d') - $(date +%R) !! Contacta con ${alias_admin}!! \n" + bot_retorno+=" =============================================\n" + ShellBot.sendMessage --chat_id "${nombrevalue}" \ + --text "$(echo -e ${bot_retorno})" \ + --parse_mode html + return +} +[[ ${#_cupon} -gt 6 ]] && { +[[ -z ${usrLOP} ]] && { + local m_fail=" ========📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩========\n" + m_fail+=" ❌ DESAFORTUNADAMENTE NO POSEES UN ALIAS ! ❌\n" + m_fail+=" ❌ DIRIJETE A AJUSTES Y AÑADE NOMBRE DE USUARIO ❌\n" + m_fail+=" 🛡️ SU ID : ${nombrevalue} NO REFLEJA SU ALIAS\n" + m_fail+=" ⚠️ EL CUPON ${_cupon} NO PUEDE SER CANJEDO !\n" + m_fail+=" 🗃️ AÑADE UN ALIAS Y REINTENTA NUEVAMENTE!\n" + m_fail+=" ❌ ID NO REGISTRADO ❌\n" + ShellBot.sendMessage --chat_id "${permited}" \ + --reply_to_message_id "${message_message_id[$id]}" \ + --text "$(echo -e ${m_fail})" \ + --parse_mode html + ShellBot.sendMessage --chat_id "${nombrevalue}" \ + --reply_to_message_id "${message_message_id[$id]}" \ + --text "$(echo -e ${m_fail})" \ + --parse_mode html +return +} +_lista=$(cat /root/RegBOT/cupones | grep -w "${_cupon}") +[[ ! -z ${_lista} ]] && { +_code=$(echo -e "${_lista}" | cut -d '|' -f1) +_date=$(echo -e "${_lista}" | cut -d '|' -f2) +_ress=$(echo -e "${_lista}" | cut -d '|' -f3) +_tru=$(echo -e "${_lista}" | cut -d '|' -f4) +sed -i "/${_code}/d" /root/RegBOT/cupones +#sed -i "/${_code}/d" /var/www/html/cupones +valid=$(date '+%C%y-%m-%d' -d " +${_date} days") +[[ -z $_tru ]] && _tru='false' + c_cupon="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" 🎊 GRACIAS POR PREFERIRNOS @${usrLOP} 🎊\n" + #c_cupon+=" 📥 CUPON CANJEADO EXITOSAMENTE! 🎉\n" + c_cupon+=" EL CUPON VERIFICO ${_date} DIAS -1 ACTUAL! 🐲\n" + c_cupon+=" 🎄 CODIGO : ${_cupon} RETIRADO DE CATALOGO!\n" + c_cupon+=" ✨ FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n 📆 VALIDO HASTA : ${valid} | 00:00\n" +[[ ${_date} < 2 ]] && { +c_cupon+=" RECOMPENZA 1+ EXTRA EN TIMEZONE $(printf '%(%H:%M:%S)T') \n" +_date=2 +valid=$(date '+%C%y-%m-%d' -d " +${_date} days") +} + if sed -i "/${nombrevalue}/d" $HOME/RegBOT/banID; then + c_cupon+=" ✨ SU ID DESBANEADO EXITOSAMENTE ✨\n" + fi + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" SU RESELLER : ${firsnme} ${lastnm} \n" + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" 🆔 : ${nombrevalue} | 🔐 ACEPTADO 🧾\n" + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" MEMBRESIA DUALGEN EN : ${_tru}\n" + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" GENERAR Key's ChumoGH /keygen\n" + c_cupon+=" GENERAR Key's LATAM /kltm\n" + c_cupon+=" DOMINIO CloudFlare /domainA /domainNS\n" + c_cupon+=" Para MENU Digita el comando /menu\n" + c_cupon+=" INSTALAR SCRIPT REMOTO /remote\n" + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ $(cat ${CID}|grep "${nombrevalue}") = "" ]] && { + echo "/${nombrevalue} | $valid | ${_tru}" >> ${CID} + echo "${_code} | ${nombrevalue} | $valid | ${_tru} | @${usrLOP} | ${_cupon}" >> /root/RegBOT/cupon.done + #cp ${CID} $HOME/ + #backup_file $HOME/${usersAUTH} " RESPALDO DE ${alias_admin} " + #rm $HOME/${usersAUTH} + local _env_back=1 + echo "/${nombrevalue} | $(date '+%C%y-%m-%d') | $(date +%R)" >> $HOME/RegBOT/${nombrevalue}.reg + [[ -e $HOME/RegBOT/banID ]] && sed -i "/${nombrevalue}/d" $HOME/RegBOT/banID + [[ -e $HOME/RegBOT/U_check.txt ]] && sed -i "/${nombrevalue}/d" $HOME/RegBOT/U_check.txt + [[ -e $HOME/RegBOT/killID.log ]] && sed -i "/${nombrevalue}/d" $HOME/RegBOT/killID.log + _ca=1 + } || { + echo -e "AQUI SE VALIDARA EL ACUMULATIVO DE DIAS" + } + } || { + [[ -z $(cat < /root/RegBOT/cupon.done| grep -w "${_cupon}") ]] && c_cupon=" ❌ DESAFORTUNADAMENTE EL CUPON NO EXISTE! ❌\n" || c_cupon=" ❌ MUY TARDE, EL CUPON YA FUE CANJEADO! ❌\n" + c_cupon+=" 🛡️ ID : ${nombrevalue}, INTENTO : $(cat > /root/RegBOT/U_check.txt + _ca=0 +} +ShellBot.sendMessage --chat_id "${permited}" \ + --text "$(echo -e ${c_cupon})" \ + --parse_mode html +[[ $_env_back = 1 ]] && { +call.file2 "${CID}" " Respaldo con @${usrLOP} \n ID : ${nombrevalue} / ${_date} DIAS \n BACKUP FILE LIST-ID EL ${FECHA}" +echo -e "\n EJECUTANDO RECIVIITOOOO . . . . \n" +echo -e "\n\n ============================\n\n" +bash /etc/ADM-db/sources/factura.sh "@${usrLOP}" "${_date}" "${_cupon}" "0.00" "BotGen Generador Premium ${_date} Dias" +sleep 3s +[[ -e /etc/ADM-db/sources/factura.pdf ]] && call.recivo "/etc/ADM-db/sources/factura.pdf" " ESTIMADO @${usrLOP}, SU RECIVO DE SU CANJE!! " +rm -f /etc/ADM-db/sources/factura.pdf +} + +_env_back=0 +[[ -z ${_ress} ]] && _ress='ChumoGH' +local bot_retorno=" ========📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩========\n" + bot_retorno+=" ${c_cupon} " + bot_retorno+=" ================================= \n" + [[ ${_ca} = 1 ]] && bot_retorno+=" NO OLVIDES ENVIAR CAPTURA AL ADMIN! \n" + [[ ${_ca} = 1 ]] && bot_retorno+=" ================================= \n" + bot_retorno+="\n 💥 POWER BY @${_ress} 💥 \n" + bot_retorno+="\n ================================= \n" +msj_fun +} || { + bot_retorno=" =============================================\n" + bot_retorno+=" EL CUPON DEBE MANTENER UN FORMATO ESTANDAR!! \n ID REGISTRADO PARA POSIBLE BANEO \n" + bot_retorno+=" =============================================\n" + call.error ${bot_retorno} ${nombrevalue} +} +} + +call.cange.cuponC(){ +unset _cupon _lista _code _date _ress _tru nombrevalue usrLOP firsnme lastnme +[[ -z ${nombrevalue} ]] && nombrevalue="${message_from_id}" +[[ -z ${nombrevalue} ]] && nombrevalue="${callback_query_from_id}" +[[ -z ${callback_query_from_username} ]] && usrLOP=${message_from_username} || usrLOP=${callback_query_from_username} +[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}" +[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}" +#my_ip=$(echo ${message_text[$id]} | cut -d "|" -f1) +#opcion=$(echo ${message_text[$id]} | cut -d "|" -f2) +#name=$(echo ${message_text[$id]} | cut -d "|" -f3) +#_cupon="${message_text[$id]}" +_cupon="$1" + +[[ $(cat /root/RegBOT/banID | grep -w ${nombrevalue}) ]] && { + bot_retorno=" =============================================\n" + bot_retorno+=" SU ID FUE BANEADO $(date '+%C%y-%m-%d') - $(date +%R) !! Contacta con ${alias_admin}!! \n" + bot_retorno+=" =============================================\n" + ShellBot.sendMessage --chat_id "${nombrevalue}" \ + --text "$(echo -e ${bot_retorno})" \ + --parse_mode html + return +} +[[ ${#_cupon} -gt 6 ]] && { +[[ -z ${usrLOP} ]] && { + local m_fail=" ========📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩========\n" + m_fail+=" ❌ DESAFORTUNADAMENTE NO POSEES UN ALIAS ! ❌\n" + m_fail+=" 🛡️ ID : ${nombrevalue} SIN ALIAS\n" + m_fail+=" ⚠️ EL CUPON ${_cupon} NO PUEDE SER CANJEDO !\n" + m_fail+=" 🗃️ AÑADE UN ALIAS Y REINTENTA NUEVAMENTE!\n" + m_fail+=" ❌ ID NO REGISTRADO ❌\n" + ShellBot.sendMessage --chat_id "${permited}" \ + --text "$(echo -e ${m_fail})" \ + --parse_mode html + +return +} +_lista=$(cat /root/RegBOT/cupones | grep -w "${_cupon}") +[[ ! -z ${_lista} ]] && { +_code=$(echo -e "${_lista}" | cut -d '|' -f1) +_date=$(echo -e "${_lista}" | cut -d '|' -f2) +_ress=$(echo -e "${_lista}" | cut -d '|' -f3) +_tru=$(echo -e "${_lista}" | cut -d '|' -f4) +sed -i "/${_code}/d" /root/RegBOT/cupones +#sed -i "/${_code}/d" /var/www/html/cupones +valid=$(date '+%C%y-%m-%d' -d " +${_date} days") +[[ -z $_tru ]] && _tru='false' + c_cupon="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" 🎊 GRACIAS POR PREFERIRNOS @${usrLOP} 🎊\n" + #c_cupon+=" 📥 CUPON CANJEADO EXITOSAMENTE! 🎉\n" + c_cupon+=" EL CUPON VERIFICO ${_date} DIAS -1 ACTUAL! 🐲\n" + c_cupon+=" 🎄 CODIGO : ${_cupon} RETIRADO DE CATALOGO!\n" + c_cupon+=" ✨ FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n 📆 VALIDO HASTA : ${valid} | 00:00\n" +[[ ${_date} < 2 ]] && { +c_cupon+=" RECOMPENZA 1+ EXTRA EN TIMEZONE $(printf '%(%H:%M:%S)T') \n" +_date=2 +valid=$(date '+%C%y-%m-%d' -d " +${_date} days") +} + if sed -i "/${nombrevalue}/d" $HOME/RegBOT/banID; then + c_cupon+=" ✨ SU ID DESBANEADO EXITOSAMENTE ✨\n" + fi + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" SU RESELLER : ${firsnme} ${lastnm} \n" + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" 🆔 : ${nombrevalue} | 🔐 ACEPTADO 🧾\n" + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" MEMBRESIA DUALGEN EN : ${_tru}\n" + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + c_cupon+=" GENERAR Key's ChumoGH /keygen\n" + c_cupon+=" GENERAR Key's LATAM /kltm\n" + c_cupon+=" DOMINIO CloudFlare /domainA /domainNS\n" + c_cupon+=" Para MENU Digita el comando /menu\n" + c_cupon+=" INSTALAR SCRIPT REMOTO /remote\n" + c_cupon+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ $(cat ${CID}|grep "${nombrevalue}") = "" ]] && { + local _env_back=1 + echo "/${nombrevalue} | $valid | ${_tru}" >> ${CID} + echo "${_code} | ${nombrevalue} | $valid | ${_tru} | @${usrLOP} | ${_cupon}" >> /root/RegBOT/cupon.done + echo "/${nombrevalue} | $(date '+%C%y-%m-%d') | $(date +%R)" >> $HOME/RegBOT/${nombrevalue}.reg + [[ -e $HOME/RegBOT/banID ]] && sed -i "/${nombrevalue}/d" $HOME/RegBOT/banID + [[ -e $HOME/RegBOT/U_check.txt ]] && sed -i "/${nombrevalue}/d" $HOME/RegBOT/U_check.txt + [[ -e $HOME/RegBOT/killID.log ]] && sed -i "/${nombrevalue}/d" $HOME/RegBOT/killID.log + _ca=1 + } + } || { + [[ -z $(cat < /root/RegBOT/cupon.done| grep -w "${_cupon}") ]] && c_cupon=" ❌ DESAFORTUNADAMENTE EL CUPON NO EXISTE! ❌\n" || c_cupon=" ❌ MUY TARDE, EL CUPON YA FUE CANJEADO! ❌\n" + c_cupon+=" 🛡️ ID : ${nombrevalue}, INTENTO : $(cat > /root/RegBOT/U_check.txt + _ca=0 +} +ShellBot.sendMessage --chat_id "${permited}" \ + --text "$(echo -e ${c_cupon})" \ + --parse_mode html + +[[ $_env_back = 1 ]] && { +call.file2 "${CID}" " Respaldo con @${usrLOP} \n ID : ${nombrevalue} / ${_date} DIAS \n BACKUP FILE LIST-ID EL $(date '+%C%y-%m-%d')" +echo -e "\n EJECUTANDO RECIVIITOOOO . . . . \n" +echo -e "\n\n ============================\n\n" +bash /etc/ADM-db/sources/factura.sh "@${usrLOP}" "${_date}" "${_cupon}" "0.00" "BotGen Generador Premium ${_date} Dias" +sleep 3s +[[ -e /etc/ADM-db/sources/factura.pdf ]] && call.recivo "/etc/ADM-db/sources/factura.pdf" " ESTIMADO @${usrLOP}, SU RECIVO DE SU CANJE!! " +rm -f /etc/ADM-db/sources/factura.pdf +} + +_env_back=0 + +[[ -z ${_ress} ]] && _ress='ChumoGH' +local bot_retorno=" ========📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩========\n" + bot_retorno+=" ${c_cupon} " + bot_retorno+=" ================================= \n" + [[ ${_ca} = 1 ]] && bot_retorno+=" NO OLVIDES ENVIAR CAPTURA AL ADMIN! \n" + [[ ${_ca} = 1 ]] && bot_retorno+=" ================================= \n" + bot_retorno+="\n 💥 POWER BY @${_ress} 💥 \n" + bot_retorno+="\n ================================= \n" +msj_fun +} || { + bot_retorno=" =============================================\n" + bot_retorno+=" EL CUPON DEBE MANTENER UN FORMATO ESTANDAR!! \n ID REGISTRADO PARA POSIBLE BANEO \n" + bot_retorno+=" =============================================\n" + call.error ${bot_retorno} ${nombrevalue} +} +} + +call.error () { + ShellBot.sendMessage --chat_id "$2" \ + --text "$(echo -e $1)" \ + --parse_mode html +return +} + +call.MPrecios(){ +local bot_retorno="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retorno+=" 🔴《 FUNCION CAMBIAR PRECIOS GENERICOS 》⚫️\n" + bot_retorno+="━━━━━━《🔴》━━━━━━\n" + bot_retorno+=" ❒ MANTENER PRECISO ESTANDAR\n" + bot_retorno+=" ❒ ESCRIBIR LA SINTAXIS CORRECTA\n" + bot_retorno+=" ❒ AGREGA CARACTERES FIGURAS, ETC \n" + bot_retorno+=" ❒ SUBE EL FICHERO A GitHub/Dropbox \n" + bot_retorno+=" ❒ EXTRAE EL URL/LINK PUBLICO \n" + bot_retorno+=" ❒ MUESTRA LOS PRECIOS CON /prices\n" + bot_retorno+="━━━━━━━|[ 🦁 ]|━━━━━━━ \n\n" + bot_retorno+=" EJEMPLO : AQUI👈 \n" + bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" + bot_retorno+=" RECUERDA NO ESPACIOS \n" +msj_fun +} + +#================================================================== + +call.domain (){ +local _n='1' +local bot_retorno="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retorno+=" 🔴《 FUNCION DOMINIOS DISPONIBLES 》⚫️\n" + bot_retorno+="━━━━━━━━《⚫️》━━━━━━━━\n" + IFS=',' read -ra lista <<< "$_dmi" + for _lDOM in ${lista[@]}; do + bot_retorno+=" ${_n}) ✅ *.${_lDOM} $(echo -e $_cdu | cut -d ',' -f${_n})\n" + let _n++ + done + bot_retorno+="━━━━━━《🔴》━━━━━━\n" + bot_retorno+=" GUIA : 👉AQUI👈\n" + bot_retorno+="━━━━━━《🔴》━━━━━━\n" + bot_retorno+=" ❒ ESCOGER 1 DOMINIO DISPONIBLES\n" + bot_retorno+=" ❒ ESCRIBIR LA SINTAXIS CORRECTA\n" + bot_retorno+=" ❒ D/(DNS) | P/(PROXY)\n" + bot_retorno+=" ❒ FORMATO : IP|1|nombre|D\n" + bot_retorno+=" ❒ RESULTADO : nombre.xxxxx.xxx\n" + bot_retorno+="━━━━━━|[ EJEMPLO ]|━━━━━━ \n\n" + bot_retorno+=" 10.20.5.1|1|ejemplo123|D \n" + bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" + bot_retorno+=" RECUERDA NO ESPACIOS \n" +msj_fun +#--call.domainA +#--call.domainNS +} + + +call.add(){ +unset MSG_up +local bot_retorno="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retorno+=" ❒ TAB ID A AUTORIZAR ${message_message_id} \n" + bot_retorno+=" ❒ ESCRIBIR LA SINTAXIS CORRECTA\n" + bot_retorno+=" ❒ FORMATO : ID | dias | false/true\n" + bot_retorno+=" ❒ FALSE | DualGen No Permitido\n" + bot_retorno+=" ❒ TRUE | DualGen Permitido \n" + bot_retorno+=" ❒ RESULTADO : REGISTRO APROBADO !!\n" + bot_retorno+="━━━━━━━|[ 🦁 ]|━━━━━━━ \n\n" + bot_retorno+=" EJEMPLO : X1X2X3X4X5 | 30 | false \n" + bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" +#MSG_id=$((${message_message_id} - 1 )) +MSG_up="${message_message_id}" +MSG_med=$((${message_message_id} + 1 )) +MSG_down=$((${message_message_id} + 2 )) +msj_fun +} + +call.domainB (){ +local _n='1' +local bot_retorno="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retorno+=" 🔴《 FUNCION DOMINIOS DISPONIBLES 》⚫️\n" + bot_retorno+="━━━━━━━━《⚫️》━━━━━━━━\n" + IFS=',' read -ra lista <<< "$_dmi" + for _lDOM in ${lista[@]}; do + bot_retorno+=" ${_n}) ✅ *.${_lDOM}\n" + let _n++ + done + bot_retorno+="━━━━━━《🔴》━━━━━━\n" + bot_retorno+=" ❒ REGISTRO PREVIO DE SubDOMINIO A-@\n" + bot_retorno+=" ❒ ESCRIBIR LA SINTAXIS CORRECTA\n" + bot_retorno+=" ❒ FORMATO : domain|NS_nombre\n" + bot_retorno+=" ❒ RESULTADO : NS_name.domain\n" + bot_retorno+="━━━━━━━|[ 🦁 ]|━━━━━━━ \n\n" + bot_retorno+=" EJEMPLO : domain.com|ejemploNS \n" + bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" + bot_retorno+=" RECUERDA NO ESPACIOS \n" +msj_fun +#--call.domainA +#--call.domainNS +} + +call.domainA (){ +my_ip=$(echo ${message_text[$id]} | cut -d "|" -f1) +opcion=$(echo ${message_text[$id]} | cut -d "|" -f2) +name=$(echo ${message_text[$id]} | cut -d "|" -f3) +typeD=$(echo ${message_text[$id]} | cut -d "|" -f4) +[[ -e ${typeD} ]] && typeD='D' +[[ ${typeD} = 'P' ]] && tproxy='true' || tproxy='false' +#-----------------APIS + TOKEN ------------------------ +#source <(curl -sL https://www.dropbox.com/s/w2ic8ewvfk6zpp5/tokenapis.sh) + +case $opcion in + 1)_domain1;; + 2)_domain2;; + 3)_domain3;; + 4)_domain4;; + 5)_domain5;; + 6)_domain6;; + 0)break;; +esac + +echo -e $token +echo -e ${_domain} +local bot_retorno="━━━━━━━━━━━━━━━━━━━━━ \n" + + ls_dom=$(curl -s -X GET "$url/$_dns/dns_records?per_page=100" \ + -H "Authorization: Bearer $token" \ + -H "Content-Type: application/json" | jq '.') + + num_line=$(echo $ls_dom | jq '.result | length') + ls_domi=$(echo $ls_dom | jq -r '.result[].name') + ls_ip=$(echo $ls_dom | jq -r '.result[].content') + + if [[ $(echo "$ls_ip"|grep -w "$my_ip") = "$my_ip" ]];then + for (( i = 0; i < $num_line; i++ )); do + if [[ $(echo "$ls_dom" | jq -r ".result[$i].content"|grep -w "$my_ip") = "$my_ip" ]]; then + domain=$(echo "$ls_dom" | jq -r ".result[$i].name") + #echo "$domain" > ${ADM_src}/dominio.txt + echo "$my_ip|$domain|$opcion" >> /root/RegBOT/dominios.log + break + fi + done + bot_retorno+=" ⚠️ ADVERTENCIA DE ERROR ⚠️\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" YA EXISTE UN IP REGISTRADO \n" + bot_retorno+=" IP REGISTRADA -> $my_ip 🕸️\n" + bot_retorno+=" ˅ 🔗 APUNTA A 🔗 ˅ \n" + bot_retorno+=" Subdominio : 🌎 $domain \n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + msj_fun + return 0 + fi +var=$(cat <> /root/RegBOT/dominios.log + #echo "$(echo $chek_domain|jq -r '.result.name')" > ${ADM_src}/dominio.txt + bot_retorno+=" IP REGISTRADA : $my_ip\n" + bot_retorno+=" ✅ SubDOMINIO A -> @ ACEPTADO ✅\n" + [[ ${tproxy} = true ]] && bot_retorno+=" SubDomain Proxied Automatico\n" || bot_retorno+=" SubDomain de tipo solo DNS\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + [[ ${tproxy} = true ]] && bot_retorno+=" ❒ Proxied : $(echo $chek_domain|jq -r '.result.name')\n" || bot_retorno+=" ❒ DNS Only : $(echo $chek_domain|jq -r '.result.name')\n" + + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+="RECUERDA SI QUIERES DOMINIO TIPO PROXY \n" + bot_retorno+=" AÑADE LA P AL FINAL COMO SE MUESTRA EL \n" + bot_retorno+=" EJEMPLO : ${my_ip}|${opcion}|${name}|P \n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" FECHA : $(date '+%Y-%m-%d') | HORA $(printf '%(%H:%M:%S)T')\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + [[ ${opcion} -eq 4 || ${opcion} -eq 5 ]] && bot_retorno+=" DOMINIO DONADO POR @HYDRAVPS \n" + [[ ${opcion} -eq 4 || ${opcion} -eq 5 ]] && bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + else + bot_retorno+=" ❎ SubDOMINIO A -> @ RECHAZADO ❎\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" ❒ RESULTADO : ❌ ERROR ❌\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + fi +msj_fun +#--call.domainA +#--call.domainNS +} + +call.msgUSER (){ +local bot_retorno="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retorno+=" 🔴《 MENSAJE DEL ADMINISTRADOR 》⚫️\n" + bot_retorno+="━━━━━━《🔴》━━━━━━\n" + bot_retorno+=" ❒ ESCRIBIR LA SINTAXIS CORRECTA\n" + bot_retorno+=" ❒ FORMATO : MENSAJE XXX|ID\n" + bot_retorno+=" ❒ PUEDES AÑADIR ESPACIOS Y URLS\n" + bot_retorno+=" ❒ COLOCA EL | ANTES DEL ID\n" + bot_retorno+=" ❒ RESULTADO : MENSAJE ENVIADO\n" + bot_retorno+="━━━━━━━|[ 🦁 ]|━━━━━━━ \n\n" + bot_retorno+=" EJEMPLO : HOLA QUE TAL|${chatuser} \n" + bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" +msj_fun +} + +call.msgENV() { +mss=$(echo ${message_text[$id]} | cut -d "|" -f1) +idUSR=$(echo ${message_text[$id]} | cut -d "|" -f2) +local bot_retorno="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retorno+=" 🔴《 MENSAJE ENVIADO CORRECTAMENTE 》⚫️\n" + bot_retorno+="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retorno+=" ${mss}\n" + bot_retorno+="━━━━━━━━《⚫️》━━━━━━━━\n" +msj_fun +local bot_retor="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retor+=" 🔴《 MENSAJE DEL ADMINISTRADOR 》⚫️\n" + bot_retor+="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retor+="${mss}\n" + bot_retor+="━━━━━━《⚫️》━━━━━━\n" + bot_retor+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retor+=" ⚜ by ${alias_admin} ⚜\n" + bot_retor+="━━━━━━《⚫️》━━━━━━\n" +msj_add "${idUSR}" +} + +call.RMT() { +MSG_id=$((${message_message_id} + 1 )) +local bot_retorno="━━━━━━━━《⚫️》━━━━━━━━\n" + bot_retorno+=" 🔴《 FUNCION INSTALAR SCRIPT REMOTO 》⚫️\n" + bot_retorno+="━━━━━━━━《⚫️》━━━━━━━━\n" + #bot_retorno+=" 1) ✅ *.chumogh.site\n" + #bot_retorno+=" 2) ✅ *.chumogh.online\n" + #bot_retorno+=" 3) ✅ *.antonioyt.online\n" + #bot_retorno+="━━━━━━《🔴》━━━━━━\n" + bot_retorno+=" ❒ LEER LAS INDICACIONES \n" + bot_retorno+=" ❒ COLOCAR CORRECTAMENTE LOS DATOS\n" + bot_retorno+=" ❒ FORMATO : IP|nombre_user|clave\n" + bot_retorno+=" ❒ RESULTADO : DONE!!\n" + bot_retorno+="━━━━━━━|[ 🦁 ]|━━━━━━━ \n\n" + bot_retorno+=" EJEMPLO : 192.168.1.1|root|miclave123 \n" + bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" + bot_retorno+=" RECUERDA NO ESPACIOS \n" +msj_fun + +} + +del_msj(){ + msg=(${message_message_id[$id]} $1) + for i in ${msg[@]}; do + ShellBot.deleteMessage --chat_id ${message_chat_id[$id]} --message_id "$i" + done + return 0 +} + +call.remote () { +msj_del ${message_message_id} +msj_del ${MSG_id} +MSG_id=$((${message_message_id} + 1 )) +local _domain=$(echo ${message_text[$id]} | cut -d "|" -f1) +local _dmNS=$(echo ${message_text[$id]} | cut -d "|" -f2) +local name=$(echo ${message_text[$id]} | cut -d "|" -f3) +local bot_retorno="━━━━━━━━《⚫️》━━━━━━━━\n" +bot_retorno+="\n ❒ RECUERDA LEER ESTE MENSAJE \n" +bot_retorno+="\n ❒ NO ENTREGES TUS CREDENCIALES \n" +bot_retorno+="\n ❒ SI NOTAS USO EXCESIVO, REINSTALA TU SERVIDOR \n" +bot_retorno+="\n ❒ ChumoGH No CAMUFLA PUERTOS NI USO DE RAM Y CPU \n" +bot_retorno+="\n ❒ POR SEGURIDAD MANEJAMOS NUEVO PROTOCOLO DE CONTROL! \n" +bot_retorno+="\n━━━━━━━|[ 🦁 ]|━━━━━━━ \n" +bot_retorno+=" ESTA FUNCION ESTA EN DISEÑO!! \n" +msj_fun +#msj_del $((${MSG_id} - 1 )) +sleep 10s +msj_del ${message_message_id} +} + + +call.domainNS (){ +unset domain opcion +local my_domain=$(echo ${message_text[$id]} | cut -d "|" -f1) +local _dmNS=$(echo ${message_text[$id]} | cut -d "|" -f2) +local name=$(echo ${message_text[$id]} | cut -d "|" -f3) +#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +local bot_retorno="━━━━━━━━━━━━━━━━━━━━━ \n" +echo -e "${my_domain}" +#-----------------APIS + TOKEN ------------------------ +source <(curl -sSL https://www.dropbox.com/s/w2ic8ewvfk6zpp5/tokenapis.sh) + +# Utilizar case para verificar diferentes patrones y llamar a las funciones correspondientes +case "${my_domain}" in +*admcgh.site*) +echo -e " SOLICITADO : ${my_domain}" +_domain1 +echo -e " API_REJ : ${_domain}" +;; +*admcgh.online*) +echo -e " SOLICITADO : ${my_domain}" +_domain2 +echo -e " API_REJ : ${_domain}" +;; +*antonioyt.online*) +echo -e " SOLICITADO : ${my_domain}" +_domain3 +echo -e " API_REJ : ${_domain}" +;; +*hydravpsmx.es*) +echo -e " SOLICITADO : ${my_domain}" +_domain4 +echo -e " API_REJ : ${_domain}" +;; +*feelhydra.com*) +echo -e " SOLICITADO : ${my_domain}" +_domain5 +echo -e " API_REJ : ${_domain}" +;; +*) +echo "Ningún patrón coincidente encontrado." + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" ${my_domain} NO PERTENECE AL TOKEN!! \n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" IMPOSIBLE REGISTRAR ${_dmNS}.${_domain}\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" ❒ RESULTADO : ❌ ERROR ❌\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + msj_fun + return 0 +;; +esac +#case $opcion in +# 1)_domain1;; +# 2)_domain2;; +# 3)_domain3;; +# 4)_domain4;; +# 5)_domain5;; +# 6)_domain6;; +# 0)break;; +#esac + +local ls_dom=$(curl -s -X GET "$url/$_dns/dns_records?per_page=100" \ + -H "Authorization: Bearer $token" \ + -H "Content-Type: application/json" | jq '.') +local num_line=$(echo $ls_dom | jq '.result | length') +local ls_domi=$(echo $ls_dom | jq -r '.result[].name') +local ls_ip=$(echo $ls_dom | jq -r '.result[].content') +echo -e $token +my_ip= +if echo "$ls_domi" | grep -w "${my_domain}"; then + if [[ $(echo "$ls_ip"|grep -w "$my_domain") = "$my_domain" ]];then + + for (( i = 0; i < $num_line; i++ )); do + if [[ $(echo "$ls_dom" | jq -r ".result[$i].name"|grep -w "$my_domain") ]]; then + my_ip=$(echo "$ls_dom" | jq -r ".result[$i].content") + fi + if [[ $(echo "$ls_dom" | jq -r ".result[$i].content"|grep -w "$my_domain") ]]; then + _domainNS=$(echo "$ls_dom" | jq -r ".result[$i].name") + my_ip=$(echo "$ls_dom" | jq -r ".result[$i].content") + if sed -i "/${my_domain}/d" /root/RegBOT/dominios.log; then + bot_retorno+=" Dominio NS REEMPLAZADO : ${_domainNS}!\n" + echo "$my_ip|$my_domain|$opcion|${_domainNS}" >> /root/RegBOT/dominios.log + else + bot_retorno+=" DOMINIO REGISTRADO : ${_domainNS}!\n" + echo "$my_ip|$my_domain|$opcion|${_domainNS}" >> /root/RegBOT/dominios.log + fi + break + fi + done + bot_retorno+=" YA CUENTAS CON UN NS ASOCIADO A ESTE SubDOMINIO\n" + #bot_retorno+=" OPCION -> $opcion\n" + bot_retorno+=" $my_ip -> $domain\n" + bot_retorno+=" $my_domain -> ${_domainNS}\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" IMPOSIBLE REGISTRAR ${_dmNS}.${_domain}\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" ❒ RESULTADO : ❌ ERROR ❌\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + msj_fun + return 0 + fi + +var_NS=$(cat <<_NS + { + "type": "NS", + "name": "${_dmNS}.${_domain}", + "content": "${my_domain}" + } +_NS +) + dom_NS=$(curl -s -X POST "$url/$_dns/dns_records" \ + -H "Authorization: Bearer $token" \ + -H "Content-Type: application/json" \ + -d $(echo $var_NS|jq -c '.')|jq '.') + + if [[ $(echo "$dom_NS"|jq -r '.success'|grep 'true') ]]; then + bot_retorno+=" ✅ SubDOMINIO NS ACEPTADO ✅\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n\n" + bot_retorno+=" ❒ IP PRINCIPAL : ${my_ip}\n" + bot_retorno+=" ❒ DOMAIN Tipo/A : ${my_domain}\n" + bot_retorno+=" ❒ DOMAIN Tipo/NS: $(echo $dom_NS|jq -r '.result.name')\n\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" FECHA : $(date '+%Y-%m-%d') | HORA $(printf '%(%H:%M:%S)T')\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + [[ ${opcion} -eq 4 || ${opcion} -eq 5 ]] && bot_retorno+=" DOMINIO DONADO POR @HYDRAVPS \n" + [[ ${opcion} -eq 4 || ${opcion} -eq 5 ]] && bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + else + bot_retorno+=" ❎ SubDOMINIO NS RECHAZADO ❎\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" ❒ RESULTADO : ❌ ERROR ❌\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + fi + msj_fun +else + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" ❎ SubDOMINIO TIPO A NO REGISTRADO ❎\n" + bot_retorno+=" PRIMERO REGISTRA $my_domain A UN IP\n" + bot_retorno+=" TOCA /domainA Y LEE LAS INSTRUCCIONES\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" LUEGO REGISTRA ${_dmNS}.${_domain} COMO NS\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + bot_retorno+=" ❒ RESULTADO : ❌ ERROR ❌\n" + bot_retorno+="━━━━━━━━━━━━━━━━━━━━━ \n" + msj_fun + return 0 +fi + +#--call.domainA +#--call.domainNS +} + + +dupdate2 (){ +MSG_id=$((${message_message_id} + 1 )) +#echo '#!/bin/bash +local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" +bot_retorno+="$LINE\n" +bot_retorno+=" UPDATE AUTOMATICO : ⚠️ ACTIVADO \n" +bot_retorno+="$LINE\n" +msj_fun +exit +rm -rf /etc/SCRIPT +systemctl disable BotGen-server.service +systemctl stop BotGen-server.service +rm -rf /etc/ADM-db +sleep 1s +msj_del ${message_message_id} +msj_del ${MSG_id} +} + +update () { +files_script +} + +upfile_fun () { + [[ -z ${permited} ]] && { + [[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + } || var=${permited} + + ShellBot.sendDocument --chat_id $var \ + --document @${1} \ + #--caption "$(echo -e "$2")" \ + #--parse_mode html \ +} + +upfile_src () { +cp ${CID} $HOME/ +upfile_fun $HOME/${usersAUTH} +rm $HOME/${usersAUTH} +} +call.upload () { +_id="$2" +cp "$1" $HOME/${_id}.cgh +upfile_fun $HOME/${_id}.cgh +rm $HOME/${_id}.cgh +} + +#================================================================== + +menu_print () { +[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + + if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then + # ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \ # + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_user')" + + else + # ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \ # + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_conf')" + fi +} + +menu_printSN () { +[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + + if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_send_id')" + fi +} + +call.botonADDrev () { +[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + +# if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'boton_addREV')" +# fi +} + +menu_BT_ADD () { +[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + + if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'boton_addREV')" + fi +} + + +download_file () { +# shellbot.sh editado linea 3986 +user=${usersAUTH} +[[ -e ${CID} ]] && rm ${CID} +local file_id + ShellBot.getFile --file_id ${message_document_file_id[$id]} + ShellBot.downloadFile --file_path "${return[file_path]}" --dir "${CIDdir}" + [[ -e ${return[file_path]} ]] && mv ${return[file_path]} ${CID} +local bot_retorno="Copia de serguridad ${user}\n" + bot_retorno+="$LINE\n" + bot_retorno+="Se restauro con exito!!\n" + bot_retorno+="$LINE\n" + bot_retorno+="${return[file_path]}\n" + bot_retorno+="$LINE\n" + bot_retorno+="RESTAURADO ${user} con $(cat ${CID} | wc -l) ID´s\n" + bot_retorno+="$LINE" + ShellBot.sendMessage --chat_id "${message_chat_id[$id]}" \ + --reply_to_message_id "${message_message_id[$id]}" \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html + #call.upload "${CID}" "${message_chat_id[$id]}" + call.file2 "${CID}" "${message_chat_id[$id]}" +return 0 +} + +call.mssFAC () { + local bot_retorno="FACTURA CON CODIGO ${user}.cgh SERA RECEPTADA \n" + bot_retorno+="$LINE\n" + bot_retorno+=" ${return[file_path]} < - https://$(wget -qO- ifconfig.me)/8799/${user}.cgh" + bot_retorno+="$LINE\n" + bot_retorno+=" CONTACTE A SU ADMIN PARA VERIFICAR SU COMPRA!!\n" + bot_retorno+="$LINE\n" + bot_retorno+=" RECUERDA NOTIFICAR TU FORMATO DEL ARCHIVO \n EJEMPLO FILE.png" + bot_retorno+="$LINE" + boton_upfile + msj_fun +} + +download_FAC () { +# shellbot.sh editado linea 4001 +user="$id" +#[[ -e ${CIDimg}/${user}.cgh ]] && rm -f ${CIDimg}/${user}.cgh +#local file_id + #ShellBot.getFile --file_id ${message_document_file_id[$id]} + #ShellBot.downloadFile --file_path "${return[file_path]}" --dir "${CIDdir}" + #[[ -e ${return[file_path]} ]] && mv ${return[file_path]} ${CIDimg}/${user}.cgh + local bot_retorno="FACTURA CON CODIGO ${user}.cgh RECEPTADA \n" + bot_retorno+="$LINE\n" + bot_retorno+=" ${return[file_path]} < - https://$(wget -qO- ifconfig.me)/8799/${user}.cgh" + bot_retorno+="$LINE\n" + bot_retorno+=" CONTACTE A SU ADMIN PARA VERIFICAR SU COMPRA!!\n" + bot_retorno+="$LINE\n" + bot_retorno+=" FILE LOCAL ${return[file_path]} \n" + bot_retorno+="$LINE" + msj_fun + #call.upload "${return[file_path]}" "${message_chat_id[$id]}" + call.file2 "${CID}" " SU RECIVO DE FACTURA EN FORMATO TXT" +} + +msj_add () { +[[ -z $1 ]] && id_receptor=${chatuser} || id_receptor=$1 +[[ -z $2 ]] || bot_retor=$2 + ShellBot.sendMessage --chat_id "${id_receptor}" \ + --text "$(echo -e $bot_retor)" \ + --parse_mode html +} + +msj_newKEY () { +[[ -z $1 ]] && id_receptor=${chatuser} || id_receptor=$1 +[[ -z $2 ]] || bot_retor=$2 + ShellBot.sendMessage --chat_id "${id_receptor}" \ + --text "$(echo -e $bot_retor)" \ + --parse_mode html +} + +call.ITEM.fijos () { +local item_access='' +[[ -z $1 ]] && id_receptor=${chatuser} || id_receptor=$1 +[[ -z $2 ]] || chatbot=$2 +[[ -z $3 ]] || no_valid=$3 + +#BOTONES DE TOKEN DE AUTORIZACIONES FIJOS +ShellBot.InlineKeyboardButton --button 'item_access' --line 1 --text '2 DIAS' --callback_data "/aggBT ${no_valid}|2" +ShellBot.InlineKeyboardButton --button 'item_access' --line 1 --text '4 DIAS' --callback_data "/aggBT ${no_valid}|4" +ShellBot.InlineKeyboardButton --button 'item_access' --line 1 --text '7 DIAS' --callback_data "/aggBT ${no_valid}|7" +ShellBot.InlineKeyboardButton --button 'item_access' --line 2 --text '15 DIAS' --callback_data "/aggBT ${no_valid}|15" +ShellBot.InlineKeyboardButton --button 'item_access' --line 2 --text '30 DIAS' --callback_data "/aggBT ${no_valid}|30" +ShellBot.InlineKeyboardButton --button 'item_access' --line 2 --text '60 DIAS' --callback_data "/aggBT ${no_valid}|60" +ShellBot.InlineKeyboardButton --button 'item_access' --line 3 --text '90 DIAS' --callback_data "/aggBT ${no_valid}|90" +ShellBot.InlineKeyboardButton --button 'item_access' --line 3 --text '179 DIAS' --callback_data "/aggBT ${no_valid}|179" +ShellBot.InlineKeyboardButton --button 'item_access' --line 3 --text '365 DIAS' --callback_data "/aggBT ${no_valid}|365" +ShellBot.InlineKeyboardButton --button 'item_access' --line 4 --text 'DIAS CUSTOM' --callback_data "/add" + + ShellBot.sendMessage --chat_id ${id_receptor} \ + --text "$(echo -e "$chatbot")" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'item_access')" +} + +backup_file () { + #[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + ShellBot.sendDocument --chat_id ${permited} \ + --document @${1} \ + --caption "$(echo -e "$2")" \ + --parse_mode html \ + #--reply_markup "$(ShellBot.ForceReply)" +} + +call.file2 () { + #[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + ShellBot.sendDocument --chat_id "$(echo -e "${permited}")" \ + --document @${1} \ + --caption "$(echo -e "$2")" \ + --parse_mode html \ + ShellBot.pinChatMessage --chat_id "$permited" --message_id "${return[message_id]}" + #--reply_markup "$(ShellBot.InlineKeyboardMarkup -b "$2")" +ShellBot.pinChatMessage --chat_id "${chatuser}" --message_id "${return[message_id]}" +} + +call.recivo () { +[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + ShellBot.sendDocument --chat_id "$var" \ + --document @${1} \ + --caption "$(echo -e "$2")" \ + --parse_mode html + #ShellBot.pinChatMessage --chat_id "$permited" --message_id "${return[message_id]}" + #--reply_markup "$(ShellBot.InlineKeyboardMarkup -b "$2")" +unset _ID; +} + + +upimg_fun () { + ShellBot.sendDocument --chat_id $(echo -e "${permited}") \ + --document @${1} \ + #--caption "$(echo -e "$bot_retorno")" \ + #--parse_mode html \ + #--reply_markup "$(ShellBot.ForceReply)" + #--reply_markup "$(ShellBot.InlineKeyboardMarkup -b "$2")" +} + +invalido_fun () { +MSG_id=$((${message_message_id} + 1 )) + [[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + local bot_retorno=" ⚠️ 𝘉𝘪𝘦𝘯𝘷𝘦𝘯𝘪𝘥𝘰 𝘢 𝘈𝘋𝘔𝘤𝘨𝘩 𝘉𝘰𝘵𝘎𝘌𝘕 ⚠️\n" + _endSHOPP="$(cat < $HOME/RegBOT/${chatuser}.reg | grep -w ${var} | tail -1)" #| awk '{print $5,$9}' + [[ -z ${_endSHOPP} ]] && _endSHOPP="null" + [[ $(cat < $HOME/RegBOT/killID.log | grep -w ${var}) ]] && { + bot_retorno+=" =============================================\n" + bot_retorno+=" SU 🆔 : ${chatuser} HA EXPIRADO 🚫" + bot_retorno+=" =============================================\n" + bot_retorno+=" ULTIMA COMPRA : ${_endSHOPP}\n" + bot_retorno+=" =============================================\n" + bot_retorno+=" VENCIDO EL $(cat < $HOME/RegBOT/killID.log | grep -w ${var}| awk '{print $5,$9}' | head -1)\n" + bot_retorno+=" =============================================\n" + bot_retorno+=" RENUEVA TU ACCESO 🛒🛍️ PINCHANDO \n" + bot_retorno+=" =============================================\n" + } || { + [[ $(cat /root/RegBOT/banID | grep -w ${chatuser}) ]] && { + bot_retorno+=" =============================================\n" + bot_retorno+=" SU ID FUE BANEADO $(date '+%C%y-%m-%d') - $(date +%R) !! Contacta con ${alias_admin}!! \n" + bot_retorno+=" =============================================\n" + } || { + bot_retorno+="$LINE\n" + bot_retorno+=" COMANDO NO PERMITIDO !!\n Prueba usar este /menu para ver las opciones disponibles\n Clic aqui /prices o \n Contacta a $alias_admin y adquiere una subscripcion \n" + bot_retorno+="$LINE\n" + } + } + #menu_printSN + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html + sleep 1s + msj_del ${message_message_id} + msj_del ${MSG_id} + return 0 +} + + + +listID_GEN () { +unset bot_lin +n=1 +for i in $(cat ${CID} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do +idlog=$(cat ${CID} | grep "$i" | awk '{print $3}') +#idGEN=$(grep -o -i $idlog /etc/ADM-db/num-key.cont | wc -l) +[[ -e /etc/ADM-db/num-key.cont ]] && idGEN=$(cat /etc/ADM-db/num-key.cont | grep $i | wc -l) || idGEN=0 +bot_lin+=" $n] > ${i}| $idlog | ${idGEN}\n" +#lsid=$(cat -n ${CID}) +let n++ +done +local bot_retorno="$LINE\n" + bot_retorno+=' - ID´S AUTORIZADOS + GENERADAS -\n' + bot_retorno+="$LINE\n" + bot_retorno+=" $(echo -e ${bot_lin}) " #|column -t -s '-')" + bot_retorno+="$LINE\n" +call.Chat_long $bot_retorno +} + +listID_src () { +local _ids='' +local _line=1 +local lsid='' +for _ids in $(cat < ${CID}| cut -d '|' -f1 |sed -e 's/[^a-z0-9 -]//ig') ; do +_dateID=$(cat < ${CID}|grep -w ${_ids}| cut -d '|' -f2) +_dual=$(cat < ${CID}|grep -w ${_ids}| cut -d '|' -f3) +[[ -z ${_dual} ]] && _dual='false' + lsid+=" ${_line}] - /${_ids} | ${_dateID} | ${_dual} \n" + let _line++ +done +#lsid="$(cat -n ${CID} | cut -d '|' -f1) | $(cat ${CID} | cut -d '|' -f) " +local listIDSRC="=================================\n" + listIDSRC+=" ID'S AUTORIZADOS -\n" + listIDSRC+=". n] ===== ID ====== FECHA ====== DUAL ===\n" + listIDSRC+=" ${lsid} " + listIDSRC+="=================================\n" + +#max_length=4000 + +call.Chat_long "${listIDSRC}" +# ShellBot.sendMessage --chat_id "$(cat < /etc/ADM-db/Admin-ID| head -1)" \ +# --text "$(echo -e "${listIDSRC}")" \ +# --parse_mode html +} + +listIDREV_src () { +lsid=$(cat -n ${CIDRESS} | grep -v ${permited}) +local bot_retorno=" $LINE\n" + bot_retorno+=" - ID'S AUTORIZADOS -\n" + bot_retorno+="$LINE\n" + bot_retorno+="${lsid}\n" + bot_retorno+="$LINE\n" +msj_fun +} + +ChatADM () { +local bot_retorno=" $LINE\n" + bot_retorno+=" ENVIA TU ARCHIVO O COMPROBANTE AL ADM\n" + bot_retorno+=" MODELO EN EVOLUCCION DE @ChumoGH\n" + bot_retorno+="\n" + bot_retorno+="$LINE\n" +msj_fun +} + + + +list_IP () { +unset lsid +unset idchek +[[ -z ${idchek} ]] && idchek="${message_from_id}" +[[ -z ${idchek} ]] && idchek="${callback_query_from_id}" +[[ -z "$(cat ${CID} | grep ${idchek} )" ]] && { + [[ "$(echo -e "${permited}")" == "${idchek}" ]] && { + cat /var/www/html/ChumoGH/checkIP.log > /tmp/ips + echo -e " $(cat /tmp/ips | awk '{print $3}' | uniq)" > /tmp/ipchek + lsid=$(cat -n /tmp/ipchek) + local bot_retorno=" $LINE\n" + bot_retorno+=' - ULTIMOS IP´S UNICOS CAPTURADOS \n' + bot_retorno+=" - TIENES $(cat /var/www/html/ChumoGH/checkIP.log | wc -l) IP´s CAPTURADAS \n" + bot_retorno+="$LINE\n" + bot_retorno+=" ${lsid}\n" + bot_retorno+="$LINE\n" + } + +} || { +cat /var/www/html/ChumoGH/checkIP.log | grep "${idchek}" > /tmp/ips +echo -e " $(cat /tmp/ips | awk '{print $3}' | uniq)" > /tmp/ipchek +lsid=$(cat -n /tmp/ipchek) +local bot_retorno=" $LINE\n" + bot_retorno+=' - ULTIMOS IP´S UNICOS CAPTURADOS \n' + bot_retorno+=" - TIENES $(cat /var/www/html/ChumoGH/checkIP.log | grep ${idchek} | wc -l) IP´s CAPTURADAS DE TUS GENERADAS \n" + bot_retorno+="$LINE\n" + bot_retorno+=" ${lsid}\n" + bot_retorno+="$LINE\n" +} +call.Chat_long $bot_retorno +} + + +listID_RESS () { +i=1 +for lRES in $(ls ${CIDRESS}); do +echo " $i /$lRES" +let i++ +done +lsid=$(ls ${CIDRESS}) +local bot_retorno="$LINE\n" + bot_retorno+="Lista de id permitidos\n" + bot_retorno+="$LINE\n" + bot_retorno+="${lsid}\n" + bot_retorno+="$LINE\n" +msj_fun +} + +ayuda_src () { +bot_retorno=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 $message_from_first_name $message_from_last_name 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 ADMcgh 🎊\n" + if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then + if [[ $(cat ${CID}|grep "${chatuser}") = "" ]]; then + #bot_retorno+="/ID\n 𝚖𝚞𝚎𝚜𝚝𝚛𝚊 𝚜𝚞𝚜 𝙸𝙳 𝚍𝚎 𝚝𝚎𝚕𝚎𝚐𝚛𝚊𝚖 \n 𝚙𝚊𝚛𝚊 𝚝𝚎𝚗𝚎𝚛 𝚊𝚌𝚌𝚎𝚜𝚘 𝚊𝚕 /𝚔𝚎𝚢𝚐𝚎𝚗\n 𝚍𝚎𝚟𝚎 𝚎𝚗𝚟𝚒𝚊𝚛 𝚜𝚞 𝙸𝙳 𝚊𝚕 𝚊𝚍𝚖𝚒𝚗 ${alias_admin}\n" + bot_retorno+="$LINE\n" + bot_retorno+="(Boton) Keygen\n genera una key para\n el instalador del script\n para tener acceso\n deve enviar su ID al admin ${alias_admin}\n" + bot_retorno+="(Boton) Solicitar Acceso\n Envia una solicitud a ${alias_admin}\n" + bot_retorno+="$LINE\n" + bot_retorno+="/cupon Para canjear un cupon ADQUIRIDO\n" + bot_retorno+="$LINE\n" + bot_retorno+=" /menu\n muestra el menu\n de comandos disponibles\n" + bot_retorno+=" /domainA Te permite enlazar un Subdominio a tu IP VPS\n" + bot_retorno+=" GUIA PARA DOMINIOS : https://youtu.be/1oPXnnoSSGQ\n" + bot_retorno+=" /domainNS Te permite enlazar un Subdominio NS a tu Dominio\n" + bot_retorno+="$LINE\n" + bot_retorno+="/prices\n COSTOS DE ACCESO AL BOT\n" + bot_retorno+="$LINE\n" + else + bot_retorno+="/ID\n muestra sus ID de telegram\n para tener acceso al /keygen\n deve enviar su ID al admin ${alias_admin}\n" + bot_retorno+="$LINE\n" + bot_retorno+="(Boton) Keygen\n genera una key para\n el instalador del script\n para tener acceso\n deve enviar su ID al admin ${alias_admin}\n" + bot_retorno+="$LINE\n" + bot_retorno+="/instal\n muestra el link de instalacion\n del script para usar sus key\n" + bot_retorno+=" /domainA Te permite enlazar un Subdominio a tu IP VPS\n" + bot_retorno+=" GUIA PARA DOMINIOS : https://youtu.be/1oPXnnoSSGQ\n" + bot_retorno+=" /domainNS Te permite enlazar un Subdominio NS a tu Dominio\n" + bot_retorno+="$LINE\n" + bot_retorno+="/menu\n muestra el menu\n de comandos disponibles\n" + bot_retorno+="$LINE\n" + bot_retorno+="/ayuda\n muestra este menu de ayuda\n" + bot_retorno+="$LINE\n" + bot_retorno+=" /domainA Te permite enlazar un Subdominio a tu IP VPS\n" + bot_retorno+=" /domainNS Te permite enlazar un Subdominio NS a tu Dominio\n" + bot_retorno+="$LINE\n" + bot_retorno+="/donar\n ayuda Voluntaria\n" + bot_retorno+="$LINE\n" + fi + else + bot_retorno+="/infosys\n muestra informacion del sistema\n Ram, Cpu, Fecha y Hora\n" + bot_retorno+="$LINE\n" + bot_retorno+="/ID\n muestra sus ID de telegram\n para tener acceso al /keygen\n deve enviar su ID al admin ${alias_admin}\n" + bot_retorno+="$LINE\n" + bot_retorno+="/add\n añade nuevo ID\n para dar acceso /keygen\n modo de uso\n /add 123456789 | dias \n" + bot_retorno+="$LINE\n" + bot_retorno+="/del\n elimina los ID\n antes deves usar /list\n modo de uso\n /del Selecciona el ID\n \n" + bot_retorno+="$LINE\n" + bot_retorno+="/list\n muestra una lista de id\n" + bot_retorno+="$LINE\n" + bot_retorno+="(Boton) Keygen\n genera una key para\n el instalador del script\n para tener acceso\n deve enviar su ID al admin ${alias_admin}\n" + bot_retorno+="$LINE\n" + bot_retorno+="/instal\n muestra el link de instalacion\n del script para usar sus key\n" + bot_retorno+="$LINE\n" + bot_retorno+="/power\n poner o sacar de linea el generador\n" + bot_retorno+="$LINE\n" + bot_retorno+="/menu\n muestra el menu\n de comandos disponibles\n" + bot_retorno+="$LINE\n" + bot_retorno+="/ayuda\n muestra este menu de ayuda\n" + bot_retorno+="$LINE\n" + bot_retorno+="/cache\n limpia el cache contenido en la ram\n" + bot_retorno+="$LINE\n" + bot_retorno+="/reboot\n Reinicia el servidor vps\n" + bot_retorno+="$LINE\n" + fi +msj_fun +} + +call.revoc () { +MSG_id=$((${message_message_id} + 1 )) +screen -wipe &> /dev/null +[[ -e ${CIDdir}/Fix ]] && { +_Fix="$(netstat -tlpn | grep -w 8888)" + netstat -tlpn | grep -w 8888 > /dev/null || { + screen -r -S 'generador' -X quit + kill $(ps x | grep -v grep | grep "/bin/http-server.sh" | cut -d ' ' -f1) &>/dev/null + systemctl restart keygen-server &>/dev/null + } + local bot_retorno=" ✉️ ====== NOTIFICACION ====== ✉️ \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ -z ${_Fix} ]] && bot_retorno+=" LOCALHOST BASE GEN : REINICIADO ✅\n" || bot_retorno+=" LOCALGEN BASE : 🔥 FUNCIONAL 🔥 \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + [[ -z ${_Fix} ]] && bot_retorno+=" FIX CONEXION (PORT 8888 TCP) ✅ \n" || bot_retorno+=" PORT 8888 TCP FUNCIONAL ✅ \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun +} || { + echo -e "$(date '+%C%y-%m-%d')|$(date +%R)" > ${CIDdir}/Fix + kill $(ps x | grep -v grep | grep "/bin/http-server.sh" | cut -d ' ' -f1) &>/dev/null + netstat -tlpn | grep -w 8888 > /dev/null || systemctl restart keygen-server &>/dev/null + MSG_id=$((${message_message_id} + 1 )) + [[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username} + local bot_retorno=" ✉️ ====== NOTIFICACION ====== ✉️ \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" LOCALHOST BASE GEN : REINICIADO ✅\n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retorno+=" FIX CONEXION (PORT 8888 TCP) ✅ \n" + bot_retorno+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + bot_retor+=" - EL USUARIO @${nUSER} SOLICITO REINICIO -\n" + bot_retor+=" FALLO DE CONEXION (PORT 8888 TCP) \n" + bot_retor+="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ \n" + msj_fun + ShellBot.sendMessage --chat_id ${permited} \ + --text "$(echo -e $bot_retor)" \ + --parse_mode html + sleep 3s + msj_del ${message_message_id} + msj_del ${MSG_id} + } +} + +start_gen () { +unset PIDGEN +PIDGEN=$(ps aux|grep -v grep|grep "http-server.sh") +if [[ ! $PIDGEN ]]; then +systemctl restart keygen-server &>/dev/null +MSG_id=$((${message_message_id} + 1 )) + local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" + bot_retorno+="$LINE\n" + bot_retorno+=" Generador: REINICIADO ✅\n" + bot_retorno+="$LINE\n" +msj_fun +sleep 3s +msj_del ${message_message_id} +msj_del ${MSG_id} +else +killall http-server.sh +systemctl stop keygen-server &>/dev/null +MSG_id=$((${message_message_id} + 1 )) + local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" + bot_retorno+="$LINE\n" + bot_retorno+=" Generador: ⚠️ Offline ❌\n" + bot_retorno+="$LINE\n" +msj_fun +sleep 3s +msj_del ${message_message_id} +msj_del ${MSG_id} +fi +} + +files_script() { +MSG_id=$((${message_message_id} + 1 )) +#echo '#!/bin/bash +local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" +bot_retorno+="$LINE\n" +wget -q --no-check-certificate -O /tmp/files.tar.gz https://www.dropbox.com/s/as1lrq3wedg5v5z/SCRIPT.tar.gz && bot_retorno+=" EJECUTANDO UPDATE MASIVO DE FUERZA BRUTA: ⚠️ DETECTADO POR @ChumoGH \n" || bot_retorno+=" EJECUCION FALLIDA : ⚠️ RECHAZADO POR @ChumoGH \n" +bot_retorno+="$LINE\n" +msj_fun +sleep 1s +msj_del ${message_message_id} +msj_del ${MSG_id} +rm -f /etc/SCRIPT/* +MSG_id=$((${message_message_id} + 1 )) +#echo '#!/bin/bash +local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" +bot_retorno+="$LINE\n" +[[ -e /tmp/files.tar.gz ]] && tar -xzvf /tmp/files.tar.gz -C /etc/SCRIPT && bot_retorno+=" RECOMPILANDO BotGen Server: ⚠️ DETECTADO POR @ChumoGH \n" || bot_retorno+=" EJECUCION FALLIDA : ⚠️ RECHAZADO POR @ChumoGH \n" +chmod 666 /etc/SCRIPT/* +[[ -e /etc/SCRIPT/http-server.py ]] && mv /etc/SCRIPT/http-server.py /bin/http-server.sh +chmod +x /bin/http-server.sh +bot_retorno+="$LINE\n" +msj_fun +sleep 1s +msj_del ${message_message_id} +msj_del ${MSG_id} +genon +MSG_id=$((${message_message_id} + 1 )) +#echo '#!/bin/bash +local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" +bot_retorno+="$LINE\n" +cd $HOME +[[ $(ls /etc/SCRIPT/ | wc -l) > 0 ]] && bot_retorno+=" Generador: ⚠️ ACTUALIZADO \n" || bot_retorno+=" ERROR AL ACTUALIZAR, INGRESE AL SERVIDOR\n" +bot_retorno+="$LINE\n" +msj_fun +sleep 1s +msj_del ${message_message_id} +msj_del ${MSG_id} +} + + +send_admin(){ + + local bot_retorno2="$LINE\n" + bot_retorno2+="💥 Solicitud de autorizacion 💥\n" + bot_retorno2+="$LINE\n" + bot_retorno2+="Nombre: ${callback_query_from_first_name}\n" + [[ ! -z ${callback_query_from_username} ]] && bot_retorno2+="Alias: @${callback_query_from_username}\n" + bot_retorno2+="ID: ${callback_query_from_id}\n" + bot_retorno2+="$LINE" + + bot_retorno="$LINE\n" + bot_retorno+=" 💥 Bot ADMcgh GEN de KEY 💥\n" + bot_retorno+=" ⚜ by @ChumoGH ⚜\n" + bot_retorno+="$LINE\n" + bot_retorno+=" ✅ SOLICITUD ENVIADA AL ADM ✅\n" + bot_retorno+="$LINE" + comand_boton "atras" + + saveID "${callback_query_from_id}" + var=${permited} + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e "$bot_retorno2")" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_save_id')" + + return 0 +} + +Call.MSG.ADM () { +mensaje_chat=$1 +_idCHAT=$2 +[[ -z ${_idCHAT} ]] && _idCHAT=${permited} + ShellBot.sendMessage --chat_id ${_idCHAT} \ + --text "$(echo -e "${mensaje_chat}")" \ + --parse_mode html + +} + + +msj_fun () { +[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} +[[ -z $1 ]] || var=$1 + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e "$bot_retorno")" \ + --parse_mode html +#[[ "$1" == "BotGen" ]] && systemctl stop BotGen-server.service +return 0 +} + +msj_del () { +local var + [[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + ShellBot.deleteMessage --chat_id $var --message_id $1 + return 0 +} + +msj_img () { +#${timg}/id_${usrLOP}.png +local file_id + ShellBot.getFile --file_id "$1" + #ShellBot.downloadFile --file_path "${return[file_path]}" --dir "${timg}/id_${usrLOP}.png" + #[[ -e ${return[file_path]} ]] && mv ${return[file_path]} "${timg}/id_${usrLOP}.png1" + + #[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + #ShellBot.sendPhoto --chat_id $var --photo @${timg}/id_${usrLOP}.png + #ShellBot.deleteMessage --chat_id $var --message_id $1 + upimg_fun +local bot_retorno="ID user botgen\n" + bot_retorno+="$LINE\n" + bot_retorno+="Se restauro con exito!!\n" + bot_retorno+="$LINE\n" + bot_retorno+=" FILE ${return[file_path]} \n" + bot_retorno+="$LINE" + ShellBot.sendMessage --chat_id "${message_chat_id[$id]}" \ + --reply_to_message_id "${message_message_id[$id]}" \ + --text "$(echo -e $bot_retorno)" \ + --parse_mode html + + return 0 +} + + + +msj_chat () { + [[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + ShellBot.sendChatAction --chat_id $var --action typing + #ShellBot.deleteMessage --chat_id $var --message_id $1 + return 0 +} + +call.Chat_long () { +listIDSRC=$1 +ShellBot.sendChatAction --chat_id $chatuser --action typing +max_length=4000 +# Dividir el texto en partes más pequeñas +while [ -n "$listIDSRC" ]; do + # Tomar una porción del texto dentro del límite de longitud + local parte="${listIDSRC:0:$max_length}" + # Enviar la parte como un mensaje + ShellBot.sendMessage --chat_id "${permited}" \ + --text "$(echo -e "${parte}")" \ + --parse_mode html + # Eliminar la parte ya enviada del texto largo + listIDSRC="${listIDSRC:$max_length}" +done +return 0 +} + +msj_donar () { + [[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e "$bot_retorno")" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_donar')" + return 0 +} + + ofusLTM() { + 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 + } + + +saveID(){ + unset botao_save_id + botao_save_id='' + ShellBot.InlineKeyboardButton --button 'botao_save_id' --line 1 --text "Autorizar ID" --callback_data "/saveid $1" +} + +Call.BT.ADM () { +_ID=$1 +local _chat=" ========📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩========\n" + _chat+=" FAVOR ESOGE UN ADM A REALIAZAR PETICION \n" + _chat+=" ================================= \n" + + ShellBot.sendMessage --chat_id ${_ID} \ + --text "$(echo -e "$_chat")" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'boton_ADMINS')" +} + +call.keygen () { +local bot_chatBT=$1 +[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} +bss_boton='' +echo -e "${chatuser}" +echo -e "${bot_chatBT}" +ShellBot.InlineKeyboardButton --button 'bss_boton' --line 1 --text ' 🗝️ NUEVO KEY 🗝️' --callback_data '/keygen' + ShellBot.sendMessage --chat_id $var \ + --text "$(echo -e $bot_chatBT)" \ + --parse_mode html \ + --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'bss_boton')" +#ShellBot.pinChatMessage --chat_id "${chatuser}" --message_id "${return[message_id]}" +} + + +botao_conf='' +botao_user='' +botao_donar='' +botao_send_id='' +boton_add='' +boton_addREV='' +boton_upfile='' +boton_ADMINS='' +boton_key='' +_pos=1 +for A in $(echo -e "${permited}" | cut -d '|' -f1); do +ShellBot.InlineKeyboardButton --button 'boton_ADMINS' --line ${_pos} --text "$(echo -e "${permited}"| grep -w ${A} | cut -d '|' -f2)" --callback_data "/hsjdhsdhjsgdf ${A}" +let _pos++ +done + +ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 1 --text " MI ID " --callback_data '/id' +ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 2 --text "SOLICITAR ACCESO" --callback_data '/sendid' +#ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 1 --text " 🔎 WHATSAPP" --callback_data '1' --url "https://wa.me/$(cat < /etc/numctc)" +#ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 2 --text "CANAL ORG" --callback_data '1' --url "https://t.me/ChumoGHADM" +#ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 2 --text "GRUPO ORG" --callback_data '1' --url "https://t.me/ChumoGH_ADM" +#ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 3 --text " 👨🏾‍💻 ADMIN ORIGINAL 👨🏾‍💻" --callback_data '1' --url 'https://t.me/ChumoGH' +ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 1 --text " 💲 PRECIOS 💰" --callback_data '/prices' +ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 1 --text " 💻 Key FREE 💻 " --callback_data '/kfree' +ShellBot.InlineKeyboardButton --button 'boton_key' --line 1 --text " 💻 Key FREE 💻 " --callback_data '/keygen' + +ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text ' AÑADIR ID' --callback_data '/add' +ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text ' BORRAR ID' --callback_data '/del' +ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text ' ID REG' --callback_data '/list' +ShellBot.InlineKeyboardButton --button 'boton_add' --line 1 --text ' AÑADIR ' --callback_data '/add' +ShellBot.InlineKeyboardButton --button 'boton_add' --line 1 --text ' BORRAR ' --callback_data '/del' +ShellBot.InlineKeyboardButton --button 'botao_conf' --line 2 --text ' BUSCAR ID' --callback_data '/buscar' +#[[ -e /etc/systemd/system/btkill ]] && ShellBot.InlineKeyboardButton --button 'botao_conf' --line 2 --text ' ON | OFF ' --callback_data '/killon' +ShellBot.InlineKeyboardButton --button 'botao_conf' --line 2 --text '💩 GEN KEY LTM 🥜' --callback_data '/kltm' +#ShellBot.InlineKeyboardButton --button 'boton_addREV' --line 1 --text ' AÑADIR REVENDEDOR' --callback_data '/addrev' +#ShellBot.InlineKeyboardButton --button 'boton_addREV' --line 1 --text ' BORRAR REVENDEDOR' --callback_data '/delrev' +ShellBot.InlineKeyboardButton --button 'botao_conf' --line 4 --text '🔑 GEN KEY CGH 🔥' --callback_data '/keygen' + + +ShellBot.InlineKeyboardButton --button 'botao_user' --line 1 --text '🔑 GEN KEY CGH 🔥' --callback_data '/keygen' +ShellBot.InlineKeyboardButton --button 'botao_user' --line 2 --text '💩 GEN KEY LTM 🥜' --callback_data '/kltm' +ShellBot.InlineKeyboardButton --button 'botao_user' --line 2 --text ' 🧿 Ban|IP 📲' --callback_data '/banIP' # '1' --url "https://t.me/${alias_admin}" +#ShellBot.InlineKeyboardButton --button 'botao_user' --line 2 --text ' 🛒 CATALOGO 📝 ' --callback_data '1' --url "$(cat < /etc/urlCT)" +#ShellBot.InlineKeyboardButton --button 'botao_user' --line 3 --text '💰 DONAR 💰' --callback_data '/kltm' #'1' --url "$(cat < /etc/urlDN)" +#ShellBot.InlineKeyboardButton --button 'botao_user' --line 3 --text ' 🪀 WTS 📲' --callback_data '1' --url "https://wa.me/$(cat < /etc/numctc)" +ShellBot.InlineKeyboardButton --button 'botao_user' --line 3 --text ' DOMINIO 🌎 A-@' --callback_data '/domainA' +ShellBot.InlineKeyboardButton --button 'botao_user' --line 3 --text ' DOMINIO 🌎 NS ' --callback_data '/domainNS' +ShellBot.InlineKeyboardButton --button 'botao_user' --line 4 --text ' MENU ' --callback_data '/menu' + +#ShellBot.InlineKeyboardButton --button 'botao_user' --line 2 --text ' Contacto 📲' --callback_data '1' --url 'https://wa.me/593987072611?text=Hola!,%20ℂ𝕙𝕦𝕞𝕠𝔾ℍ%20Me%20interesa%20Conocer%20más%20sobre%20el%20ADM.' +ShellBot.InlineKeyboardButton --button 'botao_donar' --line 2 --text 'Donar Paypal' --callback_data '1' --url "$(cat < /etc/urlDN)" +ShellBot.InlineKeyboardButton --button 'botao_donar' --line 2 --text 'ACCEDER WHATSAPP' --callback_data '1' --url "https://wa.me/$(cat < /etc/numctc)" + + +# Ejecutando escucha del bot +while true; do + ShellBot.getUpdates --limit 100 --offset $(ShellBot.OffsetNext) --timeout 30 + for id in $(ShellBot.ListUpdates); do + chatuser="$(echo ${message_chat_id[$id]}|cut -d'-' -f2)" + [[ -z $chatuser ]] && chatuser="$(echo ${callback_query_from_id[$id]}|cut -d'-' -f2)" + echo $chatuser >&2 + #echo "user id $chatuser" + comando=(${message_text[$id]}) + [[ -z $comando ]] && comando=(${callback_query_data[$id]}) + #echo "comando $comando" + comand + done +done diff --git a/init/setup.bot b/init/setup.bot new file mode 100644 index 0000000..13159e4 --- /dev/null +++ b/init/setup.bot @@ -0,0 +1,866 @@ +#!/bin/bash +[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ADMcgh/main/Plugins/system/styles.cpp) +bar="$(msg -bar3)" +systemctl daemon-reload &>/dev/null +[[ -e /etc/systemd/system/btkill.service ]] && systemctl restart btkill.service &>/dev/null +tr=${id} +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 +} + +# SISTEMA DE SELECAO +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;37mOpcion: " >&2 +read selection +tput cuu1 >&2 && tput dl1 >&2 +done +echo $selection +} + +check_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" +} + +function_verify () { +unset keybot + +permited=$(curl -sSL "https://www.dropbox.com/s/5hr0wv1imo35j1e/Control-Bot.txt") + + [[ $(echo $permited|grep "${IP}") = "" ]] && { + clear + echo -e "\n\n\n" + msg -bar3 + echo -e "\e[31m ¡LA IP $(wget -qO- ipv4.icanhazip.com) FUE RECHAZADA!" + echo -e " $link No AUTORIZADA el ACCESO " + echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH" + msg -bar3 + echo -e "\n\n\n" + [[ -e "/bin/ShellBot.sh" ]] && rm -f /bin/ShellBot.sh + exit 1 + } || { + ### INTALAR VERCION DE SCRIPT + clear + echo -e "\n\n\n" + msg -bar3 + echo -e "\e[32m ¡LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!" + echo -e " -> [NGINX} Autorizada" + msg -bar3 + echo -e "\n\n\n" + CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} + v1=$(curl -sSL "https://www.dropbox.com/s/8tizr516cvkwss6/v-new.log") + echo "$v1" > /etc/ADM-db/vercion + } +} + +edit_cost () { +msg -bar3 +echo -e "\033[1;37mRECUERDA EDITAR LOS COSTOS O TIEMPOS\n Para Salir Ctrl + C o 0 Para Regresar\033[1;33m" +echo -e " \033[1;31m[ !!! ]\033[1;33m RECUERDA, UNA VEZ EDITADO NO PODRAS VOLVER A \n TENER EL ORIGINAL, A MENOS QUE REINSTALES \033[1;31m\033[1;33m" +msg -bar3 +echo -e " \033[1;31mLuego de editar Presiona Ctrl + O y Enter \033[1;33m \033[1;31m\033[1;33m" +echo -e " \033[1;31m Por Ultimo Ctrl + X \033[1;33m \033[1;31m\033[1;33m" +echo -ne "\033[1;37m" +read -p " Presiona Enter para Continuar " +nano /etc/ADM-db/sources/costes +systemctl restart BotGen-server &>/dev/null +echo -e " MODIFICADO EXITOSAMENTE" +bot_gen +} + +crear_cupon () { +unset cupon tm numk +msg -bar3 +echo -e " \033[7;49;35m ${TTini} 🐲 BotGEN ChumoGH${TTcent}ADM ( V1.0 ) 🐲 ◄◄<=== \033[0m" +msg -bar3 +echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;35m> \033[1;37m CREAR 1 CUPON UNICO " +echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;35m> \033[1;37m CREAR CUPONES POR LOTE )" +echo -e "\033[0;35m[\033[0;36m3\033[0;35m] \033[0;35m> \033[1;37m VER CUPONES ACTIVOS \033[1;32m ( $(cat < /root/RegBOT/cupones | wc -l) )" +msg -bar3 +echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR" +msg -bar3 +selection=$(selection_fun 3) +case ${selection} in +1) +echo -ne "\033[1;37m" +read -p " INGRESA CODIGO DE CUPON :" cupon +[[ $(cat /root/RegBOT/cupones | grep -w ${cupon}) ]] && { + echo -e "CUPON YA REGISTRADO " + return +} +[[ -z ${cupon} ]] && cupon=$(echo $RANDOM | md5sum | head -c 15) +tput cuu1 && tput dl1 +read -p " INGRESA TIEMPO DE ACCESO :" tm +[[ -z ${tm} ]] && tm='7' +tput cuu1 && tput dl1 +read -p " INGRESA NOMBRE DE REGALO :" rg +[[ -z ${rg} ]] && rg='ChumoGH' +tput cuu1 && tput dl1 +read -p " MEMBRESIA DUALGEN ( Enter ):" mb +tput cuu1 && tput dl1 +[[ -z ${mb} ]] && mb=false +echo -e "${cupon}|${tm}|${rg}|${mb}" >> /root/RegBOT/cupones +echo -e " ${cupon} | ${rg} " +read -p ' PRESIONA ENTER PARA FINALIZAR !!' +;; +2) +unset numk +msg -bar3 +echo " Bienvenido, Porfavor ingresa el numero de keys a generar" +read -p " CUANTOS CUPONES SE GENERARAN : " numk +[[ -z ${numk} ]] && numk='2' +tput cuu1 && tput dl1 +read -p " INGRESA TIEMPO DE ACCESO :" tm +[[ -z ${tm} ]] && tm='2' +tput cuu1 && tput dl1 +read -p " INGRESA NOMBRE DE REGALO :" rg +[[ -z ${rg} ]] && rg='ChumoGH' +tput cuu1 && tput dl1 +read -p " MEMBRESIA DUALGEN ( Enter ):" mb +tput cuu1 && tput dl1 +[[ -z ${mb} ]] && mb=false +echo -e "${cupon}|${tm}|${rg}|${mb}" >> /root/RegBOT/cupones +for((w=0; w<$numk; w++)); do +valuekey="$(date | md5sum | head -c3)" +valuekey+="$(echo $(($RANDOM*10))| md5sum |head -c 15)" +#echo -e " $(($w + 1))] - ${valuekey} - ${rg} " +echo -e " ${valuekey} " +#echo -e " $(($w + 1))] - ${valuekey} " +echo -e "${valuekey}|${tm}|${rg}|${mb}" >> /root/RegBOT/cupones +sleep .5 +done +msg -bar3 +read -p ' PRESIONA ENTER PARA FINALIZAR !!' +;; +3) +clear&&clear +pos=1 +echo -e " - LISTA DE CUPONES DISPONIBLES - " +msg -bar3 +echo -e " TIENES $(cat < /root/RegBOT/cupones | wc -l) CUPONES REGISTRADOS" +msg -bar3 +for codeX in $(cat < /root/RegBOT/cupones |cut -d '|' -f1); do +echo -e "\033[0;35m [\033[0;32m${pos}\033[0;35m]\033[0;33m ${flech}${cor[3]} -${codeX} - $(cat < /root/RegBOT/cupones| grep -w ${codeX} |cut -d '|' -f2) Dias" |column -s "-" -t +let pos++ +done +msg -bar3 +read -p ' PRESIONA ENTER PARA FINALIZAR !!' +;; +0) return 0 ;; +esac +msg -bar3 +systemctl restart BotGen-server &>/dev/null +echo -e " MODIFICADO EXITOSAMENTE" +bot_gen +} + +change_pay () { +unset option +clear +echo -e "$bar" +echo -e " MENSAJE ACTUAL $(cat < /etc/mpayu)" +echo -e "$bar" +echo -e " \033[1;37mINGRESA TU METODO DE PAGO Y/O CORREO" +echo -e "$bar\n" +echo -e "Ingresa en este Orden o Secuencia \n PAYPAL : chumogh@gmail.com \n" +echo -e "$bar" +read -p "TEXTO: " opcion +[[ -z $opcion ]] && bot_gen && exit || echo "$opcion" > /etc/mpayu && echo "TOKEN APLICADO EXITOSAMENTE" +read -p " Enter para Continuar" +echo -e "$bar" +echo -e " \033[1;37m NUMERO DE CONTACTO ACTUAL $(cat < /etc/numctc) " +echo -e "$bar\n" +echo -e " Ingresa en este Orden o FORMATO \n 593987072611 \n" +echo -e "$bar" +read -p "TEXTO: " opcion1 +opcion1="$(echo -e "$opcion1" | sed -e 's/[^0-9]//ig')" +[[ -z $opcion ]] && return || { +echo -e "$opcion1" > /etc/numctc +chmod +x /etc/numctc +echo "TOKEN APLICADO EXITOSAMENTE" +systemctl restart BotGen-server &>/dev/null +} +echo -e "$bar\n" +echo -e " AGREGA NUEVO URL DE CATALOGO / OPCIONAL \n https://shoppy.gg/@ChumoGH/ \n" +echo -e "$bar" +read -p "TEXTO: " nmsg +[[ -z $nmsg ]] && return || { +echo -e "$nmsg" > /etc/urlCT +chmod +x /etc/urlCT +echo "URL APLICADO EXITOSAMENTE" +systemctl restart BotGen-server &>/dev/null +} +echo -e "$bar\n" +echo -e " AGREGA NUEVO ENLACE PARA DONACIONES / OPCIONAL \n https://www.paypal.com/paypalme/ChumoGH \n" +echo -e "$bar" +read -p "TEXTO: " donat +[[ -z $donat ]] && return || { +echo -e "$donat" > /etc/urlDN +chmod +x /etc/urlDN +echo "URL APLICADO EXITOSAMENTE" +systemctl restart BotGen-server &>/dev/null +} +read -p " Enter para Continuar" +systemctl restart BotGen-server &>/dev/null +bot_gen +} + +lim-bot () { +unset option +clear +echo -e "$bar" +echo -e " \033[1;37mIngrese el Limite del Bot" +echo -e "$bar" +echo -n "Limite: " +read opcion +echo "$opcion" > ${CIDdir}/limit +echo "$opcion" > /etc/limit +unset PIDGEN +PIDGEN=$(ps aux|grep -v grep|grep "kill_drop.sh") +if [[ ! $PIDGEN ]]; then + msg -bar3 + echo -ne "\033[1;97m Poner en linea KILL ID [s/n]: " + read bot_ini + msg -bar3 +[[ $bot_ini = @(s|S|y|Y) ]] && { + + echo -e "[Unit] +Description=BotGen Service by @ChumoGH +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +User=root +WorkingDirectory=/root +ExecStart=/bin/bash /etc/ADM-db/sources/kill_drop.sh +Restart=always +RestartSec=60s + +[Install] +WantedBy=multi-user.target" > /etc/systemd/system/btkill.service + systemctl enable btkill &>/dev/null + systemctl start btkill &>/dev/null + msg -bar3 + echo -e "\033[1;31m Bot ID KILL ACTIVADO" + msg -bar3 + } +else +killall kill_drop.sh &>/dev/null +systemctl stop btkill &>/dev/null +systemctl disable btkill &>/dev/null +rm /etc/systemd/system/btkill.service &>/dev/null +clear +msg -bar3 +echo -e "\033[1;31m Bot ID KILL fuera de linea" +msg -bar3 +fi +read -p "Presione Enter para continuar " +bot_gen + + +#echo "sed -i "s/1001282138571/0/g" /etc/gerar-sh-log +#echo '#!/bin/bash -e +#sleep 24h' > ${CIDdir}/sumlimit +#echo 'newq=$(cat < /etc/ADM-db/limit) +#opcion=$(cat < /etc/limit) +#newsum=$(($newq + $opcion)) +#echo "$newsum" > /etc/ADM-db/limit +#screen -dmS sumlimit bash /etc/ADM-db/sumlimit& +#exit' >> ${CIDdir}/sumlimit +#echo -e "$bar" +#read -p "Presione Enter para continuar " +#screen -dmS sumlimit bash /etc/ADM-db/sumlimit& +#bot_gen +} + +veryfy_fun () { +SRC="/etc/ADM-db/sources" && [[ ! -d ${SRC} ]] && mkdir ${SRC} +unset ARQ +case $1 in +"BotGen.sh")ARQ="/etc/ADM-db/";; +*)ARQ="/etc/ADM-db/sources/";; +esac +mv -f $HOME/update/$1 ${ARQ}/$1 && echo -e "\033[1;31m- \033[1;32mRecibido!" || echo -e "\033[1;31m- \033[1;31mFalla (no recibido!)" +chmod +x ${ARQ}/$1 +} + +download () { +clear +msg -bar3 +echo -e "\033[1;33mDescargando archivos... ESPERE " +msg -bar3 +wget -q --no-check-certificate -O $HOME/files.tar https://www.dropbox.com/s/lfb8d895lts2kbx/file.tar +[[ -d $HOME/update ]] && rm -rf $HOME/update/* || mkdir $HOME/update +[[ -e $HOME/files.tar ]] && tar xpf $HOME/files.tar -C $HOME/update && rm -f $HOME/files.tar +echo 999 > ${CIDdir}/limit +n=1 +for arqx in `ls $HOME/update`; do +sleep 0.1s +echo -ne "\033[1;33mFichero \033[1;31m[${arqx}.bot] " +[[ -e $HOME/update/$arqx ]] && veryfy_fun $arqx +n=$(($n + 1)) +done +cd $HOME && rm -rf $HOME/update && rm -f $HOME/files.tar +local ruta_origen="/root/resBOT" +local ruta_destino="/etc/ADM-db" +[[ -d ${ruta_origen} ]] && { +for archivo in "$ruta_origen"/*; do + if [[ -f "$archivo" ]]; then + mv "$archivo" "$ruta_destino/" + #echo " RESTAURANDO $archivo A $ruta_destino." + fi +done +} +[[ -e $ruta_destino/costes ]] && mv "${ruta_destino}/costes" /etc/ADM-db/sources/costes +rm -rf ${ruta_origen} +[[ ! -e $(cat < /etc/mpayu) ]] && echo "Paypal : hchumo3373@utm.edu.ec" > /etc/mpayu && echo "593987072611" > /etc/numctc + rm -f $HOME/lista-arq + systemctl restart BotGen-server &>/dev/null + bot_gen +} + +ini_token () { +clear +echo -e "$bar" +echo -e " \033[1;37mIngrese el token de su bot" +echo -e "$bar" +echo -n "TOKEN: " +read opcion +echo "$opcion" > ${CIDdir}/token +echo -e "$bar" +echo -e " \033[1;32mtoken se guardo con exito!" && echo -e "$bar" && echo -e " \033[1;37mPara tener acceso a todos los comandos del bot\n deve iniciar el bot en la opcion 2.\n desde su apps (telegram). ingresar al bot!\n digite el comando \033[1;31m/id\n \033[1;37mel bot le respodera con su ID de telegram.\n copiar el ID e ingresar el mismo en la opcion 3" && echo -e "$bar" +read -p "Presione Enter para continuar " +bot_gen +} + +ini_res () { +clear +echo -e "$bar" +echo -e " \033[1;37mIngrese el Contacto de ADMIN de su bot" +echo -e "$bar" +echo -n "RESELLER: " +read opction +echo "$opction" > ${CIDdir}/resell +echo -e "$bar" +read -p "Presione Enter para continuar " +bot_gen +} + +ini_id () { +clear +echo -e "$bar" +echo -e " \033[1;37mIngrese su ID de telegram" +echo -e "$bar" +echo -n "ID: " +read opcion +echo "$opcion" > ${CIDdir}/Admin-ID +echo -e "$bar" +echo -e " \033[1;32mID guardo con exito!" && echo -e "$bar" && echo -e " \033[1;37mdesde su apps (telegram). ingresar al bot!\n digite el comando \033[1;31m/menu\n \033[1;37mprueve si tiene acceso al menu extendido." && echo -e "$bar" +read -p "Presione Enter para continuar " +bot_gen +} + +start_bot () { +[[ ! -e "${CIDdir}/token" ]] && echo "null" > ${CIDdir}/token +unset PIDGEN +PIDGEN=$(ps aux|grep -v grep|grep "BotGen.sh") +if [[ ! $PIDGEN ]]; then +echo -e "[Unit] +Description=BotGen Service by @ChumoGH +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +User=root +WorkingDirectory=/root +ExecStart=/bin/bash ${CIDdir}/BotGen.sh +Restart=always +RestartSec=3s + +[Install] +WantedBy=multi-user.target" > /etc/systemd/system/BotGen-server.service + + systemctl enable BotGen-server &>/dev/null + systemctl start BotGen-server &>/dev/null +else +killall BotGen.sh &>/dev/null +systemctl stop BotGen-server &>/dev/null +systemctl disable BotGen-server &>/dev/null +rm /etc/systemd/system/BotGen-server.service &>/dev/null +clear +msg -bar3 +echo -e "\033[1;31m BotGen fuera de linea" +msg -bar3 +read -p "Presione Enter para continuar " +fi +bot_gen +} + +ayuda_fun () { +clear +echo -e "$bar" +echo -e " \e[47m\e[30m Instrucciones rapidas \e[0m" +echo -e "$bar" +echo -e "\033[1;37m Es necesario crear un bot en \033[1;32m@BotFather " +echo -e "$bar" +echo -e "\033[1;32m1- \033[1;37mEn su apps telegram ingrese a @BotFather" +echo -e "\033[1;32m2- \033[1;37mDigite el comando \033[1;31m/newbot" +echo -e "\033[1;32m3- @BotFather \033[1;37msolicitara que\n asigne un nombre a su bot" +echo -e "\033[1;32m4- @BotFather \033[1;37msolicitara que asigne otro nombre,\n esta vez deve finalizar en bot eje: \033[1;31mXXX_bot" +echo -e "\033[1;32m5- \033[1;37mObtener token del bot creado.\n En \033[1;32m@BotFather \033[1;37mdigite el comando \033[1;31m/token\n \033[1;37mseleccione el bot y copie el token." +echo -e "\033[1;32m6- \033[1;37mIngrese el token\n en la opcion \033[1;32m[1] \033[1;31m> \033[1;37mTOKEN DEL BOT" +echo -e "\033[1;32m7- \033[1;37mPoner en linea el bot\n en la opcion \033[1;32m[2] \033[1;31m> \033[1;37mINICIAR/PARAR BOT" +echo -e "\033[1;32m8- \033[1;37mEn su apps telegram, inicie el bot creado\n digite el comando \033[1;31m/id \033[1;37mel bot le respondera\n con su ID de telegran (copie el ID)" +echo -e "\033[1;32m9- \033[1;37mIngrese el ID en la\n opcion \033[1;32m[3] \033[1;31m> \033[1;37mID DE USUARIO TELEGRAM" +echo -e "\033[1;32m10-\033[1;37mcomprueve que tiene acceso a\n las opciones avanzadas de su bot." +echo -e "$bar" +read -p "Presione Enter para continuar " +bot_gen +} + +call.config () { +[[ -d /root/resBOT ]] || mkdir /root/resBOT +local ruta_origen='/etc/ADM-db' +local ruta_destino='/root/resBOT' +echo "Respaldando TOKEN y ADMINISTRADOR" +for archivo in "$ruta_origen"/*; do + if [[ -f "$archivo" ]]; then + mv "$archivo" "$ruta_destino/" + echo " ARCHIVO $archivo movido a $ruta_destino." + fi +done +check_ip +function_verify +instaled='/etc/ADM-db/sources' && [[ ! -d ${instaled} ]] && download +} + +msj_prueba () { + +TOKEN="$(cat /etc/ADM-db/token)" +ID="$(cat /etc/ADM-db/Admin-ID)" + +[[ -z $TOKEN ]] && { + clear + echo -e "$bar" + echo -e "\033[1;37m Aun no a ingresado el token\n No se puede enviar ningun mensaje!" + echo -e "$bar" + read foo +} || { + [[ -z $ID ]] && { + clear + echo -e "$bar" + echo -e "\033[1;37m Aun no a ingresado el ID\n No se puede enviar ningun mensaje!" + echo -e "$bar" + read foo m + } || { + MENSAJE="---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n" + MENSAJE+="Esto es un mesaje de prueba!\n" + MENSAJE+="$bar\n" + URL="https://api.telegram.org/bot$TOKEN/sendMessage" + curl -s -X POST $URL -d chat_id=$ID -d text="$MENSAJE" &>/dev/null + clear + echo -e "---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n" + echo -e "\033[1;37m Mensaje enviado Exitosamente...!\n" + echo -e "$bar" + #sleep 3s + } +} + +bot_gen +} + +addnewmss() { +unset yesno +unset dnew +let foc++ +echo -e "$bar" +echo -e " \033[1;37mINGRESA EL MENSAJE A ENVIAR" +echo -e "$bar" +read -p " $foc TEXTO: " addmss +MSS+="$addmss\n" +echo -e "${cor[3]} ¿DESEAS AÑADIR OTRO SMS ? " +read -p " [S/N]: " -e -i s sshsn +tput cuu1 && tput dl1 +tput cuu1 && tput dl1 +[[ "$sshsn" = @(s|S|y|Y) ]] && addnewmss +} + + + +msj_ind () { +foc=1 +TOKEN="$(cat /etc/ADM-db/token)" +echo -e "$bar" +echo -e " \033[1;37mIngrese su ID de telegram a Mensajear" +echo -e "$bar" +read -p "ID: " ID +[[ -z $ID ]] && ID="$(cat /etc/ADM-db/Admin-ID)" +[[ -z $TOKEN ]] && { + clear + echo -e "$bar" + echo -e "\033[1;37m Aun no a ingresado el token\n No se puede enviar ningun mensaje!" + echo -e "$bar" + read foo +} || { + [[ -z $ID ]] && { + clear + echo -e "$bar" + echo -e "\033[1;37m Aun no a ingresado el ID\n No se puede enviar ningun mensaje!" + echo -e "$bar" + read foo + } || { + MENSAJE="Hola, Mensale de Prueba del BotGen Generador!" +echo -e "$bar" +echo -e " \033[1;37mINGRESA EL MENSAJE A ENVIAR" +echo -e "$bar" +read -p " $foc TEXTO: " addmss +MSS+="$addmss\n" +echo -e "${cor[3]} ¿DESEAS AÑADIR OTRO SMS ? " +read -p " [S/N]: " -e -i s sshsn +tput cuu1 && tput dl1 +tput cuu1 && tput dl1 +[[ "$sshsn" = @(s|S|y|Y) ]] && addnewmss +MENSAJE=' ---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n' +MENSAJE+="$MSS \n " +echo -e "$bar" +echo -e " \033[1;37mPEGA RUTA DE IMAGEN" +echo -e "$bar" +read -p "IMG: " img +#[[ -z $img ]] && img="https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/favi.png" +#[[ -z $img ]] && img="/var/www/html/bot_vmess_qr.png" +[[ -z $MENSAJE ]] && MENSAJE="Hola, Mensale de Prueba del BotGen Generador!" + URL="https://api.telegram.org/bot$TOKEN/sendMessage" + URG="https://api.telegram.org/bot$TOKEN/sendPhoto" + curl -s -X POST $URG -F chat_id=$ID -F photo="@$img" #-F caption="New Script @ChumoGH" #-F width="100" -F height="100" + curl -s -X POST $URL -d chat_id=$ID -d text="$(echo -e "$MENSAJE")" &>/dev/null +# clear + echo -e "@$img" + echo -e "$bar" + echo -e "\033[1;37m Mensaje enviado Exitosamente...!" + echo -e "$bar" + read -p "ENTER PARA Continuar" + } +} + +bot_gen +} + + + +act-bot () { +[[ -d /root/resBOT ]] || mkdir /root/resBOT +local ruta_origen="/etc/ADM-db" +local ruta_destino="/root/resBOT" +echo "Respaldando TOKEN y ADMINISTRADOR" +for archivo in "$ruta_origen"/*; do + if [[ -f "$archivo" ]]; then + mv "$archivo" "$ruta_destino/" + echo " ARCHIVO $archivo RESTALDADO EN $ruta_destino." + fi +done +download +} + +respon () { +[[ ! -e /etc/menu_ito ]] && credd=$(cat < /etc/SCRIPT/menu_credito) || credd=$(cat /etc/menu_ito ) +[[ -e ${CIDdir}/ress ]] && { +echo -e "DESACTIVANDO RESELLER $credd FIJO EN BotGEN" +echo -e " AHORA SE FIJARA EL NOMBRE DE QUIEN GENERE LA KEY" +read -p "ENTER PARA VOLVER" +rm -f ${CIDdir}/ress +} || { +echo -e "ACTIVANDO RESELLER $credd FIJO EN BotGEN" +echo -e "AHORA SE FIJARA $credd EN TODAS LAS KEYS " +read -p "ENTER PARA VOLVER" +touch ${CIDdir}/ress +} +bot_gen +} + +multi(){ +local _numeros=$(ls /etc/systemd/system/BotGen-server*.service |wc -l) +local count=$(ps x | grep MultiBot.sh | grep -v grep | wc -l) +msg -bar3 +echo -e " SERVICES BOTS ${_numeros} ACTIVOS ${count}" +msg -bar3 +echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;35m> \033[1;34m ADD+ BOTGEN NUEVO ADMIN \033[1;32m " +echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;35m> \033[1;33m ACTUALIZAR BINARIO M-BOT \033[1;32m " +echo -e "\033[0;35m[\033[0;36m3\033[0;35m] \033[0;35m> \033[1;32m VER BOTS EN ACTIVIDAD \033[1;32m " +echo -e "\033[0;35m[\033[0;36m5\033[0;35m] \033[0;35m> \033[1;31m REMOVER UN ADMINISTRADOR \033[1;32m " +echo -e "\033[0;35m[\033[0;36m6\033[0;35m] \033[0;35m> \033[1;31m REMOVER TODOS BOTGEN \033[1;32m " +msg -bar3 +echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR" +msg -bar3 +local selection=$(selection_fun 13) +case ${selection} in +0) return 0 ;; +1) multiNEW;; +2) _dowUP;; +3) _checkBOT;; +4) stopUNI;; +esac +} + +_dowUP(){ +#[[ -e /bin/MultiBot.sh ]] || wget -O /bin/MultiBot.sh https://www.dropbox.com/scl/fi/okmkv1lnlsczw7b6fwdos/BotGen.sh?rlkey=wt2qgh5z44xvnnvjv75bpo1vm +wget -O /bin/MultiBot.sh https://www.dropbox.com/scl/fi/okmkv1lnlsczw7b6fwdos/BotGen.sh?rlkey=wt2qgh5z44xvnnvjv75bpo1vm +[[ -e /bin/MultiBot.sh ]] && chmod +x /bin/MultiBot.sh +_restartSERVICES +} + +_checkBOT(){ +local _l=1 +_numeros=$(ls /etc/systemd/system/BotGen-server*.service) +archivos=() +systemctl daemon-reload &>/dev/null +local _line=1 +msg -bar3 +for _service in $(ls /etc/systemd/system/BotGen-server*.service | cut -d '/' -f5) ; do + _admS=$(cat /etc/systemd/system/${_service} | grep MultiBot.sh | cut -d ' ' -f6) + [[ -z ${_admS} ]] && echo -e " \033[0;35m[\033[0;36m$_line\033[0;35m] \033[0;35m> \033[1;37m BOT ADMIN ( N/A ) " || echo -e " \033[0;35m[\033[0;36m$_line\033[0;35m] \033[0;35m> \033[1;37m BOT REVENTA ${_admS} " + archivos+=("$_service") # Agregar el nombre del archivo al array + let _line++ +done +msg -bar3 +read -p " SERVICIO A MOSTRAR: " opcion +msg -bar3 +[[ -z ${opcion} ]] && return +# Verificar la selección del usuario y detenerse identificando la posición en el array +if [ "$opcion" -ge 1 ] && [ "$opcion" -le "${#archivos[@]}" ]; then + archivo_a_eliminar="${archivos[$((opcion - 1))]}" + echo -e " SELECCIONADO '$archivo_a_eliminar'." + [[ -z ${_admS} ]] && { + _a3=$(cat /etc/ADM-db/token) + _a4=$(cat /etc/ADM-db/Admin-ID) + _a5='User-ID' + _a6=$(cat /etc/ADM-db/resell) + echo -e " TOKEN : $_a3 \n ID : $_a4 \n FILE : $_a5 \n ALIAS : $_a6" + } || { + _a3=$(cat /etc/systemd/system/${archivo_a_eliminar} | grep MultiBot.sh | cut -d ' ' -f3) + _a4=$(cat /etc/systemd/system/${archivo_a_eliminar} | grep MultiBot.sh | cut -d ' ' -f4) + _a5=$(cat /etc/systemd/system/${archivo_a_eliminar} | grep MultiBot.sh | cut -d ' ' -f5) + _a6=$(cat /etc/systemd/system/${archivo_a_eliminar} | grep MultiBot.sh | cut -d ' ' -f6) + echo -e " TOKEN : $_a3 \n ID : $_a4 \n FILE : $_a5 \n ALIAS : $_a6" + } +else + echo "Opción no válida." +fi +read -p "PRESIONE ENTER PARA CONTINUAR" +bot_gen +} + +_restartSERVICES(){ +local _l=1 +systemctl daemon-reload &>/dev/null +for _service in $(ls /etc/systemd/system/BotGen-server*.service | cut -d '/' -f5) ; do + echo -e "REINICIANDO SERVICIO ${_service}" + systemctl restart ${_service} + let _l++ +done +read -p " ENTER PARA RETORNAR" +bot_gen +} + +stopUNI(){ +local _l=1 +_numeros=$(ls /etc/systemd/system/BotGen-server*.service) +archivos=() +systemctl daemon-reload &>/dev/null +local _line=1 +msg -bar3 +for _service in $(ls /etc/systemd/system/BotGen-server*.service | cut -d '/' -f5) ; do + _admS=$(cat /etc/systemd/system/${_service} | grep MultiBot.sh | cut -d ' ' -f6) + echo -e " \033[0;35m[\033[0;36m$_line\033[0;35m] \033[0;35m> \033[1;37m ELIMINAR $_service ( ${_admS} )" + archivos+=("$_service") # Agregar el nombre del archivo al array + let _line++ +done +msg -bar3 +read -p " SERVICIO A ELIMINAR: " opcion +msg -bar3 +[[ -z ${opcion} ]] && return +# Verificar la selección del usuario y detenerse identificando la posición en el array +if [ "$opcion" -ge 1 ] && [ "$opcion" -le "${#archivos[@]}" ]; then + archivo_a_eliminar="${archivos[$((opcion - 1))]}" + systemctl disable $archivo_a_eliminar + systemctl stop $archivo_a_eliminar + rm -f /etc/systemd/system/$archivo_a_eliminar + echo " SE HA SELECCIONADO '$archivo_a_eliminar'." + # Aquí iría el código para eliminar el archivo +else + echo "Opción no válida." +fi +read -p "PRESIONE ENTER PARA CONTINUAR" +bot_gen +} + +multiNEW(){ +clear&&clear +rm -f /bin/MultiBot.sh +msg -bar3 +tittle +msg -bar3 +count=$(ps x | grep MultiBot.sh | grep -v grep | wc -l) +new_number=$((count + 1)) +read -p " INGRESA TU ${new_number} TOKEN : " _tok +msg -bar3 +read -p " INGRESA TU ${new_number} ID ADMIN: " _ID +msg -bar3 +read -p " ${new_number} RUTA ( Users${new_number}) : " _usr +msg -bar3 +read -p " INGRESA TU ${new_number} Alias ADMIN : " _alias +msg -bar3 +#PIDGEN=$(ps aux|grep -v grep|grep "BotGen.sh") +#if [[ ! $PIDGEN ]]; then +[[ -e /bin/MultiBot.sh ]] || wget -O /bin/MultiBot.sh https://www.dropbox.com/scl/fi/okmkv1lnlsczw7b6fwdos/BotGen.sh?rlkey=wt2qgh5z44xvnnvjv75bpo1vm +[[ -e /bin/MultiBot.sh ]] && chmod +x /bin/MultiBot.sh +echo -e "[Unit] +Description=MultiBotGen ${new_number} Service by @ChumoGH +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +User=root +WorkingDirectory=/root +ExecStart=/bin/bash /bin/MultiBot.sh ${_tok} ${_ID} ${_usr} ${_alias} +Restart=always +RestartSec=3s + +[Install] +WantedBy=multi-user.target" > /etc/systemd/system/BotGen-server${new_number}.service +systemctl enable BotGen-server${new_number} &>/dev/null +systemctl start BotGen-server${new_number} &>/dev/null +#else +#killall BotGen.sh &>/dev/null +#systemctl stop BotGen-server &>/dev/null +#systemctl disable BotGen-server &>/dev/null +#rm /etc/systemd/system/BotGen-server.service &>/dev/null +#clear +msg -bar3 +read -p "Presione Enter para continuar " +#fi +bot_gen +} + +bot_gen () { +clear +unset PID_GEN +CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} +PID_GEN=$(ps x|grep -v grep|grep "BotGen.sh") +PID_on=$(ps x|grep -v grep|grep "modelid") +[[ ! $PID_on ]] && PID_on="\033[1;31mOFF" || PID_on="\033[1;32mON" +[[ ! -e /etc/systemd/system/btkill.service ]] && PID_kill="\033[1;31mOFF" || PID_kill="\033[1;32mON" +[[ ! $PID_GEN ]] && PID_GEN="\033[1;31mOFF" || PID_GEN="\033[1;32mON" +[[ -e ${CIDdir}/token ]] && tk="\033[1;32mOK" || tk="\033[1;31mNULL" +[[ -e /etc/numctc ]] && nm="\033[1;32mNUM" || nm="\033[1;31mNULL" +[[ -e /etc/urlDN ]] && dn="\033[1;32mDON" || dn="\033[1;31mNULL" +[[ -e /etc/urlCT ]] && ct="\033[1;32mCAT" || ct="\033[1;31mNULL" +#[[ -e ${CIDdir}/Admin-ID ]] && adid="\033[1;32mOK" || adid="\033[1;31mNULL" +[[ -e ${CIDdir}/Admin-ID ]] && adid="\033[1;32m$(cat ${CIDdir}/Admin-ID)" || adid="\033[1;31mNULL" +[[ -e ${CIDdir}/ress ]] && rfij="\033[1;32mRESELLER FIJO (Bot Personal )" || rfij="\033[1;31mRESELLER ALEATORIO ( Bot Custom )" +limcont=$(cat /etc/ADM-db/limit) +_UID=$(cat /etc/ADM-db/User-ID|wc -l) +[[ ${_UID} < 1 ]] && _UID="\033[1;31m${_UID}" || _UID="\033[1;32m${_UID}" +[[ "${limcont}" = "999" ]] && limted=" >>>" || limted=$(cat /etc/ADM-db/limit) +msg -bar3 +echo -e " \033[7;49;35m ${TTini} 🐲 BotGEN ChumoGH${TTcent}ADM ( V2.0 ) 🐲 ◄◄<=== \033[0m" +msg -bar3 +echo -e " - LIMITADOR \033[1;32m($limted) \033[1;39m|\033[1;37m KILL ID ${PID_kill} \033[1;39m|\033[1;37m UsersID ${_UID} " +msg -bar3 +echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;35m> \033[1;37m TOKEN DEL BOT $tk " +echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;35m> \033[1;37m INICIAR/PARAR BOT $PID_GEN\033[0m" +echo -e "\033[0;35m[\033[0;36m3\033[0;35m] \033[0;35m> \033[1;37m ID ADMIN TELEGRAM $adid [ $(ls /etc/ADM-db/User-*|wc -l) ]" +echo -e "\033[0;35m[\033[0;36m4\033[0;35m] \033[0;35m> \033[1;37m Cambiar Contacto -> $(cat < ${CIDdir}/resell)" +echo -e "\033[0;35m[\033[0;36m5\033[0;35m] \033[0;35m> \033[1;37m MENSAJE DE PRUEBA" +echo -e "\033[0;35m[\033[0;36m6\033[0;35m] \033[0;36m> \033[1;37m MANUAL De Uso" +echo -e "\033[0;35m[\033[0;36m7\033[0;35m] \033[0;35m> \033[1;37m Limite de KEYS " +echo -e "\033[0;35m[\033[0;36m8\033[0;35m] \033[0;35m> \033[1;37m ENLACES $nm | $dn | $ct " +echo -e "\033[0;35m[\033[0;36m9\033[0;35m] \033[0;35m> \033[1;37m $rfij" +[[ -e $HOME/RegBOT/API* ]] && { +echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;35m> \033[1;37m API " +echo -e " ?\033[0;33m$(cat < $HOME/RegBOT/API*)" +} || echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;35m> \033[1;37m AGREGAR API ( exe.io/cut.io ) " +echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;35m> \033[1;37m Modificar COSTES DEL BOT" +echo -e "\033[0;35m[\033[0;36m12\033[0;35m] \033[0;35m> \033[1;37m MENU DE CUPONES \033[1;32m " +msg -bar3 +echo -e "\033[0;35m[\033[0;36m13\033[0;35m] \033[0;35m> \033[1;31m REMOVER BOTGEN \033[1;32m " +msg -bar3 +echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR" +msg -bar3 +selection=$(selection_fun 13) +case ${selection} in +0) return 0 ;; +1) ini_token;; +2) start_bot;; +3) ini_id;; +4) ini_res;; +5) msj_prueba;; +6) ayuda_fun;; +#7) source <(curl -sSL https://www.dropbox.com/s/f5mlwun3hkpq6k8/bot-permited.sh) ;; +#8) act-bot ;; +7) lim-bot ;; +8) change_pay;; +9) respon;; +10) +msg -bar3 +echo -e " AGREGA TU TOKEN SEGUIDO DE UN - CON EL NUMERO \n" +echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;35m> \033[1;37m cut.io \033[1;32m " +echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;35m> \033[1;37m exe.io \033[1;32m " +msg -bar3 +echo +echo -e " EJEMPLO : " +echo -e " 00z99a886700000x0c-1" +echo +msg -bar3 +read -p "PEGA TU TOKEN API : " apiT +_apiT="$(echo ${apiT} | cut -d '-' -f1)" +_POS="$(echo ${apiT} | cut -d '-' -f2)" +[[ -z ${_POS} ]] || echo -e "${_apiT}" > $HOME/RegBOT/API${_POS} +[[ $_POS = 1 ]] && rm -f $HOME/RegBOT/API2 || rm -f $HOME/RegBOT/API1 +chmod +x $HOME/RegBOT/API${_POS} +msg -bar3 +echo -e "TOKEN AÑADIDO CON EXITO.." +echo +[[ $_POS = 1 ]] && echo -e "TOKEN APLICADO A \033[1;37m cut.io \033[1;32m " || echo -e "TOKEN APLICADO A \033[1;37m exe.io \033[1;32m " +echo -e " AHORA VE Y GENERA UN ACORTADOR " +echo -e " DEBERIA APARECERTE EN LA PAGUINA " +echo +echo -e " TOKEN : $(cat < $HOME/RegBOT/API${_POS})" +echo +msg -bar3 +read -p "ENTER PARA RERTORNAR" +#msj_ind +;; +11)edit_cost;; +12)crear_cupon;; +13)multi;; +*) bot_gen;; +esac +} diff --git a/init/setup.gen b/init/setup.gen new file mode 100644 index 0000000..43d84d9 --- /dev/null +++ b/init/setup.gen @@ -0,0 +1,304 @@ +#!/bin/bash +#Instalador del BOT + +coo=1 +PAM=$1 +IVAR="/etc/http-instas" +SCPT_DIR="/etc/SCRIPT" +SCPT_LTM="/etc/LTM" +_hora=$(printf '%(%D-%H:%M:%S)T') +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" +source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg) > /dev/null +rm -f setup* +install_ini () { +clear&&clear +rm -f gera* +add-apt-repository universe +apt update -y; apt upgrade -y +msg -bar +echo -e "\033[92m -- INSTALANDO PAQUETES NECESARIOS -- " +msg -bar +ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +locale-gen en_US.UTF-8 > /dev/null 2>&1 +update-locale LANG=en_US.UTF-8 > /dev/null 2>&1 +echo -e "\033[97m # Instalando UTF...................... $ESTATUS " +apt-get install gawk -y > /dev/null 2>&1 +#bc +[[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || apt-get install jq -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install jq................... $ESTATUS " +#SCREEN +[[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] || apt-get install screen -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install screen............... $ESTATUS " +#apache2 +#[[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] || { +# apt-get install apache2 -y &>/dev/null +# sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf +# service apache2 restart > /dev/null 2>&1 & +# } +[[ $(dpkg --get-selections|grep -w "nginx"|head -1) ]] || { +apt-get install nginx -y &>/dev/null +echo ' +server { + listen 81 default_server; + listen [::]:81 default_server; + root /var/www/html; + index index.html index.htm index.php; + server_name _; + location / { + try_files $uri $uri/ =404; + } +} + +#server { +# listen 443 ssl; +# listen [::]:443 ssl; + +# server_name plus.admcgh.site; + +# ssl_certificate /data/cert.crt; +# ssl_certificate_key /data/cert.key; + +# location / { +# try_files $uri $uri/ =404; +# } +#} + +' > /etc/nginx/sites-available/default +rm -rf /usr/share/nginx/html +sudo ln -s /var/www/html /usr/share/nginx/html +service nginx restart > /dev/null 2>&1 & + } +[[ $(dpkg --get-selections|grep -w "nginx"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "nginx"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] && apt purge apache2 -y &>/dev/null +echo -e "\033[97m # apt-get install nginx................ $ESTATUS " +#curl +[[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] || apt-get install curl -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install curl................. $ESTATUS " +#socat +[[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || apt-get install socat -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install socat................ $ESTATUS " +#netcat +[[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || apt-get install netcat -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install netcat............... $ESTATUS " +#netcat-traditional +[[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] || apt-get install netcat-traditional -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install netcat-traditional... $ESTATUS " +#net-tools +[[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || apt-get net-tools -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install net-tools............ $ESTATUS " +#cowsay +[[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || apt-get install cowsay -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install cowsay............... $ESTATUS " +#figlet +[[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || apt-get install figlet -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install figlet............... $ESTATUS " +#lolcat +apt-get install lolcat -y &>/dev/null +sudo gem install lolcat &>/dev/null +[[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install lolcat............... $ESTATUS " +#at +apt-get install at -y &>/dev/null +sudo apt install at -y&>/dev/null +[[ $(dpkg --get-selections|grep -w "at"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "at"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install at................... $ESTATUS " +#PV +[[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || apt-get install pv -y &>/dev/null +[[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null +[[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null +echo -e "\033[97m # apt-get install PV ................ $ESTATUS " +msg -bar +echo -e "\033[92m La instalacion de paquetes necesarios a finalizado" +msg -bar +#echo -e "\033[97m Si la instalacion de paquetes tiene fallas" +#echo -ne "\033[97m Puede intentar de nuevo [s/n]: " +#read inst +#[[ $inst = @(s|S|y|Y) ]] && install_ini +} + +check_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" +} +function_verify () { +unset keybot +echo -e "\033[7;49;35m ${TTini} GEN ChumoGH${TTcent}VPS ${TTfin} \033[0m" +msg -bar + ### INTALAR VERCION DE SCRIPT + MENSAJE="••••📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩••••\n" +MENSAJE+=" IP : $(wget -qO- ifconfig.me)\n" +MENSAJE+=" INTENTO EXITOSO!! \n" +MENSAJE+=" 🗝️: ${keybot} > $1 \n" +MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n" +MENSAJE+=" IP : ${IP} HORA : $_hora\n" +MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n" +MENSAJE+=' 🔰 Bot generador de key 🔰\n' +MENSAJE+=' ⚜ By @ChumoGH ⚜ \n' +MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n" + clear + echo -e "\n\n\n\e[32m=====================================================" + echo -e "\e[32m LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!" + echo -e " Mediante $link Autorida por @ChumoGH" + echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH" + echo -e "\e[32m=====================================================\n\n\n\e[0m" +[[ "$1" == '--ADMcgh' ]] && install_ini + +clear&&clear +msg -bar +echo -e "\033[7;49;35m ${TTini} GEN ChumoGH${TTcent}VPS ${TTfin} \033[0m" +msg -bar +echo -e " \033[1;33mIP $(wget -qO- ifconfig.me) VERIFICADA POR @ChumoGH . . . " | pv -qL 20 +[[ ! -d ${IVAR} ]] && touch ${IVAR} +[[ -d /etc/SCRIPT ]] && rm -rf /etc/SCRIPT/* || mkdir /etc/SCRIPT +[[ -d /etc/LTM ]] && rm -rf /etc/LTM/* || mkdir /etc/LTM +[[ -d /bin/ejecutar ]] && rm -f /bin/ejecutar/echo-ram.sh || mkdir /bin/ejecutar +[[ ! -d /var/www/html/ChumoGH ]] && mkdir /var/www/html/ChumoGH +atualiza_fun +msg -bar +echo -e " RUTAS LATAM " +msg -bar +atualiza_funLTM +echo 'source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/back/free-men.sh)' > /bin/ejecutar/echo-ram.sh +echo 'wget -q -O /bin/ejecutar/vG-new.log https://www.dropbox.com/s/bp2zxrtlytq6xut/version.txt' >> /bin/ejecutar/echo-ram.sh +echo 'wget -q -O /bin/ejecutar/v-new.log https://raw.githubusercontent.com/ChumoGH/ScriptCGH/main/HTools/AFK/v-new.log' >> /bin/ejecutar/echo-ram.sh +chmod +x /bin/ejecutar/echo-ram.sh && bash /bin/ejecutar/echo-ram.sh +wget -q -O /bin/ejecutar/vG-local.log https://www.dropbox.com/s/bp2zxrtlytq6xut/version.txt +wget --no-check-certificate -q -O /var/www/html/index.html https://www.dropbox.com/s/vowqcezrtiduh8n/index.html + + +echo -e "\033[1;33m Perfecto, utilize el comando \033[1;31mkcgh \033[1;33mpara administrar sus keys y + actualizar la base del servidor" +echo -e "\033[1;36m--------------------------------------------------------------------\033[0m" +echo -e " Recuerda Generar 1 Key manual, luego de terminar la Instalacion " +echo -e "\033[1;36m--------------------------------------------------------------------\033[0m" +echo -e "\033[1;33mKey ACCESIBLE MEDIANTE" $1 +echo -e "\033[1;36m--------------------------------------------------------------------\033[0m" +curl -s --max-time 10 -d "chat_id=$ID&disable_web_page_preview=1&text=$(echo -e "$MENSAJE")" $urlBOT &>/dev/null +echo -e 'POR SEGURIDAD DEL FILTRO HTTP sin TLS DIGITA ESTO FUERA DEL SCRITP ' +echo -e "" +echo -e ' bash -c "$(curl -fsSL https://www.dropbox.com/s/bvnobv1atoj9pgw/fai2ban.sh)" --BOT ' +echo -e "" + +} + +[[ ! -e /etc/http-instas ]] && echo '0' > /etc/http-instas || let sd=$(cat < /etc/http-instas)-$coo && echo $sd > /etc/http-instas +[[ -d $SCPT_DIR ]] && rm -rf $SCPT_DIR + +#CORES +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" + +#TEXTOS + +#ChumoGH +fun_filez () { +fup="$HOME/update" +echo "$1" >> $HOME/files.log +[[ $1 = 'http-server.py' ]] && mv ${fup}/$1 /bin/http-server.sh && chmod +x /bin/http-server.sh +[[ -e $1 ]] && mv -f ${fup}/$1 /etc/SCRIPT/$1 +} +#LTM +fun_filezLTM () { +fup="$HOME/update" +echo "$1" >> $HOME/files.log +#[[ $1 = 'http-server.py' ]] && mv ${fup}/$1 /bin/http-server.sh && chmod +x /bin/http-server.sh +[[ -e $1 ]] && mv -f ${fup}/$1 /etc/LTM/$1 +} + +atualiza_fun () { +msg -bar +[[ -d $HOME/update ]] && rm -rf $HOME/update/* +[[ ! -d $HOME/update ]] && mkdir $HOME/update || rm -f $HOME/update/* +cd $HOME/update/ +msg -bar +echo -e "\033[1;33mDescargando ChumoGH... ESPERE " +msg -bar +wget -q --no-check-certificate -O $HOME/files.tar.gz https://www.dropbox.com/s/as1lrq3wedg5v5z/SCRIPT.tar.gz +[[ -d $HOME/update ]] && rm -rf $HOME/update/* || mkdir $HOME/update +[[ -e $HOME/files.tar.gz ]] && tar -xzvf $HOME/files.tar.gz -C $HOME/update &> /dev/null +rm -f $HOME/files.tar.gz +chmod 666 $HOME/update/* +n=1 +unset arqs +n=1 +rm -f $HOME/files.log +for arqs in `ls $HOME/update`; do +echo -ne "\033[1;33m FILE \e[32m [${arqs}.CGH.${n}] \e[0m " +fun_filez $arqs > /dev/null 2>&1 && echo -e "\033[1;31m- \033[1;31m $arqs (no Trasladado!)" || echo -e "\033[1;31m- \033[1;32m $arqs Trasladado!" +n=$(($n + 1)) +done +echo 'source <(curl -sSL https://www.dropbox.com/s/mapfrofhockokrf/gerar.sh)' > /bin/kcgh && chmod +x /bin/kcgh +#wget -q -O /bin/http-server.sh https://www.dropbox.com/s/st58jec4dit71fx/http-server.py && chmod +x /bin/http-server.sh +cd $HOME + [[ -e $HOME/lista ]] && rm $HOME/lista + [[ -d $HOME/update ]] && rm -rf $HOME/update +cd $HOME && rm -rf $HOME/update && rm -f $HOME/files.tar.gz +#ID="$(cat ${FILE2}.name)" && ID="$(echo $ID | awk '{print $1}' | sed -e 's/[^0-9]//ig')" +} + +atualiza_funLTM () { +msg -bar +[[ -d $HOME/update ]] && rm -rf $HOME/update/* || mkdir $HOME/update +cd $HOME/update/ +msg -bar +echo -e "\033[1;33mDescargando LATAM... ESPERE " +msg -bar +wget -q --no-check-certificate -O $HOME/files.tar.gz https://www.dropbox.com/s/z16y8r2pqurbz4t/SCRIPT.tar.gz +[[ -d $HOME/update ]] && rm -rf $HOME/update/* || mkdir $HOME/update +[[ -e $HOME/files.tar.gz ]] && tar -xzvf $HOME/files.tar.gz -C $HOME/update &> /dev/null +rm -f $HOME/files.tar.gz +chmod 666 $HOME/update/* +n=1 +unset arqs +n=1 +rm -f $HOME/files.log +for arqs in `ls $HOME/update`; do +echo -ne "\033[1;33m FILE \e[32m [${arqs}.LTM.${n}] \e[0m " +fun_filezLTM $arqs > /dev/null 2>&1 && echo -e "\033[1;31m- \033[1;31m $arqs (no Trasladado!)" || echo -e "\033[1;31m- \033[1;32m $arqs Trasladado!" +n=$(($n + 1)) +done +cd $HOME + [[ -e $HOME/lista ]] && rm $HOME/lista + [[ -d $HOME/update ]] && rm -rf $HOME/update +cd $HOME && rm -rf $HOME/update && rm -f $HOME/files.tar.gz +} + +check_ip +unset Key +function_verify "${PAM}" +[[ -z ${PAM} ]] && { +clear&clear && echo " DESTRUYENDO FICHERO rm -rf /bin " && exit +} + +echo "$(wget -qO- ifconfig.me)" > /etc/key-gerador +echo -ne "\033[0m" +rm -f setup* +rm -f ADm*