diff --git a/Bot/Control-Bot b/Bot/Control-Bot deleted file mode 100755 index 419d10d..0000000 --- a/Bot/Control-Bot +++ /dev/null @@ -1,6 +0,0 @@ -129.151.106.229 | 01/01/2050 PRINCIPAL -129.151.104.232 | 01/01/2023 | DEMO-PLUS -192.18.139.243 | 19/09/2023 | MASTER_VPSX -5.183.78.152 | 01/09/2023 | ubuntusc -45.128.53.119 | 22/10/2023 | ANTONIO-MX -38.7.207.44 | 31/12/2022 | AlfredSilic diff --git a/Bot/bot.sh b/Bot/bot.sh deleted file mode 100755 index 5fd3bc6..0000000 --- a/Bot/bot.sh +++ /dev/null @@ -1,451 +0,0 @@ -#!/bin/bash -#Instalador del BOT -coo=1 -IVAR="/etc/http-instas" -SCPT_DIR="/etc/SCRIPT" -rm -f gera* -source <(curl -sSL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg) > /dev/null -#!/bin/bash - -# menu maker (opciones 1, 2, 3,.....) - -flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' -cOpyRig='©' && mbar2=' •••••••••••••••••••••••' - -menu_func(){ - local options=${#@} - local array - for((num=1; num<=$options; num++)); do - echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") " - array=(${!num}) - case ${array[0]} in - "-vd")echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}";; - "-vm")echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}";; - "-fi")echo -e "${array[@]:2} ${array[1]}";; - -bar|-bar2|-bar3|-bar4)echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})";; - *)echo -e "\033[1;37m${array[@]}";; - esac - done - } - - -selection_fun () { -local selection="null" -local range -for((i=0; i<=$1; i++)); do range[$i]="$i "; done -while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do -echo -ne "\033[1;37m ► Opcion : " >&2 -read selection -tput cuu1 >&2 && tput dl1 >&2 -done -echo $selection -} - - -tittle () { -[[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh' - clear&&clear - msg -bar - echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]" - msg -bar -} -in_opcion(){ - unset opcion - if [[ -z $2 ]]; then - msg -nazu " $1: " >&2 - else - msg $1 " $2: " >&2 - fi - read opcion - echo "$opcion" -} -# centrado de texto -print_center(){ - if [[ -z $2 ]]; then - text="$1" - else - col="$1" - text="$2" - fi - - while read line; do - unset space - x=$(( ( 54 - ${#line}) / 2)) - for (( i = 0; i < $x; i++ )); do - space+=' ' - done - space+="$line" - if [[ -z $2 ]]; then - msg -azu "$space" - else - msg "$col" "$space" - fi - done <<< $(echo -e "$text") -} -# titulos y encabesados -title(){ - clear - msg -bar - if [[ -z $2 ]]; then - print_center -azu "$1" - else - print_center "$1" "$2" - fi - msg -bar - } - -# finalizacion de tareas - enter(){ - msg -bar - text="►► Presione enter para continuar ◄◄" - if [[ -z $1 ]]; then - print_center -ama "$text" - else - print_center "$1" "$text" - fi - read - } - -# opcion, regresar volver/atras -back(){ - msg -bar - echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER" - msg -bar - } - -msg () { -local colors="/etc/new-adm-color" -if [[ ! -e $colors ]]; then -COLOR[0]='\033[1;37m' #BRAN='\033[1;37m' -COLOR[1]='\e[31m' #VERMELHO='\e[31m' -COLOR[2]='\e[32m' #VERDE='\e[32m' -COLOR[3]='\e[33m' #AMARELO='\e[33m' -COLOR[4]='\e[34m' #AZUL='\e[34m' -COLOR[5]='\e[35m' #MAGENTA='\e[35m' -COLOR[6]='\033[1;97m' #MAG='\033[1;36m' -COLOR[7]='\033[1;49;95m' -COLOR[8]='\033[1;49;96m' -else -local COL=0 -for number in $(cat $colors); do -case $number in -1)COLOR[$COL]='\033[1;37m';; -2)COLOR[$COL]='\e[31m';; -3)COLOR[$COL]='\e[32m';; -4)COLOR[$COL]='\e[33m';; -5)COLOR[$COL]='\e[34m';; -6)COLOR[$COL]='\e[35m';; -7)COLOR[$COL]='\033[1;36m';; -8)COLOR[$COL]='\033[1;49;95m';; -9)COLOR[$COL]='\033[1;49;96m';; -esac -let COL++ -done -fi -NEGRITO='\e[1m' -SEMCOR='\e[0m' - case $1 in - -ne)cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; - -ama)cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -verm)cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";; - -verm2)cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -aqua)cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -azu)cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -verd)cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -bra)cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}";; - -nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; - -nverd)cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; - -nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; - -verm3)cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";; - -teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -teal2)cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}";; - -blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -blak2)cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}";; - -blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}";; - #-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar1)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar2)ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar3)ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar4)ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - esac -} - -fun_bar () { -comando[0]="$1" -comando[1]="$2" - ( -[[ -e $HOME/fim ]] && rm $HOME/fim -${comando[0]} -y > /dev/null 2>&1 -${comando[1]} -y > /dev/null 2>&1 -touch $HOME/fim - ) > /dev/null 2>&1 & -echo -ne "\033[1;33m [" -while true; do - for((i=0; i<18; i++)); do - echo -ne "\033[1;31m##" - sleep 0.1s - done - [[ -e $HOME/fim ]] && rm $HOME/fim && break - echo -e "\033[1;33m]" - sleep 1s - tput cuu1 - tput dl1 - echo -ne "\033[1;33m [" -done -echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m" -} - -del(){ - for (( i = 0; i < $1; i++ )); do - tput cuu1 && tput dl1 - done -} - - -[[ -d /bin/ejecutar ]] && { -[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg -} || mkdir /bin/ejecutar -cor[0]="\033[0m" -cor[1]="\033[1;34m" -cor[2]="\033[1;32m" -cor[3]="\033[1;37m" -cor[4]="\033[1;36m" -cor[5]="\033[1;33m" -cor[6]="\033[1;35m" -export -f msg -export -f fun_bar -export -f tittle -export -f enter -export -f back -export -f print_center -export -f in_opcion -export -f del -DOWS () { -wget --no-check-certificate -i $HOME/lista-arq -} -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" -echo "$IP" > /usr/bin/vendor_code -} -function_verify () { -unset keybot -echo -e "\033[7;49;35m ${TTini} GEN drowkid01${TTcent}VPS ${TTfin} \033[0m" -msg -bar -[[ ! -e /etc/nivbot ]] && echo > /etc/nivbot -echo -e " SOLICITA KEY DE AUTORIZACION UNICA " -[[ "$(echo "$(cat < /etc/nivbot)")" < "3" ]] && { -[[ -e /bin/downloadbot ]] && { -[[ -z $(cat < /bin/downloadbot) ]] && read -p " INGRESA KEY DE AUTORIZACION : " keybot || unset keybot -} -} || read -p " Key de Autorizacion : " keybot -[[ -z $keybot ]] && { -[[ -e /bin/downloadbot ]] && link="$(cat < /bin/downloadbot)" || link='https://raw.githubusercontent.com' -[[ $link = 'https://raw.githubusercontent.com' ]] && echo "CONTROL MEDIANTE GitHub" || echo "CONTROL EXTERNO" -permited=$(curl -sSL "${link}/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot") -} || { -permited=$(curl -sSL "$(ofus $keybot)/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot") -[[ -z $keybot ]] && echo $link > /bin/downloadbot || echo -e "$(ofus $keybot)" > /bin/downloadbot -} - - ### INTALAR VERCION DE SCRIPT - 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 @drowkid01" - echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01" - echo -e "\e[32m=====================================================\n\n\n\e[0m" - [[ -e /usr/bin/downBase ]] || echo 'https://www.dropbox.com/s/yqhjmr7o3342viv/lista' > /usr/bin/downBase && chmod 777 /usr/bin/downBase - v1=$(curl -sSL "https://www.dropbox.com/s/blxo0jifysvyrey/v-new.log") - [[ ! -e /bin/downloadbot ]] && { - [[ $link = 'https://raw.githubusercontent.com' ]] && echo "https://raw.githubusercontent.com" > /bin/downloadbot || echo "$(ofus $keybot)" > /bin/downloadbot - chmod +x /bin/downloadbot - } - [[ -e /etc/nivbot ]] && { - i=$(cat < /etc/nivbot) - lv=$(($i+1)) - echo $lv > /etc/nivbot - } || echo "1" > /etc/nivbot - echo $Key > /etc/valkey && chmod +x /etc/valkey - [[ -e /usr/bin/downBase ]] || echo 'https://www.dropbox.com/s/yqhjmr7o3342viv/lista' > /usr/bin/downBase && chmod 777 /usr/bin/downBase - - -} -function aguarde() { - sleep 1 - fun_ejec=$1 - helice() { - - - DOWS >/dev/null 2>&1 & - tput civis - while [ -d /proc/$! ]; do - for i in / - \\ \|; do - sleep .1 - echo -ne "\e[1D$i" - done - done - tput cnorm - } - echo -ne "\033[1;37m TRASLADANDO FILES \033[1;32mSCRIPT \033[1;37me \033[1;32mAUTOGEN\033[1;32m.\033[1;33m.\033[1;31m. \033[1;33m" - helice - echo -e "\e[1D REALIZADO" -function_verify - -} -#COMPARA -fun_filez () { -fup="$HOME/update" -echo "$1" >> $HOME/files.log -[[ $1 = 'http-server.py' ]] && mv -f ${fup}/$1 /bin/http-server.sh && chmod +x /bin/http-server.sh -[[ -e $1 ]] && mv -f ${fup}/$1 /etc/SCRIPT/$1 -} -atualiza_fun () { -msg -bar -[[ -d ./update ]] && rm -rf ./update/* || mkdir ./update -cd ./update/ -aguarde -unset arqs -n=1 -rm -f $HOME/files.log -for arqs in `ls $HOME/update`; do -echo -ne "\033[1;33m FILE \e[32m [${n}.gen] \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 -wget -q -O /usr/bin/gerar https://raw.githubusercontent.com/drowkid01/ScriptCGH/main/GERADOR/gerador.sh && chmod +x /usr/bin/gerar -cd $HOME - [[ -e $HOME/lista ]] && rm $HOME/lista - [[ -d $HOME/update ]] && rm -rf $HOME/update -} - -install_ini () { -clear -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 "apache2"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null -[[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null -echo -e "\033[97m # apt-get install apache2.............. $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 install 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 " -#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" -atualiza_fun -} - - - -[[ ! -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 - - - -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 -} - - - - - - -unset Key -[[ $1 = '--install' ]] && install_ini diff --git a/Bot/gerador.sh b/Bot/gerador.sh deleted file mode 100755 index 5c144b5..0000000 --- a/Bot/gerador.sh +++ /dev/null @@ -1,867 +0,0 @@ -#!/bin/bash -clear -unset readvalue -[[ ! -d /etc/http-shell ]] && mkdir /etc/http-shell -[[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads ssl paysnd.sh verifica PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py" -IVAR="/etc/http-instas" -source <(curl -sSL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg) >/dev/null -#!/bin/bash -# menu maker (opciones 1, 2, 3,.....) -flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && cG='/c' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && _kl1='ghkey' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && kL10='tc' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && am1='/e' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•' nib="${am1}${kL10}" -cOpyRig='©' && mbar2=' •••••••••••••••••••••••' - -menu_func() { - local options=${#@} - local array - for ((num = 1; num <= $options; num++)); do - echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") " - array=(${!num}) - case ${array[0]} in - "-vd") echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}" ;; - "-vm") echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}" ;; - "-fi") echo -e "${array[@]:2} ${array[1]}" ;; - -bar | -bar2 | -bar3 | -bar4) echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})" ;; - *) echo -e "\033[1;37m${array[@]}" ;; - esac - done -} - -selection_fun() { - local selection="null" - local range - for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done - while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do - echo -ne "\033[1;37m ► Opcion : " >&2 - read selection - tput cuu1 >&2 && tput dl1 >&2 - done - echo $selection -} - -tittle() { - [[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh' - clear && clear - msg -bar - echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]" - msg -bar -} -in_opcion() { - unset opcion - if [[ -z $2 ]]; then - msg -nazu " $1: " >&2 - else - msg $1 " $2: " >&2 - fi - read opcion - echo "$opcion" -} -# centrado de texto -print_center() { - if [[ -z $2 ]]; then - text="$1" - else - col="$1" - text="$2" - fi - - while read line; do - unset space - x=$(((54 - ${#line}) / 2)) - for ((i = 0; i < $x; i++)); do - space+=' ' - done - space+="$line" - if [[ -z $2 ]]; then - msg -azu "$space" - else - msg "$col" "$space" - fi - done <<<$(echo -e "$text") -} -# titulos y encabesados -title() { - clear - msg -bar - if [[ -z $2 ]]; then - print_center -azu "$1" - else - print_center "$1" "$2" - fi - msg -bar -} - -# finalizacion de tareas -enter() { - msg -bar - text="►► Presione enter para continuar ◄◄" - if [[ -z $1 ]]; then - print_center -ama "$text" - else - print_center "$1" "$text" - fi - read -} - -# opcion, regresar volver/atras -back() { - msg -bar - echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER" - msg -bar -} - -msg() { - local colors="/etc/new-adm-color" - if [[ ! -e $colors ]]; then - COLOR[0]='\033[1;37m' #BRAN='\033[1;37m' - COLOR[1]='\e[31m' #VERMELHO='\e[31m' - COLOR[2]='\e[32m' #VERDE='\e[32m' - COLOR[3]='\e[33m' #AMARELO='\e[33m' - COLOR[4]='\e[34m' #AZUL='\e[34m' - COLOR[5]='\e[35m' #MAGENTA='\e[35m' - COLOR[6]='\033[1;97m' #MAG='\033[1;36m' - COLOR[7]='\033[1;49;95m' - COLOR[8]='\033[1;49;96m' - else - local COL=0 - for number in $(cat $colors); do - case $number in - 1) COLOR[$COL]='\033[1;37m' ;; - 2) COLOR[$COL]='\e[31m' ;; - 3) COLOR[$COL]='\e[32m' ;; - 4) COLOR[$COL]='\e[33m' ;; - 5) COLOR[$COL]='\e[34m' ;; - 6) COLOR[$COL]='\e[35m' ;; - 7) COLOR[$COL]='\033[1;36m' ;; - 8) COLOR[$COL]='\033[1;49;95m' ;; - 9) COLOR[$COL]='\033[1;49;96m' ;; - esac - let COL++ - done - fi - NEGRITO='\e[1m' - SEMCOR='\e[0m' - case $1 in - -ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -aqua) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -bra) cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}" ;; - -nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -nverd) cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -verm3) cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -teal2) cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blak2) cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}" ;; - #-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar1) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar2) ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar3) ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar4) ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - esac -} - -fun_bar() { - comando[0]="$1" - comando[1]="$2" - ( - [[ -e $HOME/fim ]] && rm $HOME/fim - ${comando[0]} -y >/dev/null 2>&1 - ${comando[1]} -y >/dev/null 2>&1 - touch $HOME/fim - ) >/dev/null 2>&1 & - echo -ne "\033[1;33m [" - while true; do - for ((i = 0; i < 18; i++)); do - echo -ne "\033[1;31m##" - sleep 0.1s - done - [[ -e $HOME/fim ]] && rm $HOME/fim && break - echo -e "\033[1;33m]" - sleep 1s - tput cuu1 - tput dl1 - echo -ne "\033[1;33m [" - done - echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m" -} - -del() { - for ((i = 0; i < $1; i++)); do - tput cuu1 && tput dl1 - done -} - -[[ -d /bin/ejecutar ]] && { - [[ ! -e /etc/cghkey ]] && rm -rf /etc/adm-lite - [[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg -} || mkdir /bin/ejecutar -cor[0]="\033[0m" -cor[1]="\033[1;34m" -cor[2]="\033[1;32m" -cor[3]="\033[1;37m" -cor[4]="\033[1;36m" -cor[5]="\033[1;33m" -cor[6]="\033[1;35m" -export -f msg -export -f fun_bar -export -f tittle -export -f enter -export -f back -export -f print_center -export -f in_opcion -export -f del - -tittle() { - killall kswapd0 ksoftirqd >/dev/null 2>&1 - clear && clear - msg -bar - echo -e "\033[7;49;35m ${TTini} GEN drowkid01${TTcent}VPS ${TTfin} \033[0m" - msg -bar -} - -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" - echo "$IP" >/usr/bin/vendor_code -} - -####inicio puertos -ports_() { - unset porta - _core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)") - _usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')") - ## - ram1=$(free -h | grep -i mem | awk {'print $2'}) - ram2=$(free -h | grep -i mem | awk {'print $4'}) - ram3=$(free -h | grep -i mem | awk {'print $3'}) - ## - _ram=$(printf ' %-9s' "$(free -h | grep -i mem | awk {'print $2'})") - _usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')") - _core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)") - _usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')") - - mt=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f2) - mb=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f6) - ml=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f7) - pp=$(cat /proc/cpuinfo | grep "model name" | uniq | awk -F ":" '{print $2}') - csss=$(cat /proc/cpuinfo | grep processor | wc -l) - usoo=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}') - CPU=$(echo $usoo | awk '{printf("%d\n",$1 + 0.5)}') - PID_GEN1=$(ps x | grep -v grep | grep "8888") - [[ ! $PID_GEN1 ]] && PID_GEN1="\033[0;31m[\033[0;35mCOLAPZADO\033[0;31m]" || PID_GEN1="\033[0;35m[\033[0;36mFUNCIONANDO\033[0;31m]" - porta=$(if netstat -tunlp | grep nc.tradit 1>/dev/null 2>/dev/null; then - echo -e "\033[0;36m Keygen: \033[0;31m[\033[0;32m ON \033[0;31m]" - else - echo -e "\033[0;36m Keygen: \033[0;35m[\033[0;31m OFF \033[0;35m]" - fi) - [[ $v1 = $v2 ]] && vesaoSCT="\033[1;32m${txt[315]} \033[0;33m ($v2)" || vesaoSCT="\033[1;31m${txt[316]}\033[0;33m($v2) �72 \033[1;32m($v1)\033[1;31m" - echo -e " ${cor[2]} ${vesaoSCT} ${cor[0]}" - msg -bar - echo -e "\033[1;34m ${TOP}\033[1;31m TOTAL:\033[1;32m "$mt "\033[1;34m ${TOP} \033[1;31m Libre:\033[1;32m "$ram2 "\033[1;34m ${TOP} \033[1;31m Usada:\033[1;32m"$ram3 - echo -e "\033[1;34m ${TOP}\033[1;31m Uso RAM: \033[1;32m"$_usor "\033[1;34m${TOP}\033[1;31m Uso CPU: \033[1;32m$_usop \033[1;34m ${TOP}\033[1;31m Cache:\033[1;32m"$mb # $CPU"%" - msg -bar - echo -e "\033[0;31mSystem:\033[0;32m$(cat /etc/issue.net) \033[0;31mIP:\033[0;32m $(wget -qO- ipv4.icanhazip.com)" - msg -bar - echo "" - echo -ne "$(msg -verd " Keys Usadas") $(msg -azu " : ") " && msg -bra "\033[1;41m $(cat $IVAR) $porta" - echo "" -} - -SCPT_DIR="/etc/SCRIPT" -[[ ! -e ${SCPT_DIR} ]] && mkdir ${SCPT_DIR} -[[ ! -e ${SCPT_DIR} ]] && bash /bin/ejecutar/echo-ram.sh -DIR="/etc/http-shell" -LIST="-SPVweN" -v1=$(cat /bin/ejecutar/v-new.log) -v2=$(cat <${SCPT_DIR}/v-local.log) -./gerador.sh: line 89: /etc/SCRIPT/v-local.log: No such file or directory -txt[315]=" ${FlT} drowkid01 Keygen ${FlT} IS UPDATED!" -txt[316]=" ${aLerT} drowkid01 Keygen ${aLerT} NEEDS UPDATE!" - -meu_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" -} - -mudar_instacao() { - while [[ ${var[$value]} != 0 ]]; do - [[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads ssl paysnd.sh verifica PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py" - clear - echo -e $BARRA - echo -e "MENU SSELECCI�N DE INSTALACI�N" - echo -e $BARRA - echo "[0] - FINALIZAR PROCEDIMIENTO" - i=1 - for arqx in $(ls ${SCPT_DIR}); do - [[ $arqx = @(gerar.sh|http-server.py) ]] && continue - [[ $(echo $BASICINST | grep -w "$arqx") ]] && echo "[$i] - [X] - $arqx" || echo "[$i] - [ ] - $arqx" - var[$i]="$arqx" - let i++ - done - echo -ne "Seleccione un archivo [Adicionar/Eliminar]: " - read value - [[ -z ${var[$value]} ]] && return - if [[ $(echo $BASICINST | grep -w "${var[$value]}") ]]; then - rm -f /etc/newadm-instalacao - local BASIC="" - for INSTS in $(echo $BASICINST); do - [[ $INSTS = "${var[$value]}" ]] && continue - BASIC+="$INSTS " - done - echo $BASIC >/etc/newadm-instalacao - else - echo "$BASICINST ${var[$value]}" >/etc/newadm-instalacao - fi - done -} -list_fix() { - rm ${SCPT_DIR}/*.x.c &>/dev/null - unset KEY - KEY="$1" - name="$2" - #CRIA DIR - [[ ! -e ${DIR} ]] && mkdir ${DIR} - #ENVIA ARQS - i=0 - VALUE+="gerar.sh http-server.py $BASICINST" - for arqx in $(ls ${SCPT_DIR}); do - [[ $(echo $VALUE | grep -w "${arqx}") ]] && continue - echo -e "[$i] -> ${arqx}" - arq_list[$i]="${arqx}" - let i++ - done - msg -bar - #read -p " OPCION : " readvalue - #CRIA KEY - [[ ! -e ${DIR}/${KEY} ]] && mkdir ${DIR}/${KEY} - #PASSA ARQS - [[ -z $readvalue ]] && readvalue="1" - [[ -z $nombrevalue ]] && nombrevalue="$nomkey$name" - if [[ $readvalue = @(cgh|1) ]]; then - #ADM BASIC - echo -e " - KEY SCRIPT BASE ADM - " - arqslist="$BASICINST" - for arqx in $(echo "${arqslist}"); do - [[ -e ${DIR}/${KEY}/$arqx ]] && continue #ANULA ARQUIVO CASO EXISTA - cp ${SCPT_DIR}/$arqx ${DIR}/${KEY}/ - echo "$arqx" >>${DIR}/${KEY}/${LIST} - done - else - for arqx in $(echo "${readvalue}"); do - #UNE ARQ - [[ -e ${DIR}/${KEY}/${arq_list[$arqx]} ]] && continue #ANULA ARQUIVO CASO EXISTA - rm ${SCPT_DIR}/*.x.c &>/dev/null - cp ${SCPT_DIR}/${arq_list[$arqx]} ${DIR}/${KEY}/ - echo "${arq_list[$arqx]}" >>${DIR}/${KEY}/${LIST} - done - echo "TRUE" >>${DIR}/${KEY}/FERRAMENTA - fi - rm ${SCPT_DIR}/*.x.c &>/dev/null - echo "$nombrevalue" >${DIR}/${KEY}.name - [[ ! -z $IPFIX ]] && echo "$IPFIX" >${DIR}/${KEY}/keyfixa - echo -e "-------------------------------------------------" -} - -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 -} - -fix_key() { - unset nomkey - echo " Bienvenido, Porfavor dijita el Nombre del DUE�O de la KEYs" - echo " DIJITA 0 PARA REGRESAR " - read -p " RESELLER deL Keys : " nomkey - [[ $nomkey = 0 ]] && return - [[ -z $nomkey ]] && { - [[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")" - } - msg -bar - echo " Bienvenido, Porfavor ingresa el numero de keys a generar" - read -p "Numero de Keys : " numk - [[ -z ${numk} ]] && numk=0 - msg -bar - read -p "INGRESA NOMBRE DE VENDEDOR : " vkey - clear - msg -bar - echo -e "$numk Keys activas,de $nomkey y esperando instalaci�n!" - echo "$nomkey" >${SCPT_DIR}/menu_credito - for ((w = 0; w < $numk; w++)); do - valuekey="$(date | md5sum | head -c11)" - valuekey+="$(echo $(($RANDOM * 10)) | head -c 6)" - xyz+="$(echo $(($RANDOM * 3)) | head -c 4)" - #valuekey+="$(echo $(($RANDOM*10))|head -c 5)" - list_fix "$valuekey" "$(($w + 1))" - keyfinal=$(ofus "$(wget -qO- ipv4.icanhazip.com):8888/$valuekey/$LIST") - echo -e " ${CHeko} Key $(($w + 1)) Exitosa! $(printf '%(%D-%H:%M:%S)T') \n" - echo -e " ${TTcent} ${keyfinal} ${TTcent}" | pv -qL 80 - done - [[ -e /etc/menu_ito ]] && cat /etc/menu_ito >${SCPT_DIR}/menu_credito || echo -e "\nCreditos Aplicados Exitosamente" - #$(cat < /etc/ADM-db/resell) - msg -bar - echo -e " ${ScT} *INSTALADOR UNIVERSAL* ${ScT}" - msg -bar && echo -ne "$(msg -verd "apt update -y &&") $(msg -aqua "apt upgrade -y &&\n") " && msg -bra "\033[7;49;35m wget -q https://raw.githubusercontent.com/drowkid01/ScriptCGH/main/setup && chmod 777 setup && ./setup --install" - msg -bar - [[ -e /etc/menu_numito ]] && menumito="$(cat /etc/menu_numito)" || menumito="https://t.me/drowkid01_bot" - [[ -z $vkey ]] && vkey="@drowkid01" - echo -e " ${ceLL} Soporte : Ubuntu 14.04 - 16.04 - 18.04 - 20.04 - 21.04 - 22.04\n S.O PREFERENTE 18.04" - echo -e " Verificada: $vkey ${ScT} RESELLER ACTUAL : $nomkey" | pv -qL 80 - msg -bar - read -p "Enter para finalizar" -} -att_gen_key() { - i=0 - rm ${SCPT_DIR}/*.x.c &>/dev/null - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - echo "[$i] Volver" - keys="$keys retorno" - let i++ - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - arqsx=$(ofus "$IP:8888/$arqs/$LIST") - if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then - echo -e "\033[1;31m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;32m ($(cat ${DIR}/${arqs}/keyfixa))\033[0m" - keys="$keys $arqs" - let i++ - fi - done - keys=($keys) - msg -bar - while [[ -z ${keys[$value]} || -z $value ]]; do - read -p "Escolha qual Atualizar[t=todos]: " -e -i 0 value - done - [[ $value = 0 ]] && return - if [[ $value = @(t|T) ]]; then - i=0 - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - KEYDIR="$DIR/$arqs" - rm $KEYDIR/*.x.c &>/dev/null - if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then #Keyen Atualiza - rm ${KEYDIR}/${LIST} - for arqx in $(ls $SCPT_DIR); do - cp ${SCPT_DIR}/$arqx ${KEYDIR}/$arqx - echo "${arqx}" >>${KEYDIR}/${LIST} - rm ${SCPT_DIR}/*.x.c &>/dev/null - rm $KEYDIR/*.x.c &>/dev/null - done - arqsx=$(ofus "$IP:8888/$arqs/$LIST") - echo -e "\033[1;33m[KEY]: $arqsx \033[1;32m(ATUALIZADA!)\033[0m" - fi - let i++ - done - rm ${SCPT_DIR}/*.x.c &>/dev/null - msg -bar2 - echo -ne "\033[0m" && read -p "Enter" - return 0 - fi - KEYDIR="$DIR/${keys[$value]}" - [[ -d "$KEYDIR" ]] && { - rm $KEYDIR/*.x.c &>/dev/null - rm ${KEYDIR}/${LIST} - for arqx in $(ls $SCPT_DIR); do - cp ${SCPT_DIR}/$arqx ${KEYDIR}/$arqx - echo "${arqx}" >>${KEYDIR}/${LIST} - rm ${SCPT_DIR}/*.x.c &>/dev/null - rm $KEYDIR/*.x.c &>/dev/null - done - arqsx=$(ofus "$IP:8888/${keys[$value]}/$LIST") - echo -e "\033[1;33m[KEY]: $arqsx \033[1;32m(ATUALIZADA!)\033[0m" - read -p "Enter" - rm ${SCPT_DIR}/*.x.c &>/dev/null - } -} - -del_KILL() { - for arqlist in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - [[ -e /${DIR}/${arqlist}.name ]] || rm -rf /${DIR}/${arqlist} - done -} - -remover_key() { - del_KILL - i=0 - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - echo "[$i] Volver" - keys="$keys retorno" - let i++ - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - arqsx=$(ofus "$IP:8888/$arqs/$LIST") - if [[ ! -e ${DIR}/${arqs}/used.date ]]; then - echo -e "\033[1;32m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;33m (Key Activa)\033[0m" || rm -rf ${DIR}/${arqs} - else - echo -e "\033[1;31m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;33m ($(cat ${DIR}/${arqs}/used.date) IP: $(cat ${DIR}/${arqs}/used))\033[0m" - fi - keys="$keys $arqs" - let i++ - done - keys=($keys) - msg -bar - while [[ -z ${keys[$value]} || -z $value ]]; do - read -p "Elija cual remover: " -e -i 0 value - done - [[ -d "$DIR/${keys[$value]}" ]] && rm -rf $DIR/${keys[$value]}* || return -} -remover_key_usada() { - i=0 - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - arqsx=$(ofus "$IP:8888/$arqs/$LIST") - if [[ -e ${DIR}/${arqs}/used.date ]]; then #KEY USADA - if [[ $(ls -l -c ${DIR}/${arqs}/used.date | cut -d' ' -f7) != $(date | cut -d' ' -f3) ]]; then - rm -rf ${DIR}/${arqs}* - echo -e "\033[1;31m[KEY]: $arqsx \033[1;32m(Eliminada!)\033[0m" - else - echo -e "\033[1;32m[KEY]: $arqsx \033[1;32m(Key Activa!)\033[0m" - fi - else - echo -e "\033[1;32m[KEY]: $arqsx \033[1;32m(Key Activa!)\033[0m" - fi - let i++ - done - msg -bar2 - echo -ne "\033[0m" && read -p "Enter" -} -start_gen() { - unset bot_ini - PIDGEN=$(ps x | grep -v grep | grep "http-server.sh") - if [[ ! $PIDGEN ]]; then - msg -bar - echo -ne "\033[1;97m Poner en linea despues de un reinicio [s/n]: " - read bot_ini - msg -bar - [[ $bot_ini = @(s|S|y|Y) ]] && { - crontab -l >/root/cron - echo "@reboot screen -dmS generador /bin/http-server.sh -start" >>/root/cron - crontab /root/cron - rm /root/cron - echo '#!/bin/bash -killall http-server.sh -screen -dmS generador /bin/http-server.sh -start -echo #' >/bin/genon - chmod +x /bin/genon - echo "00 * * * * root bash /bin/genon" >>/etc/crontab - service cron restart - } || { - crontab -l >/root/cron - sed -i '/http-server.sh/ d' /root/cron - crontab /root/cron - rm /root/cron - sed '/genon/ d' /etc/crontab >/bin/ejecutar/crontab - cat /bin/ejecutar/crontab >/etc/crontab - service cron restart - - } - genon - else - killall http-server.sh - fi -} -message_gen() { - read -p "Ingresa el Mensaje: " MSGNEW - [[ -z $MSGNEW ]] && return - echo $MSGNEW >/etc/menu_ito - cat /etc/menu_ito >${SCPT_DIR}/menu_credito - read -p "Ingresa tu Numero de Contacto o tu ALIAS de TELEGRAM: " MSGNEW - echo $MSGNEW >/etc/menu_numito && chmod +x /etc/menu_numito - msg -bar -} - -act_gen() { - while [[ ${varread} != @([0-2]) ]]; do - echo -e "Bienvenido al Actualizador, Escoje que vas a Actualizar\n 1).- KEY ACTIVA\n 2).- Creditos del ADM\n " | lolcat - echo -ne "${cor[6]}" - read -p " Escoje :" varread - done - msg -bar - if [[ ${varread} = 0 ]]; then - return - elif [[ ${varread} = 1 ]]; then - att_gen_key - elif [[ ${varread} = 2 ]]; then - message_gen - fi - - #source <(curl -sL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/Key-gerar/insta.sh) -} - -rmv_iplib() { - echo -e "SERVIDORES DE KEY ATIVOS!" - rm /var/www/html/newlib && touch /var/www/html/newlib - rm ${SCPT_DIR}/*.x.c &>/dev/null - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then - var=$(cat ${DIR}/${arqs}.name) - ip=$(cat ${DIR}/${arqs}/keyfixa) - # echo -ne "\033[1;31m[USUARIO]:(\033[1;32m${var%%[*}\033[1;31m) \033[1;33m[GERADOR]:\033[1;32m ($ip)\033[0m" - echo "$ip" >>/var/www/html/newlib && echo -e " \033[1;36m[ATUALIZADO]" - fi - done - echo "51.222.29.216" >>/var/www/html/newlib - msg -bar - read -p "Enter" -} - -bot_menu() { - [[ -e /etc/nivbot ]] || echo "0" >/etc/nivbot - [[ -d /etc/ADM-db ]] && chmod +x /etc/ADM-db/* - echo -ne "\033[1;31m[ ! ] RESPALDANDO USUARIO ADMINISTRADOR " - ( - [[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes $HOME/costes - [[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token $HOME/token - [[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID $HOME/Admin-ID - [[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID $HOME/User-ID - [[ -e /etc/ADM-db/limit ]] && mv /etc/ADM-db/limit $HOME/limit - [[ -e /etc/ADM-db/resell ]] && mv /etc/ADM-db/resell $HOME/resell - [[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress $HOME/ress - [[ -e /etc/ADM-db/num-key.cont ]] && mv /etc/ADM-db/num-key.cont $HOME/num-key.cont - ) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]" - rm -rf /etc/ADM-db - CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} - [[ ! -e "${CIDdir}/confbot.sh" ]] && wget --no-check-certificate -O ${CIDdir}/confbot.sh https://www.dropbox.com/s/w1jazor40xpifh4/intBOT.sh &>/dev/null && chmod +x ${CIDdir}/confbot.sh - sed -i -e 's/\r$//' ${CIDdir}/confbot.sh - source ${CIDdir}/confbot.sh && rm -f ${CIDdir}/confbot.sh - bot_conf -} - -fum_ver() { - while [[ ! $Keey ]]; do - clear - export PATH=$PATH:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin:/usr/games - echo -e "\n \033[1;32m DIGITA TU KEY A VERIFICAR " - msg -ne "Script Key: " && read Keey - [[ ! -z $Keey ]] && Keey="$(echo "$Keey" | tr -d '[[:space:]]')" - tput cuu1 && tput dl1 - done - REQUEST=$(ofus "$Keey" | cut -d'/' -f2) - echo -e "\n" - echo -e " FILE Contend : ${REQUEST} $(echo ${REQUEST} | wc -c)" - echo -e "\n" - echo -e " VERIFICA, Si tu key Contiene \033[1;45m KEY DE drowkid01! \033[0m " - echo -e "\n" - msg -ne " Link Key: http://$(ofus $Keey) \n " - IiP=$(ofus "$Keey" | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') - [[ $(curl -s --connect-timeout 2 $IiP:8888) ]] && echo -e "\033[1;42mCONEXION CON SERVIDOR EXITOSA\033[0m" || echo -e "\033[1;43mCONEXION CON SERVIDOR FALLIDA\033[0m" - wget --no-check-certificate -O $HOME/list-key $(ofus $Keey)/$(wget -qO- ipv4.icanhazip.com) >/dev/null 2>&1 && echo -ne "\033[1;32m [ VERIFICANDO ]" || echo -e "\033[1;31m [ No Existe Acceso al KEY ]" #&& echo -e "\033[1;32m [ Key ]\n" || echo -e "\033[1;31m [ No Existe Acceso al KEY ]" - ofen=$(wget -qO- $(ofus $Keey)) - unset arqx - [[ -d $HOME/install ]] && rm -rf $HOME/install/* || mkdir $HOME/install - verificar_arq() { - echo "$1" >>$HOME/install/log.txt - } - n=1 - IP=$(ofus "$Keey" | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') && echo "$IP" >/usr/bin/vendor_code - pontos="." - stopping=" COMPROBANDO " | sed -e 's/[^a-z -]//ig' - for arqx in $(cat $HOME/list-key); do - msg -verm "${stopping}${pontos}" && sleep 0.3s - wget --no-check-certificate -O $HOME/install/${arqx} ${IP}:81/${REQUEST}/${arqx} >/dev/null 2>&1 && verificar_arq "${arqx}" - tput cuu1 && tput dl1 - pontos+="." - n=$(($n + 1)) - done - echo -ne " ---> ESTADO : \033[1;45m$ofen\033[0m con " - [[ ! -e $HOME/install/log.txt ]] && touch $HOME/install/log.txt - echo " $(cat <$HOME/install/log.txt | wc -l) FILES " && rm -f $HOME/install/log.txt - msg -ne " \033[1;42mESTADO :\033[0m " - [[ -e $HOME/list-key ]] && { - echo -ne " " - [[ $ofen = "KEY DE drowkid01!" ]] && - echo -e "KEY FUNCIONAL" && rm -f $HOME/list-key && echo -ne "\033[0m" - } || echo -e " KEY INVALIDA O USADA\033[0m\n" - #curl -s --connect-timeout 2 ${IiP}:81/${REQUEST}/menu_credito > menu_credito - msg -ne " RESELLER del Key :\033[0m " - [[ -e $HOME/install/menu_credito ]] && { - echo -ne " " - [[ "$(cat $HOME/install/menu_credito)" = "" ]] && { - echo -e "SIN RESELLER\033[0m" - } || echo -e "$(cat $HOME/install/menu_credito)\033[0m" && rm -rf $HOME/install && echo -ne "\033[0m" - } || echo -e " NO HAY CONTENIDO DE KEY Key\033[0m\n" - read -p "Enter" -} - -alter_id() { - while [[ ${varread} != @([0-3]) ]]; do - tittle - msg -bar - echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m Alterar Creditos POR ID \033[0;32m(#OFICIAL)" - echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m REINICIAR CONTADOR TOTAL \033[0;32m(#OFICIAL)" - msg -bar - echo -e " \033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m Regresar" - msg -bar - echo -ne "${cor[6]}" - read -p " Opcion : " varread - done - msg -bar - if [[ ${varread} = 0 ]]; then - return 0 - elif [[ ${varread} = 1 ]]; then - echo -e "\033[1;32m DIGITA ID A REINICIAR " - msg -ne " Paste ID : " && read newli - sed -i "/${newli}/d" /etc/ADM-db/num-key.cont - echo "REGISTRO EN $(grep -o -i $newli /etc/ADM-db/num-key.cont | wc -l) KEYS" - read -p "Limite Aplicado Exitosamente" - elif [[ ${varread} = 2 ]]; then - echo -e "\033[1;32m BORRAREMOS EL CONTEO TOTAL DEL GENERADOR " - rm -rf /etc/ADM-db/num-key.cont && touch /etc/ADM-db/num-key.cont - echo "REGISTRO EN $(cat /etc/ADM-db/num-key.cont | wc -l) KEYS" - read -p "Limite Aplicado Exitosamente" - fi -} - -# 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 -} -alter_limit() { - echo -e "\033[1;32m DIGITA TU NUEVO LIMITE " - msg -ne "New Limit: " && read newli - echo $newli >/etc/ADM-db/limit - read -p "Limite Aplicado Exitosamente" -} - -dropIP() { - [[ ! -e /etc/dropIP.sh ]] && wget -q -O /etc/dropIP.sh https://www.dropbox.com/s/12r0h64vb1lc1oy/dropIP.sh?dl=0 - unset PIDGEN - if [[ -e /var/www/html/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot ]]; then - echo -e "[Unit] -Description=BotGen Service by @drowkid01 -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -User=root -WorkingDirectory=/root -ExecStart=/bin/bash /etc/dropIP.sh -Restart=always -RestartSec=3s - -[Install] -WantedBy=multi-user.target" >/etc/systemd/system/dropIP.service - - systemctl enable dropIP &>/dev/null - systemctl start dropIP &>/dev/null - else - killall dropIP &>/dev/null - systemctl stop dropIP &>/dev/null - systemctl disable dropIP &>/dev/null - rm /etc/systemd/system/dropIP.service &>/dev/null - clear - msg -bar - echo -e "\033[1;31m BotGen fuera de linea" - msg -bar - read -p "Presione Enter para continuar " - fi - -} - -meu_ip - -menau() { - unset PID_GEN1 - PID_GEN=$(ps x | grep -v grep | grep "http-server.sh") - PID_GEN1=$(ps x | grep -v grep | grep "8888") - PID_BGEN1=$(ps x | grep -v grep | grep "BotGen.sh") - add_fun="${PID_BGEN1}" - tittle - [[ -e /etc/valkey ]] && { - figlet -f smslant "$(cat \033[1;31m ${SCPT_DIR} \033[0;34mcon\033[0;35m |\033[0;32m$(ls /etc/http-shell/ | grep name | wc -l)\033[0;35m|\033[0;33m\033[0;33m KEYs" - cd $HOME - msg -bar - meu_ip - [[ -z $add_fun ]] || echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m Alterar Limite del BOT ( $limted )" #$PID_GEN1\033[0m - echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m APAGAR/VER KEYS" - #echo -e "\033[0;35m[\033[0;36mx\033[0;35m] \033[0;34m<\033[0;33m ------------------------" #KEYS ( GENERADOR )" - echo -e "\033[0;35m[\033[0;36m4\033[0;35m] \033[0;34m<\033[0;34m Generar Keys ALEATORIAS" - echo -e "\033[0;35m[\033[0;36m5\033[0;35m] \033[0;34m<\033[0;33m INICIAR/PARAR KEYGEN $PID_GEN\033[0m" - echo -e "\033[0;35m[\033[0;36m6\033[0;35m] \033[0;34m<\033[0;33m REGISTRO DE KEYS USADAS" - echo -e "\033[0;35m[\033[0;36m7\033[0;35m] \033[0;34m<\033[0;33m Checar KEY ACTIVADA" - echo -e "\033[0;35m[\033[0;36m8\033[0;35m] \033[0;34m<\033[0;33m ACTUALIZAR GENERADOR/KEY/CREDITOS " - echo -e "\033[0;35m[\033[0;36m9\033[0;35m] \033[0;34m<\033[0;33m Actualizar KEY" - echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;34m<\033[0;33m CONFIGURAR BOT DE TELEGRAM $PID_BGEN1\033[0m" - [[ -z $add_fun ]] || echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;34m<\033[0;33m + / - CREDITOS Por ID" - echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR" - msg -bar - -} - -while :; do - menau - selection=$(selection_fun $lim_menu) - case ${selection} in - 0) cd $HOME && break ;; - 1) alter_limit ;; - 2) remover_key ;; - 3) remover_key_usada ;; - 4) fix_key ;; - 5) start_gen ;; - 6) - echo -ne "\033[1;36m" - echo -e "$(cat /etc/gerar-sh-log)" 2>/dev/null || echo "NINGUN LOG DE MOMENTO" - echo -ne "\033[0m" && read -p "Enter" - ;; - 7) fum_ver ;; - 8) act_gen ;; - 9) att_gen_key ;; - 10) bot_menu ;; - 11) alter_id ;; - esac -done diff --git a/Bot/http-server.py b/Bot/http-server.py deleted file mode 100755 index f4a8c6b..0000000 --- a/Bot/http-server.py +++ /dev/null @@ -1,177 +0,0 @@ -#!/bin/bash -IVAR="/etc/http-instas" -onliCHECK=/var/www/html/drowkid01 -LIST="$(echo "NewVPS-" | rev)" -[[ -d /var/www/html/drowkid01 ]] || mkdir ${onliCHECK} -install_fun () { -apt-get install netcat -y -} -fun_ip () { -_hora=$(printf '%(%D-%H:%M:%S)T') - if [[ -e /bin/ejecutar/IPcgh ]]; then - IP="$(cat /bin/ejecutar/IPcgh)" - else - MEU_IP=$(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) - MEU_IP2=$(wget -qO- ipv4.icanhazip.com) - [[ "$MEU_IP" != "$MEU_IP2" ]] && IP="$MEU_IP2" && echo "$MEU_IP2" || IP="$MEU_IP" && echo "$MEU_IP" - echo "$MEU_IP2" > /bin/ejecutar/IPcgh - IP="$MEU_IP2" - fi -} - -#OFUSCATE -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 -} - -# LISTEN -listen_fun () { -PORTA="8888" -PROGRAMA="/bin/http-server.sh" -while true; do - nc.traditional -l -p "$PORTA" -e "$PROGRAMA" -done -} -# SERVER -server_fun () { -fun_ip -PORTA="8888" -DIR="/etc/http-shell" -unset ENV_ARQ -if [[ ! -d $DIR ]]; then -mkdir $DIR -fi -read URL -KEYZ=($(echo $URL|cut -d ' ' -f2|awk -F "/" '{print $2, $3, $4, $5, $6, $7}')) -KEY=$(echo ${KEYZ[0]}) && [[ ! $KEY ]] && KEY="ERRO" -ARQ=$(echo ${KEYZ[1]}) && [[ ! $ARQ ]] && ARQ="ERRO" -USRIP=$(echo ${KEYZ[2]}) && [[ ! $USRIP ]] && USRIP="ERRO" -FILE2="${DIR}/${KEY}" -FILE="${DIR}/${KEY}/$ARQ" -if [[ -e ${FILE} ]]; then -STATUS_NUMBER="200" -STATUS_NAME="Found" -ENV_ARQ="True" - if [[ -e ${FILE2}/GERADOR ]]; then - if [[ ${USRIP} != "ERRO" ]]; then - FILE="${DIR}/ERROR-KEY" - echo "GERADOR KEY!" > ${FILE} - ENV_ARQ="False" - fi - else - if [[ ${USRIP} = "ERRO" ]]; then - FILE="${DIR}/ERROR-KEY" - echo "KEY DE drowkid01!" > ${FILE} - ENV_ARQ="False" - fi - fi -else -FILE="${DIR}/ERROR-KEY" -echo "KEY INVALIDA!" > ${FILE} -STATUS_NUMBER="200" -STATUS_NAME="Found" -ENV_ARQ="False" -fi -cat << EOF -HTTP/1.1 $STATUS_NUMBER - $STATUS_NAME -Date: $(date) -Server: ShellHTTP -Content-Length: $(wc --bytes "$FILE" | cut -d " " -f1) -Connection: close -Content-Type: text/html; charset=utf-8 - -$(cat "$FILE") -EOF -if [[ $ENV_ARQ = "True" ]]; then -( -mkdir /var/www/html/$KEY -mkdir /var/www/$KEY -TIME="20+" - for arqs in `cat $FILE`; do - cp ${FILE2}/$arqs /var/www/html/$KEY/ - cp ${FILE2}/$arqs /var/www/$KEY/ - TIME+="1+" - done -_key="$(ofus ${IP}:${PORTA}/${KEY}/${LIST})" -echo "$(cat ${FILE2}.name) | $USRIP | ${_key} | $_hora" > /var/www/html/$KEY/checkIP.log -echo "$(cat ${FILE2}.name) | $USRIP | ${_key} | $_hora" > /var/www/$KEY/checkIP.log -RESELL="$(cat /var/www/$KEY/menu_credito)" -TIME=$(echo "${TIME}0"|bc) -sleep ${TIME}s -rm -rf /var/www/html/$KEY -rm -rf /var/www/$KEY -log="/etc/gerar-sh-log" -_hora=$(printf '%(%D-%H:%M:%S)T') -if [[ -d $FILE2 ]]; then -PERM="${DIR}/${KEY}/keyfixa" -if [[ -e $PERM ]]; then - if [[ $(cat $PERM) != "$USRIP" ]]; then - log="/etc/gerar-sh-log" - echo "$(cat ${FILE2}.name) | IP-FIJA:$USRIP | ${_key} | $_hora" >> $log - echo "$(cat ${FILE2}.name) | IP-FIJA:$USRIP | ${_key} | $_hora" >> ${onliCHECK}/checkIP.log && chmod +x ${onliCHECK}/checkIP.log - #cat /etc/gerar-sh-log > ${onliCHECK}/checkIP.log - rm -rf $FILE2 - rm -f ${FILE2}.name - fi -else -echo "$(cat ${FILE2}.name) | $USRIP | ${_key} | $_hora" >> $log -echo "$(cat ${FILE2}.name) | $USRIP | ${_key} | $_hora" >> ${onliCHECK}/checkIP.log && chmod +x ${onliCHECK}/checkIP.log -[[ -e /etc/ADM-db/token ]] && { -ID="$(cat ${FILE2}.name)" && ID="$(echo $ID | awk '{print $1}' | sed -e 's/[^0-9]//ig')" -[[ ${ID} -lt '999' ]] && ID='576145089' -TOKEN="$(cat /etc/ADM-db/token)" -urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage" -MENSAJE=" =======================================\n" -MENSAJE+=" ========📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩========\n" -MENSAJE+=" =======================================\n" -MENSAJE+=" ${_key}\n" -MENSAJE+=" =========== ☝️ USADA ☝ ============\n" -#MENSAJE+=" ☝️ USADA ☝️ \n" -MENSAJE+=" API/KEY : ${RESELL}\n" -MENSAJE+=" ID/API: ${ID} ✅ NOTIFICADO \n" -MENSAJE+=" =======================================\n" -MENSAJE+=" IP : $USRIP <-> HORA : $_hora\n" -MENSAJE+=" =======================================\n" -MENSAJE+=' 🔰 Bot generador de key 🔰\n' -MENSAJE+=' ⚜ By @drowkid01 ⚜ \n' -MENSAJE+=" =======================================\n" -#curl -s -X POST $urlBOT -d chat_id=$ID -d text="$(echo -e "$MENSAJE")" &>/dev/null -curl -s --max-time 10 -d "chat_id=$ID&disable_web_page_preview=1&text=$(echo -e "$MENSAJE")" $urlBOT &>/dev/null -} -rm -rf $FILE2 -rm -f ${FILE2}.name -fi -num=$(cat ${IVAR}) - if [[ $num = "" ]]; then - num=0 - fi -let num++ -echo $num > $IVAR -fi -) & > /dev/null -fi -} - -[[ $1 = @(-[Ss]tart|-[Ss]|-[Ii]niciar) ]] && listen_fun && exit -[[ $1 = @(-[Ii]stall|-[Ii]|-[Ii]stalar) ]] && listen_fun && exit -server_fun diff --git a/Bot/intBOT.sh b/Bot/intBOT.sh deleted file mode 100755 index 0ac9a83..0000000 --- a/Bot/intBOT.sh +++ /dev/null @@ -1,576 +0,0 @@ -#!/bin/bash -[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg) -bar="$(msg -bar3)" -[[ -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" -echo "$IP" > /usr/bin/vendor_code -} -function_verify () { -unset keybot -echo -e "\033[7;49;35m =====>>►► 🐲 GEN drowkid01${TTcent}VPS 🐲 ◄◄<<===== \033[0m" -msg -bar -[[ "$(echo "$(cat < /etc/nivbot)")" -ge "5" ]] && { -[[ -e /bin/downloadbot ]] && { -[[ -z $(cat < /bin/downloadbot) ]] && read -p " Ingresa tu Key de Autorizacion : " keybot || unset keybot -} || read -p " Key de Autorizacion : " keybot -} || read -p " Key de Autorizacion : " keybot -[[ -z $keybot ]] && { -rm -f /bin/downloadbot -[[ -e /bin/downloadbot ]] && link="$(cat < /bin/downloadbot)" || link='https://raw.githubusercontent.com' -permited=$(curl -sSL "${link}/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot") -} || { -permited=$(curl -sSL "$(ofus $keybot)/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot") -} - [[ $(echo $permited|grep "${IP}") = "" ]] && { - clear - echo -e "\n\n\n\e[31m=====================================================" - 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 @drowkid01" - echo -e "\e[31m=====================================================\n\n\n\e[0m" - [[ -e "/bin/ShellBot.sh" ]] && rm -f /bin/ShellBot.sh - exit 1 - } || { - ### INTALAR VERCION DE SCRIPT - 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 @drowkid01" - echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01" - echo -e "\e[32m=====================================================\n\n\n\e[0m" - CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} - [[ -e /etc/nivbot ]] && { - i=$(cat < /etc/nivbot) - lv=$(($i+1)) - echo $lv > /etc/nivbot - } || echo "1" > /etc/nivbot - v1=$(curl -sSL "https://www.dropbox.com/s/8tizr516cvkwss6/v-new.log") - echo "$v1" > /etc/ADM-db/vercion - } -} - -edit_cost () { -msg -bar -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 -bar -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 -} - -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/@drowkid01/ \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/drowkid01 \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 -bar - echo -ne "\033[1;97m Poner en linea KILL ID [s/n]: " - read bot_ini - msg -bar -[[ $bot_ini = @(s|S|y|Y) ]] && { - - echo -e "[Unit] -Description=BotGen Service by @drowkid01 -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 -bar - echo -e "\033[1;31m Bot ID KILL ACTIVADO" - msg -bar - } -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 -bar -echo -e "\033[1;31m Bot ID KILL fuera de linea" -msg -bar -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 -bar -echo -e "\033[1;33mDescargando archivos... ESPERE " -msg -bar -wget -q --no-check-certificate -O $HOME/files.tar https://www.dropbox.com/s/pf3b054mts3zrj6/files.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 -echo -ne "\033[1;33mFichero \033[1;31m[${n}.bot] " -[[ -e $HOME/update/$arqx ]] && veryfy_fun $arqx -n=$(($n + 1)) -done -cd $HOME && rm -rf $HOME/update && rm -f $HOME/files.tar -echo -ne "\033[1;31m[ ! ] RESTAUDANDO ADMINISTRADOR " -( -[[ -e $HOME/costes ]] && mv $HOME/costes /etc/ADM-db/sources/costes -[[ -e $HOME/token ]] && mv $HOME/token /etc/ADM-db/token -[[ -e $HOME/resell ]] && mv $HOME/resell /etc/ADM-db/resell -[[ -e $HOME/Admin-ID ]] && mv $HOME/Admin-ID /etc/ADM-db/Admin-ID -[[ -e $HOME/User-ID ]] && mv $HOME/User-ID /etc/ADM-db/User-ID -[[ -e $HOME/ress ]] && mv $HOME/ress /etc/ADM-db/ress -[[ -e $HOME/limit ]] && mv $HOME/limit /etc/ADM-db/limit -[[ -e $HOME/num-key.cont ]] && mv $HOME/num-key.cont /etc/ADM-db/num-key.cont -) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]" -[[ ! -e ${CIDdir}/resell ]] && echo "@drowkid01" > ${CIDdir}/resell -[[ ! -e $(cat < /etc/mpayu) ]] && echo "Paypal : chumogh@outlook.com" > /etc/mpayu && echo "593987072611" > /etc/numctc - rm $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 @drowkid01 -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -User=root -WorkingDirectory=/root -ExecStart=/bin/bash ${CIDdir}/BotGen.sh -start -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 -bar -echo -e "\033[1;31m BotGen fuera de linea" -msg -bar -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 -} - -bot_conf () { -[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token /root/token -[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID /root/Admin-ID -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 - } || { - 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...!" - 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/drowkid01/drowkid01-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 @drowkid01" #-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 () { -echo "Respaldando TOKEN y ADMINISTRADOR" -[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token /root/token -[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID /root/Admin-ID -[[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID /root/User-ID -[[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress /root/ress -[[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes /root/costes -[[ $(cat < /etc/ADM-db/resell) != "@drowkid01" ]] && mv /etc/ADM-db/resell /root/resell -rm -rf /etc/ADM-db/sources/gerar_key && 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 -} - - -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}/ress ]] && rfij="\033[1;32mRESELLER FIJO (Bot Personal )" || rfij="\033[1;31mRESELLER ALEATORIO ( Bot Custom )" -limcont=$(cat /etc/ADM-db/limit) -[[ "${limcont}" = "999" ]] && limted=" ∞ " || limted=$(cat /etc/ADM-db/limit) -msg -bar -echo -e " \033[7;49;35m ${TTini} 🐲 BotGEN drowkid01${TTcent}ADM $(cat ${CIDdir}/vercion) 🐲 ◄◄<=== \033[0m" -msg -bar -echo -e " - LIMITADOR \033[1;32m ( $limted ) \033[1;37m KILL ID VENCIDOS ${PID_kill} " -msg -bar -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 DE USUARIO TELEGRAM $adid" -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" -echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;35m> \033[1;37m MSG POR ID" -echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;35m> \033[1;37m Modificar COSTES DEL BOT" -msg -bar -echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR" -msg -bar -selection=$(selection_fun 11) -case ${selection} in -0) gerar && exit ;; -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)msj_ind;; -11)edit_cost;; -*) bot_gen;; -esac -} diff --git a/Code-BOT-Comandos/BotGen.sh b/Code-BOT-Comandos/BotGen.sh deleted file mode 100755 index ba99099..0000000 --- a/Code-BOT-Comandos/BotGen.sh +++ /dev/null @@ -1,292 +0,0 @@ -#!/bin/bash -# -*- ENCODING: UTF-8 -*- -#https://github.com/joao-lucas/ShellBot - -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-ID" && [[ ! -e ${CID} ]] && echo > ${CID} -CIDRESS="${CIDdir}/RESSELLERS" && [[ ! -e ${CIDRESS} ]] && mkdir ${CIDRESS} -keytxt="${CIDdir}/keys" && [[ ! -d ${keytxt} ]] && mkdir ${keytxt} -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://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/ShellBot.sh &> /dev/null -[[ -e /etc/texto-bot ]] && rm /etc/texto-bot -LINE=" ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" - -# Importando API -source ShellBot.sh -source ${SRC}/menu -source ${SRC}/ayuda -source ${SRC}/cache -source ${SRC}/invalido -source ${SRC}/status -source ${SRC}/reinicio -source ${SRC}/myip -source ${SRC}/id -source ${SRC}/back_ID -source ${SRC}/link -source ${SRC}/listID -source ${SRC}/gerar_key -source ${SRC}/power -source ${SRC}/comandos -source ${SRC}/update -source ${SRC}/donar -source ${SRC}/costes -#source ${SRC}/kill_drop.sh - -# Token del bot -bot_token="$(cat ${CIDdir}/token)" - -# Inicializando el bot -ShellBot.init --token "$bot_token" --monitor --flush --return map -ShellBot.username - -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}" = /img || "${message_text}" = /img ]] && listID_src - [[ "${callback_query_data}" = '/banIP' || "${message_text}" = '/banIP' ]] && list_IP - -} - - - - -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 -} - - -download_file () { -# shellbot.sh editado linea 3986 -user=User-ID -[[ -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="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_add () { - ShellBot.sendMessage --chat_id ${1} \ - --text "$(echo -e $bot_retor)" \ - --parse_mode html -} - -upfile_fun () { - [[ ! -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 "$bot_retorno")" \ - #--parse_mode html \ - #--reply_markup "$(ShellBot.ForceReply)" - #--reply_markup "$(ShellBot.InlineKeyboardMarkup -b "$2")" -} - -upimg_fun () { - ShellBot.sendDocument --chat_id $(cat ${CIDdir}/Admin-ID) \ - --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" - bot_retorno+="$LINE\n" - bot_retorno+=" COMANDO NO PERMITIDO !!\n Quizas debes usar este /keygen \n O Posiblemente no estas Autorizado, clic aqui /prices o \n Contacta a $(cat < /etc/ADM-db/resell) y adquiere una subscripcion \n Toca aqui para ayuda /ayuda \n" - bot_retorno+="$LINE\n" - ShellBot.sendMessage --chat_id $var \ - --text "$(echo -e $bot_retorno)" \ - --parse_mode html - sleep 5s - msj_del ${message_message_id} - msj_del ${MSG_id} - return 0 -} - - -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 generador de key 🔰\n" - bot_retorno+=" ⚜ by @drowkid01 ⚜\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ✅ ID enviado al admin ✅\n" - bot_retorno+="$LINE" - comand_boton "atras" - - saveID "${callback_query_from_id}" - var=$(cat < ${CIDdir}/Admin-ID) - ShellBot.sendMessage --chat_id $var \ - --text "$(echo -e "$bot_retorno2")" \ - --parse_mode html \ - --reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_save_id')" - - return 0 -} - - -msj_fun () { - [[ ! -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 - return 0 -} - -msj_del () { - [[ ! -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 -} - -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 -} - - -saveID(){ - unset botao_save_id - botao_save_id='' - ShellBot.InlineKeyboardButton --button 'botao_save_id' --line 1 --text "Autorizar ID" --callback_data "/saveid $1" -} - - -botao_conf='' -botao_user='' -botao_donar='' -unset botao_send_id -botao_send_id='' -ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 1 --text "ENVIAR al ADM" --callback_data '/sendid' -ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 1 --text "menu" --callback_data '/menu' - -ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text 'NEW ID' --callback_data '/add' -ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text 'QUITAR 🗑' --callback_data '/del' -ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text 'LISTAR 📋' --callback_data '/list' -ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text ' 🔎 ID' --callback_data '/buscar' - -ShellBot.InlineKeyboardButton --button 'botao_conf' --line 2 --text ' ✅ | ❌ ' --callback_data '/power' -ShellBot.InlineKeyboardButton --button 'botao_conf' --line 2 --text 'MENU' --callback_data '/menu' - -ShellBot.InlineKeyboardButton --button 'botao_conf' --line 3 --text '🔑 GEN KEY 🔑' --callback_data '/keygen' -ShellBot.InlineKeyboardButton --button 'botao_user' --line 1 --text '🔑 GEN KEY 🔑' --callback_data '/keygen' -ShellBot.InlineKeyboardButton --button 'botao_user' --line 2 --text ' 🧿 Ban|IP 📲' --callback_data '/banIP' # '1' --url "https://t.me/$(cat < /etc/ADM-db/resell)" -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 '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 ' 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" - - [[ ! -e "${CIDdir}/Admin-ID" ]] && echo "null" > ${CIDdir}/Admin-ID - permited=$(cat ${CIDdir}/Admin-ID | awk '{print $1}') - comand - done -done diff --git a/Code-BOT-Comandos/ayuda b/Code-BOT-Comandos/ayuda deleted file mode 100755 index 3f637c3..0000000 --- a/Code-BOT-Comandos/ayuda +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -ayuda_src () { -bot_retorno=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 $message_from_first_name $message_from_last_name 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n" - if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then - if [[ $(cat ${CID}|grep "${chatuser}") = "" ]]; then - bot_retorno+="/ID\n 𝚖𝚞𝚎𝚜𝚝𝚛𝚊 𝚜𝚞𝚜 𝙸𝙳 𝚍𝚎 𝚝𝚎𝚕𝚎𝚐𝚛𝚊𝚖 \n 𝚙𝚊𝚛𝚊 𝚝𝚎𝚗𝚎𝚛 𝚊𝚌𝚌𝚎𝚜𝚘 𝚊𝚕 /𝚔𝚎𝚢𝚐𝚎𝚗\n 𝚍𝚎𝚟𝚎 𝚎𝚗𝚟𝚒𝚊𝚛 𝚜𝚞 𝙸𝙳 𝚊𝚕 𝚊𝚍𝚖𝚒𝚗 $(cat < /etc/ADM-db/resell)\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 $(cat < /etc/ADM-db/resell)\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+="/donar\n ayuda Voluntaria\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 $(cat < /etc/ADM-db/resell)\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 $(cat < /etc/ADM-db/resell)\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+="/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+="/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 $(cat < /etc/ADM-db/resell)\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 $(cat < /etc/ADM-db/resell)\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 -} diff --git a/Code-BOT-Comandos/back_ID b/Code-BOT-Comandos/back_ID deleted file mode 100755 index a8b5d82..0000000 --- a/Code-BOT-Comandos/back_ID +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -upfile_src () { -cp ${CID} $HOME/ -upfile_fun $HOME/User-ID -rm $HOME/User-ID -} diff --git a/Code-BOT-Comandos/cache b/Code-BOT-Comandos/cache deleted file mode 100755 index 399b818..0000000 --- a/Code-BOT-Comandos/cache +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -cache_src () { - -#MEMORIA RAM -unset ram1 -unset ram2 -unset ram3 -unset _usor -_usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')") -ram1=$(free -h | grep -i mem | awk {'print $2'}) -ram2=$(free -h | grep -i mem | awk {'print $4'}) -ram3=$(free -h | grep -i mem | awk {'print $3'}) - bot_retorno="==========Antes==========\n" - bot_retorno+="Ram: $ram1 || EN Uso: $_usor\n" - bot_retorno+="USADA: $ram3 || LIBRE: $ram2\n" - bot_retorno+="=========================\n" -msj_fun - -sleep 2 - -sudo sync -sudo sysctl -w vm.drop_caches=3 > /dev/null 2>&1 - -unset ram1 -unset ram2 -unset ram3 -unset _usor -_usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')") -ram1=$(free -h | grep -i mem | awk {'print $2'}) -ram2=$(free -h | grep -i mem | awk {'print $4'}) -ram3=$(free -h | grep -i mem | awk {'print $3'}) - bot_retorno="==========Ahora==========\n" - bot_retorno+="Ram: $ram1 || EN Uso: $_usor\n" - bot_retorno+="USADA: $ram3 || LIBRE: $ram2\n" - bot_retorno+="=========================\n" -msj_fun -} diff --git a/Code-BOT-Comandos/comandos b/Code-BOT-Comandos/comandos deleted file mode 100755 index 90752b5..0000000 --- a/Code-BOT-Comandos/comandos +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/bash -# -*- ENCODING: UTF-8 -*- - -dropID () { - unset bot_retorno -[[ -e /etc/systemd/system/btkill.service ]] && { -killall kill_drop.sh &>/dev/null -systemctl stop btkill &>/dev/null -systemctl disable btkill &>/dev/null -rm /etc/systemd/system/btkill.service &>/dev/null -bot_retorno+=" ⚠️ ALERTA DE NOTIFICACION ⚠️\n" -bot_retorno+=" Bot ID KILL fuera de linea" -bot_retorno+="$LINE\n" -} || { -echo -e '[Unit] -Description=BotGen Service by @drowkid01 -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -User=root -WorkingDirectory=/root -ExecStart="/bin/bash" "/etc/ADM-db/sources/kill_drop.sh" -ExecReload="/bin/bash" "/etc/ADM-db/sources/kill_drop.sh" -Restart=always -RestartSec=3600s - -[Install] -WantedBy=multi-user.target' > /etc/systemd/system/btkill.service - systemctl daemon-reload - systemctl enable btkill &>/dev/null - systemctl start btkill &>/dev/null - bot_retorno+=" 🔰 AVISO DE NOTIFICACION 🔰 \n" - bot_retorno+=" Bot ID KILL ACTIVADO" - bot_retorno+="$LINE\n" -} -msj_fun -#[[ -e /etc/ADM-db/Admin-ID ]] && var=$(cat < /etc/ADM-db/Admin-ID) -#[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]} - # ShellBot.sendMessage --chat_id $var \ - # --reply_to_message_id $var \ - # --text "$(echo -e $bot_retorno)" \ - # --parse_mode html -} - - -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;; - /upmake)dupdate2;; - /*|*)invalido_fun &;; - esac - 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 &;; - /[Bb]anIP|[Bb]anIP)reply &;; - /[Pp]rice|[Pp]price|[Pp]rices|/[Pp]rices)prices_on &;; - /[Dd]onar|[Dd]onar)donar &;; - /upmake)dupdate2;; - /*|*)invalido_fun &;; - esac - fi - sleep 5 - [[ -e "/etc/donar_active.txt" ]] && donar - fi - else - - if [[ ${message_reply_to_message_message_id[$id]} ]]; then - case ${message_reply_to_message_text[$id]} in - '/del')deleteID_reply;; - '/add')addID_reply;; - '/addrev')addID_reventa;; - '/buscar')searchID_reply;; - '/banIP')killIP_reply;; - '/img')img_reply;; - *)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 &;; - /[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 &;; - /[Ii]mg|[Ii]mg)reply &;; - /[Aa]dd|/[Dd]el)reply &;; - /[Aa]ddrev)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 &;; - /[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 &;; - /upmake)dupdate2;; - /*|*)invalido_fun &;; - esac - - fi - - fi -} diff --git a/Code-BOT-Comandos/costes b/Code-BOT-Comandos/costes deleted file mode 100755 index f849508..0000000 --- a/Code-BOT-Comandos/costes +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -#!/bin/bash -[[ -e /etc/ADM-db/idioma_menuinst ]] && tr=$(cat < /etc/ADM-db/idioma_menuinst) - -prices_on () { -[[ -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}" -local msg - msg=' •••••••••••••••••••••••••••••••••••••••••••••••••\n' - msg+=" Hola, 『 ${firsnme} ${lastnme} 』 \n" - msg+=' •••••••••••••••••••••••••••••••••••••••••••••••••\n' - msg+=' $0.70 USD - Acceso ilimitado al BOT 4 dias \n' - msg+=' $1.00 USD - Acceso ilimitado al BOT 7 dias \n' - msg+=' $1.50 USD - Acceso ilimitado al BOT 15 dias \n' - msg+=' $2.00 USD - Acceso ilimitado al BOT 30 dias \n' - msg+=' $3.00 USD - Acceso ilimitado al BOT 60 dias\n' - msg+=' $4.00 USD - Acceso ilimitado al BOT 90 dias\n' - msg+=' $5.00 USD - Acceso ilimitado al BOT 180 dias\n' - msg+=' $9.00 USD - Acceso ilimitado al BOT 365 dias\n' - msg+='•••••••••••••••••••••••••••••••••••••••••••••••••\n' - msg+=" BOT PREMIUM CON ACCESO Ilimitado \n Incluyendo tu reseller en la Key! \n Soporte, Actualizaciones y MAS!!)\n" - msg+='•••••••••••••••••••••••••••••••••••••••••••••••••\n' - msg+=" VISITA NUESTRO CATALOGO EN https://shoppy.gg/@drowkid01/ \n" - msg+='•••••••••••••••••••••••••••••••••••••••••••••••••\n' - ShellBot.sendMessage --chat_id "${message_chat_id[$id]}" \ - --reply_to_message_id "${message_message_id[$id]}" \ - --text "$(echo -e $msg)" \ - --parse_mode html -return 0 -} diff --git a/Code-BOT-Comandos/donar b/Code-BOT-Comandos/donar deleted file mode 100755 index dbe3e0d..0000000 --- a/Code-BOT-Comandos/donar +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -donar () { - bot_retorno="$LINE\n" - bot_retorno+=" ⚠️ TENDRAS ACCESO ILIMITADO ⚠️ \n 🚫 INCLUIDO TU RESELLER EN LA KEY 🚫" - bot_retorno+=" 𝙴𝚜𝚝𝚎 𝙿𝚛𝚘𝚢𝚎𝚌𝚝𝚘, 𝚗𝚎𝚌𝚎𝚜𝚒𝚝𝚊 𝚊𝚢𝚞𝚍𝚊 𝚙𝚊𝚛𝚊 𝙴𝚟𝚘𝚕𝚞𝚌𝚒𝚘𝚗𝚊𝚛\n" - bot_retorno+=" 𝙎𝙞 𝙙𝙚𝙨𝙚𝙖𝙨 𝙍𝙚𝙖𝙡𝙞𝙯𝙖𝙧 𝙪𝙣𝙖 𝘿𝙤𝙣𝙖𝙘𝙞𝙤𝙣\n" - bot_retorno+=" 𝙋𝙖𝙮𝙥𝙖𝙡\n" - bot_retorno+=" PAGO BTC - CRIPTOMONEDA\n" - bot_retorno+="$LINE\n" - bot_retorno+=" Desde ya muchas gracias\n" - bot_retorno+="$LINE\n" - msj_fun - #msj_donar -} - -donar_OnOff () { -if [[ ! -e "/etc/donar_active.txt" ]]; then - echo "on" > /etc/donar_active.txt - local bot_retorno="$LINE\n" - bot_retorno+="MENSAJE DONATIVO : ENCENDIDO ✅\n" - bot_retorno+="$LINE\n" - msj_fun -else - rm -rf /etc/donar_active.txt - local bot_retorno="$LINE\n" - bot_retorno+="MENSAJE DONATIVO: APAGADO ❌\n" - bot_retorno+="$LINE\n" - msj_fun -fi -} diff --git a/Code-BOT-Comandos/gerar_key b/Code-BOT-Comandos/gerar_key deleted file mode 100755 index f4e39df..0000000 --- a/Code-BOT-Comandos/gerar_key +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/bash -# -*- ENCODING: UTF-8 -*- - -# verificacion primarias -meu_ip_fun () { -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" -} - -[[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py" -SCPT_DIR="/etc/SCRIPT" -[[ ! -e ${SCPT_DIR} ]] && mkdir ${SCPT_DIR} -INSTA_ARQUIVOS="ADMVPS.zip" -DIR="/etc/http-shell" -LIST="$(echo "NewVPS-" | rev)" -[[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")" - -gerar_key () { -unset usrLOP nombrevalue nBot nBotSS -[[ -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 ${usrLOP} ]] && LIST="$(echo "NewVPS-" | rev)" || LIST="$(echo "${usrLOP}-" | rev)" -numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l) -limcont=$(cat /etc/ADM-db/limit) -[[ "$limcont" -ge "998" ]] && limted="∞" || limted=$(cat /etc/ADM-db/limit) -[[ "$(( $limcont - $numkey_gen ))" -ge "900" ]] && credres="∞" || credres=$(( $limcont - $numkey_gen)) -meu_ip_fun -[[ -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 $nBot ]] && nBot=$(ShellBot.username) -[[ -e ${CIDdir}/ress ]] && echo $nomkey > ${SCPT_DIR}/menu_credito || echo -e "${firsnme} ${lastnme}" > ${SCPT_DIR}/menu_credito -adminV="$(less ${SCPT_DIR}/menu_credito)"; -valuekey="$(date | md5sum | head -c11)" -valuekey+="$(echo $(($RANDOM*10))|head -c 6)" -#valuekey="$(date | md5sum | head -c4)" -#valuekey+="$(echo $(($RANDOM*10))|head -c 3)" -#valuekey+="$(date | md5sum | head -c5)" -#valuekey+="$(echo $(($RANDOM*10))|head -c 2)" -oUP=$(wget -qO- ipv4.icanhazip.com) -fun_list "$valuekey" -keyfinal="$(ofus "$oUP:8888/${valuekey}/$LIST")" -#local bot_retorno=" ═--💻 𝙎 𝘾 𝙍 𝙄 𝙋 𝙏 | 𝘾𝙝𝙪𝙢𝙤𝙂𝙃|𝘼𝘿𝙈 💻 --═\n" #-------------------------------------------------------------------------------------- -local bot_retorno=" $LINE\n" #-------------------------------------------------------------------------------------- -# 🚫 Sin TU RESELLER EN LA KEY 🚫\n -[[ -z ${message_chat_tittle} ]] && grupCHAT="" || grupCHAT="ChatID : ${chatuser} " -#bot_retorno+=" KEY { $numkey_gen } DE @${usrLOP} con ID: ${nombrevalue} $grupCHAT \n ⚠️ VENCE EN 1 HORA O AL SER USADA ⚠️\n" -[[ -z ${usrLOP} ]] && bot_retorno+=" 🪧 USUARIO SIN ALIAS CON ID: ⚠️ADVERTIDO⚠️ \n ⚠️ KEY VENCE EN 4 HORAS O AL USARLA ⚠️\n ⚠️\n" || bot_retorno+=" KEY { $numkey_gen } DE @${usrLOP} con ID: ${nombrevalue} $grupCHAT \n ⚠️ VENCE EN 4 HORAS O AL SER USADA ⚠️\n" -bot_retorno+="$LINE\n" -bot_retorno+=" 🛡️ 𝚁𝙴𝚂𝙴𝙻𝙻𝙴𝚁 🛡️ : ${adminV}\n" -bot_retorno+="$LINE\n" -bot_retorno+=" 🗝️
${keyfinal}
🗝️\n" -bot_retorno+="$LINE\n" -bot_retorno+=" 🛡️ 𝙸𝚗𝚜𝚝𝚊𝚕𝚊𝚍𝚘𝚛 𝙾𝚏𝚒𝚌𝚒𝚊𝚕 $(cat < /etc/SCRIPT/v-local.log) 🔐 \n" -bot_retorno+="$LINE\n" -bot_retorno+='
apt update -y; apt upgrade -y; wget -q https://raw.githubusercontent.com/drowkid01/ScriptCGH/main/setup; chmod 777 setup; ./setup --install
\n' -bot_retorno+="$LINE\n" -bot_retorno+=" 𝙍𝙚𝙘𝙤𝙢𝙚𝙣𝙙𝙖𝙙𝙤 𝙐𝙗𝙪𝙣𝙩𝙪 18.04 \n 🧬🧬 S.O Ubuntu 14 a 22 X64(x86|ARM) 🧬🧬 \n Debian 7,8,9,11 (x64) \n 🪦 ADQUIERE TU ACCESO EN @${nBot} 🛡️⚔️\n" -bot_retorno+="$LINE\n" -msj_fun -bot_file+=" 🛡️ 𝙸𝚗𝚜𝚝𝚊𝚕𝚊𝚍𝚘𝚛 𝙾𝚏𝚒𝚌𝚒𝚊𝚕 $(cat < /etc/SCRIPT/v-local.log) 🛡️ \n\n" -bot_file+="apt update -y && apt upgrade -y && wget -q https://raw.githubusercontent.com/drowkid01/ScriptCGH/main/setup && chmod +x setup && ./setup --install\n\n" -bot_file+=" ${keyfinal} \n" -echo -e ${bot_file} > ${keytxt}/key_${usrLOP}.txt -upfile_fun ${keytxt}/key_${usrLOP}.txt -rm ${keytxt}/key_${usrLOP}.txt -} -fun_list () { -rm ${SCPT_DIR}/*.x.c &> /dev/null -unset KEY -KEY="$1" -#CRIA DIR -[[ ! -e ${DIR} ]] && mkdir ${DIR} -#ENVIA ARQS -i=0 -VALUE+="gerar.sh http-server.py lista-arq $BASICINST" -for arqx in `ls ${SCPT_DIR}`; do -[[ $(echo $VALUE|grep -w "${arqx}") ]] && continue -echo -e "[$i] -> ${arqx}" -arq_list[$i]="${arqx}" -let i++ -done -#CRIA KEY -[[ ! -e ${DIR}/${KEY} ]] && mkdir ${DIR}/${KEY} -#PASSA ARQS -unset nombrevalue -[[ -z ${nombrevalue} ]] && nombrevalue="${message_from_id}" -[[ -z ${nombrevalue} ]] && nombrevalue="${callback_query_from_id}" -[[ "$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)" -ge "$(cat < /etc/ADM-db/limit)" ]] && -{ -numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l) -local bot_retorno="$LINE\n" -bot_retorno+=" 🚫 OOOH!, @${callback_query_from_username} con ID:$nombrevalue ‼️\n Tus Creditos se han Agotado \n" -bot_retorno+=" TUS CREDITOS PERMITIDOS :『 $(cat < /etc/ADM-db/limit) 』, 𝙆𝙚𝙮𝙨 𝙂𝙚𝙣𝙚𝙧𝙖𝙙𝙖𝙨『 $numkey_gen 』🗝️\n" -bot_retorno+="$LINE\n" -bot_retorno+=" Si deseas Usar el Generador sin Limite , Contacta con $(cat < /etc/ADM-db/resell)\n" -bot_retorno+=" Recuerda que Todo Esfuerzo Vale, Solicita Acceso \n" -bot_retorno+=" 𝙍𝙚𝙘𝙤𝙢𝙚𝙣𝙙𝙖𝙙𝙤 𝙐𝙗𝙪𝙣𝙩𝙪 18.04 \n 🧬🧬 S.O Ubuntu 16,18,20 X64(x86|ARM) 🧬🧬 \n Debian 7,8,9,10 (x64) \n 🪦 ADQUIERE TU ACCESO EN @${nBot} 🛡️⚔️\n" -bot_retorno+=" 🔐 𝙆𝙚𝙮𝙨 𝙐𝙨𝙖𝙙𝙖𝙨『 $(grep -o -i $nombrevalue /etc/gerar-sh-log | wc -l) 』 🔓, 𝘒𝘦𝘺𝘴 𝘈𝘤𝘵𝘪𝘷𝘢𝘴 『 $(ls /etc/http-shell/ | grep name | wc -l) 』 🗝️ \n" -bot_retorno+="$LINE\n" -msj_fun -exit -} || -echo "$nombrevalue" >> /etc/ADM-db/num-key.cont -numkey_used=$(grep -o -i $nombrevalue /etc/gerar-sh-log | wc -l) -numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l) -#ADM BASIC -arqslist="$BASICINST" -for arqx in `echo "${arqslist}"`; do -[[ -e ${DIR}/${KEY}/$arqx ]] && continue #ANULA ARQUIVO CASO EXISTA -cp ${SCPT_DIR}/$arqx ${DIR}/${KEY}/ -echo "$arqx" >> ${DIR}/${KEY}/${LIST} -done -rm ${SCPT_DIR}/*.x.c &> /dev/null -echo "$nombrevalue" > ${DIR}/${KEY}.name -[[ ! -z $IPFIX ]] && echo "$IPFIX" > ${DIR}/${KEY}/keyfixa -_hora=$(printf '%(%D-%H:%M:%S)T') -TOKEN="$(cat /etc/ADM-db/token)" -urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage" -MENSAJE=" ••••📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩••••\n" -MENSAJE+=" KEY : ${keyfinal} \n" -MENSAJE+=" CADUCADA : $_hora\n" -MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n" -MENSAJE+=' 🔰 Bot generador de key 🔰\n' -MENSAJE+=' ⚜ By @drowkid01 ⚜ \n' -MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n" -#&& curl -s -X POST $urlBOT -d chat_id=$nombrevalue -d text="$(echo -e "$MENSAJE")" &>/dev/null -at now +4 hours <<< "rm -rf ${DIR}/${KEY} && rm -f ${DIR}/${KEY}.name" -} - -ofus () { -unset server -server=$(echo ${txt_ofuscatw}|cut -d':' -f1) -unset txtofus -number=$(expr length $1) -for((i=1; i<$number+1; i++)); do -txt[$i]=$(echo "$1" | cut -b $i) -case ${txt[$i]} in -".")txt[$i]="x";; -"x")txt[$i]=".";; -"5")txt[$i]="s";; -"s")txt[$i]="5";; -"1")txt[$i]="@";; -"@")txt[$i]="1";; -"2")txt[$i]="?";; -"?")txt[$i]="2";; -"4")txt[$i]="0";; -"0")txt[$i]="4";; -"/")txt[$i]="K";; -"K")txt[$i]="/";; -esac -txtofus+="${txt[$i]}" -done -echo "$txtofus" | rev -} \ No newline at end of file diff --git a/Code-BOT-Comandos/id b/Code-BOT-Comandos/id deleted file mode 100755 index 0b04370..0000000 --- a/Code-BOT-Comandos/id +++ /dev/null @@ -1,315 +0,0 @@ -#!/bin/bash -[[ -d /root/RegBOT ]] || mkdir /root/RegBOT -send_ID () { -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 < 2 ]] && { -echo "${chatuser}" >> /root/RegBOT/U_check.txt - bot_retor="$LINE\n" - bot_retor+=" Cliente 『 ${firsnme} ${lastnme} 』\n" - [[ -z ${nUSER} ]] && bot_retor+=" ⚠️ USUARIO SIN ALIAS ⚠️\n" || bot_retor+=" ALIAS: @${nUSER} CON $n_soli INTENTOS\n" - bot_retor+="$LINE\n" - bot_retor+=" FORMATO $MSG_id ${chatuser} | DIAS \n" - bot_retor+=" PARA ACEPTAR DA CLICK AQUI 👉 /add , LUEGO\n" - bot_retor+=" PARA 4 DIAS COPY 👉 ${chatuser} | 4 \n" - bot_retor+=" PARA 7 DIAS COPY 👉 ${chatuser} | 7 \n" - bot_retor+=" PARA 15 DIAS COPY 👉 ${chatuser} | 15 \n" - bot_retor+=" PARA 30 DIAS COPY 👉 ${chatuser} | 30 \n" - bot_retor+=" PARA 60 DIAS COPY 👉 ${chatuser} | 60 \n" - bot_retor+=" PARA 90 DIAS COPY 👉 ${chatuser} | 90 \n" - bot_retor+=" PARA 180 DIAS COPY 👉 ${chatuser} | 179 \n" - bot_retor+=" PARA 1 AÑO COPY 👉 ${chatuser} | 364 \n" - bot_retor+=" CUSTOM COPY 👉 ♨️ ${chatuser} | dias ♨️\n" - bot_retor+="$LINE\n" - bot_retor+=" VERIFIQUE SU TOKEN DE PAGO ANTES DE LA AUTORIZACION\n" - bot_retor+="$LINE\n" - msj_add "$(cat < ${CIDdir}/Admin-ID)" - bot_retorno="$LINE\n" - bot_retorno+=" 🔰 𝚂𝚞 𝙸𝙳 【 ${chatuser} 】 🔰\n" - bot_retorno+="$LINE\n" - [[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ AÑADA UN ALIAS PARA PODER SOLICITAR ⚠️\n" || bot_retorno+="UD SOLICITO AUTORIZACION A $(cat < /etc/ADM-db/resell)\n" - [[ -z ${nUSER} ]] && bot_retorno+=" IMPOSIBLE VERIFICAR ID SIN ALIAS\n REMARCA SU ${n_soli} SOLITUD INVALIDA \n" || bot_retorno+=" ESTA ES SU ${n_soli} SOLICITUD MEDIANTE ID DE REGISTRO\n" - bot_retorno+="$LINE\n" - [[ -z ${nUSER} ]] && bot_retorno+=" ⚠ ID ENVIADO CON ADVERTENCIA (POSIBLE BANEO DE ID) ⚠️\n" || bot_retorno+=" ✅ ID ENVIADO EXITOSAMENTE ✅\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ENVIE SU COMPROBANDO O CORREO DE PAGO PARA SU AUTORIZACION\n" - bot_retorno+="$LINE\n" - msj_fun - } || { - bot_retorno="$LINE\n" - bot_retorno+=" 🔰 𝚂𝚞 𝙸𝙳 【 ${chatuser} 】 🔰\n" - bot_retorno+="$LINE\n" - [[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ USUARIO SIN ALIAS ⚠️\n" || bot_retorno+=" ALIAS: @${nUSER} CON ID : ${chatuser}\n" - [[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ AÑADA UN ALIAS PARA PODER SOLICITAR ⚠️\n" || bot_retorno+=" UD ENVIO ${n_soli} SOLICITUDES A $(cat < /etc/ADM-db/resell)\n" - [[ -z ${nUSER} ]] && bot_retorno+=" IMPOSIBLE VERIFICAR ID SIN ALIAS\n REMARCA SU ${n_soli} SOLITUD INVALIDA \n" || bot_retorno+=" SU PETICION FUE RECHAZADA POR EXCESO DE PETICIONES\n" - bot_retorno+=" 🚫🚫️ SU ID FUE BANEADO 🚫🚫 \n" - bot_retorno+="$LINE\n" - echo "${chatuser}" >> /root/RegBOT/banID - bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n" - bot_retorno+="$LINE\n" - 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 $(cat /etc/ADM-db/Admin-ID|grep "${chatuser}" ) ]] && { #ENTRA A VERIFICAR ADM -bot_retorno=" $LINE\n" -bot_retorno+=" HOLA @${nUSER} UD ES ADM \n" -bot_retorno+="$LINE\n" -bot_retorno+=" DIJITA MENU /menu 🔰\n" -bot_retorno+="\n" -bot_retorno+="$LINE\n" -bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n" -bot_retorno+="$LINE\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 5s -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="$LINE\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+="$LINE\n" - bot_retorno+="𝚂𝚞 𝙸𝙳 【 ${chatuser} 】\n" - bot_retorno+="$LINE\n" - bot_retorno+="👇PINCHA 👇 EN EL BOTON PARA QUE $(cat < /etc/ADM-db/resell) TE AUTORICE!!\n" - bot_retorno+="$LINE\n" - menu_printSN - sleep 5s - msj_del ${message_message_id} - msj_del ${MSG_id} - } || { # ENTRA A IDS YA REGISTRADOS - bot_retorno=" $LINE\n" - bot_retorno+=" HOLA @${nUSER} SU ID ESTA REGISTRADO \n" - bot_retorno+="$LINE\n" - bot_retorno+=" 🆔 : ${chatuser} 🔰\n" - bot_retorno+=" FECHA DE CORTE : ⏳ $(cat /etc/ADM-db/User-ID | grep ${chatuser}| awk '{print $3}') | $(date +%R)\n" - bot_retorno+="\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n" - bot_retorno+="$LINE\n" - msj_fun - } - } # FIN VERIFICAR ADM -} - -killIP_reply () { - -if sed -i "/${message_text[$id]}/d" /var/www/html/drowkid01/checkIP.log; then -bot_retorno="$LINE\n" -bot_retorno+=" IP ELIMINADA DE REGISTRO EXITOSAMENTE!\n" -bot_retorno+=" IP : ${message_text[$id]} \n" -bot_retorno+="$LINE\n" -else -bot_retorno="$LINE\n" -bot_retorno+=" ERROR AL ELIMINAR IP DE REGISTROS \n" -bot_retorno+=" POSIBLEMENTE ${message_text[$id]} NO EXISTA \n" -bot_retorno+="$LINE\n" -fi -msj_fun -} - -deleteID_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') -sed -i "${message_text[$id]}/d" ${CID} -bot_retorno="$LINE\n" - bot_retorno+=" ID ELIMINADO EXITOSAMENTE!\n" - bot_retorno+=" ID Eliminado: ${ids}\n" - bot_retorno+="$LINE\n" - - bot_retor=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n" - #bot_retor+="𝙃𝙤𝙡𝙖 『 $message_from_first_name $message_from_last_name 』\n" - bot_retor+="Desafortunadamente tu Membresia ha Finalizado\n" - #bot_retor+=" ⌚⌚ Hora Actual del Bot : ⌚⌚\n" - bot_retor+="Fecha de Corte : $(date '+%C%y-%m-%d') - $(date +%R) \n" - bot_retor+="Si tienes Dudas, Contacta con $(cat < /etc/ADM-db/resell)\n" - bot_retor+="$LINE\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+="$LINE\n" - msj_fun - msj_add ${ids} - upfile_src -} - -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+="$LINE\n" - bot_retorno+=" FILE ${return[file_path]} \n" - bot_retorno+="$LINE" -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+="$LINE\n" - bot_retorno+=" ID UNICO FILE PHOTO : ${message_photo_file_unique_id}\n" - bot_retorno+=" CAPTION : ${message_caption}\n" - bot_retorno+="$LINE\n" - msj_fun - #upfile_src - msj_img "${ID_img}" -} - -searchID_reply () { -searchID=$(cat -n /etc/ADM-db/User-ID | grep "${message_text[$id]}") -bot_retorno="$LINE\n" - bot_retorno+=" MOSTRANDO RESULTADOS DE BUSQUEDA!\n" - bot_retorno+=" $LINE\n" - [[ ! -z ${searchID} ]] && bot_retorno+=" N°${searchID} \n" || bot_retorno+=" ID NO ENCONTRADO \n" - msj_fun -} - -addID_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+="$LINE\n" - bot_retorno+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid}|$(date +%R)\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ✅ ID REGISTRADO EXITOSAMENTE ✅\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n" -unset i -for i in $(cat /etc/ADM-db/User-ID | awk '{print $3}'); do -[[ "$(date -d $(date '+%C%y-%m-%d') +%s)" -ge "$(date -d $i +%s)" ]] && { -for id in $(cat /etc/ADM-db/User-ID | grep "$i" | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do -sed -i "/${id}/d" /etc/ADM-db/User-ID - 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 $(cat < /etc/ADM-db/resell)\n" - bot_retor+=" $LINE\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+=" $LINE\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+=" $LINE\n" - bot_retor+=" EL ADM $(cat < /etc/ADM-db/resell) 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+=" $LINE\n" - bot_retor+=" GENERAR Key's usar el comando /keygen\n" - bot_retor+=" Para MENU Digita el comando /menu\n" - bot_retor+=" $LINE\n" - bot_retor+=" CONTACTA ESCRIBE AL ADM $(cat < /etc/ADM-db/resell)\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @drowkid01 " - 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+=" $LINE\n" - msj_fun - msj_add ${ids} - upfile_src - } || { - bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" - bot_retorno+="$LINE\n" - bot_retorno+="Este ID ya esta Registrado\n" - bot_retorno+=" ❌ ID NO REGISTRADO ❌\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n" - bot_retorno+="$LINE\n" - msj_fun - } -} - -addID_reventa () { -bot_retorno=" -----🫥 FUNCION EN ESTADO BETA 🫥 ------\n" -bot_retorno+=" $LINE\n" -bot_retorno+=" ID ${ids} VALIDO HASTA $(cat /etc/ADM-db/User-ID | 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+="$LINE\n" -bot_retorno+=" EL ADMIN PRINCIPAL, PODRA CONTROLAR \n" -bot_retorno+=" ESTAS AUTORIZACIONES \n" -bot_retorno+="$LINE\n" -bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n" -bot_retorno+="$LINE\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') - valid=$(date '+%C%y-%m-%d' -d " +$idc days") - [[ $(cat ${${CIDRESS}}|grep "$ids" ) = "" ]] && { - echo "/${ids} | $valid" >> ${CID} - bot_retorno=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 @${callback_query_from_username} 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n" - bot_retorno+="$LINE\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+="$LINE" - bot_retorno+=" ✅ ID REGISTRADO ✅\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n" -unset i -for i in $(cat /etc/ADM-db/User-ID | awk '{print $3}'); do -[[ $(date -d $i +%s) -ge $(date -d $(date '+%C%y-%m-%d') +%s) ]] || { -idlog=$(cat /etc/ADM-db/User-ID | grep "$i" | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig') -sed -i "/${idlog}/d" /etc/ADM-db/User-ID - 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 $(cat < /etc/ADM-db/resell)\n" - bot_retor+="$LINE\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+="$LINE\n" -msj_add ${idlog} -} -done - bot_retor=" ✉️ 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 ✉️ \n" - bot_retor+="𝙃𝙤𝙡𝙖 『 ${callback_query_from_first_name} ${callback_query_from_last_name} 』\n" - bot_retor+=" EL ADM $(cat < /etc/ADM-db/resell) 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+=" $LINE\n" - bot_retor+=" CONTACTA ESCRIBE AL ADM $(cat < /etc/ADM-db/resell)\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @drowkid01 " - 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+="$LINE\n" - msj_fun - msj_add ${ids} - upfile_src - } || { - bot_retorno=" -----🫥 ID YA REGISTRADO 🫥 ------\n" - bot_retorno+=" $LINE\n" - bot_retorno+=" ID ${ids} VALIDO HASTA $(cat /etc/ADM-db/User-ID | grep ${ids} | awk '{print $3}')\n" - bot_retorno+=" ❌ NO REGISTRAR DUPLICADOS ❌\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n" - bot_retorno+="$LINE\n" - msj_fun - } -} diff --git a/Code-BOT-Comandos/invalido b/Code-BOT-Comandos/invalido deleted file mode 100755 index 9b966b8..0000000 --- a/Code-BOT-Comandos/invalido +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -invalido_src () { -bot_retorno="$LINE\n" - bot_retorno+="Comando LENIN MORENO ( INVALIDO XD! )\n" - bot_retorno+="$LINE\n" -} diff --git a/Code-BOT-Comandos/kill_drop.sh b/Code-BOT-Comandos/kill_drop.sh deleted file mode 100755 index 6c7d113..0000000 --- a/Code-BOT-Comandos/kill_drop.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# -*- ENCODING: UTF-8 -*- - -CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} -SRC="${CIDdir}/sources" && [[ ! -d ${SRC} ]] && mkdir ${SRC} -CID="${CIDdir}/User-ID" && [[ ! -e ${CID} ]] && echo > ${CID} -keytxt="${CIDdir}/keys" && [[ ! -d ${keytxt} ]] && mkdir ${keytxt} -LINE=" ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" - -# Token del bot -bot_token="$(cat ${CIDdir}/token)" - -msj_add () { -[[ -z $bot_token ]] && exit -ID=$1 && ID="$(echo $ID | awk '{print $1}' | sed -e 's/[^0-9]//ig')" -[[ ${ID} -lt '999' ]] && ID='576145089' -urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage" -#curl -s --max-time 10 -d "chat_id=$ID&disable_web_page_preview=1&text=$(echo -e "$MENSAJE")" $urlBOT &>/dev/null -curl -s -X POST $urlBOT -d chat_id=$ID -d text="$(echo -e "$MENSAJE")" &>/dev/null -} - -#FUNCION DESTRUIR ID -unset i -for i in $(cat /etc/ADM-db/User-ID | awk '{print $3}'); do -[[ "$(date -d $(date '+%C%y-%m-%d') +%s)" -ge "$(date -d $i +%s)" ]] && { -for id in $(cat /etc/ADM-db/User-ID | grep "$i" | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do -sed -i "/${id}/d" /etc/ADM-db/User-ID -echo -e " ID : ${id} REMOVIDO $i en $(date '+%C%y-%m-%d') - $(date +%R) " >> $HOME/killID.log - MENSAJE="•••••••••••••••••📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩•••••••••••••••••\n" - MENSAJE+=" SU MEMBRESIA HA FINALIZADO MEDIANTE KILL-ID\n" - MENSAJE+=" FIN DE CONTRADO : $(date '+%C%y-%m-%d') - $(date +%R) \n" - MENSAJE+=" SI DESEAS APELAR TU CONTRADO, CONTACTA CON $(cat < /etc/ADM-db/resell)\n" - MENSAJE+=" $LINE\n" - MENSAJE+=" ADQUIERE TU MEMBRESIA DESDE @$(ShellBot.username) , DIGITANDO /prices \n" - MENSAJE+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n" - MENSAJE+=" $LINE\n" -msj_add ${id} -done -} -done - -exit diff --git a/Code-BOT-Comandos/link b/Code-BOT-Comandos/link deleted file mode 100755 index f239d09..0000000 --- a/Code-BOT-Comandos/link +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -link_src () { - bot_retorno="$LINE\n" - bot_retorno+=" 🧬🧬 Soporte - OS 🧬🧬 \n Ubuntu 14 - 16 - 18 - 20 (x64)\n Debian 7,8,9,10 (x64) \n 𝙍𝙚𝙘𝙤𝙢𝙚𝙣𝙙𝙖𝙙𝙤 𝙐𝙗𝙪𝙣𝙩𝙪 18.04 \n 🪦 Solicita Creditos de tu KEY 🛡️⚔️\n" - bot_retorno+="Verifica tus Keys, https://t.me/drowkid01_bot Reseller : @drowkid01 \n" - bot_retorno+="$LINE\n" - bot_retorno+="apt update -y; apt upgrade -y; wget -q http://plus.chumogh.xyz/setup; chmod 777 setup; ./setup\n" - bot_retorno+="$LINE\n" - bot_retorno+="$LINE\n" - bot_retorno+=" 🛡️ 𝙸𝚗𝚜𝚝𝚊𝚕𝚊𝚍𝚘𝚛 𝙾𝚏𝚒𝚌𝚒𝚊𝚕 $(cat < /etc/SCRIPT/v-local.log) FOR ARM 🛡️ \n" - bot_retorno+="$LINE\n" - bot_retorno+="apt update -y; apt upgrade -y; wget -q https://raw.githubusercontent.com/drowkid01/ScriptCGH/main/setup; chmod 777 setup; ./setup\n" -msj_fun -} diff --git a/Code-BOT-Comandos/listID b/Code-BOT-Comandos/listID deleted file mode 100755 index 7b3fb44..0000000 --- a/Code-BOT-Comandos/listID +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# -*- ENCODING: UTF-8 -*- - - -listID_GEN () { -unset bot_lin -n=1 -for i in $(cat /etc/ADM-db/User-ID | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do -idlog=$(cat /etc/ADM-db/User-ID | 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" -msj_fun -} - -listID_src () { -lsid=$(cat -n ${CID}) -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 @drowkid01\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 /etc/ADM-db/User-ID | grep ${idchek} )" ]] && { - [[ "$(cat /etc/ADM-db/Admin-ID)" == "${idchek}" ]] && { - cat /var/www/html/drowkid01/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/drowkid01/checkIP.log | wc -l) IP´s CAPTURADAS \n" - bot_retorno+="$LINE\n" - bot_retorno+=" ${lsid}\n" - bot_retorno+="$LINE\n" - } - -} || { -cat /var/www/html/drowkid01/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/drowkid01/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" -} -msj_fun -} - - -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 -} \ No newline at end of file diff --git a/Code-BOT-Comandos/menu b/Code-BOT-Comandos/menu deleted file mode 100755 index 197955b..0000000 --- a/Code-BOT-Comandos/menu +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -unset checkPID_GEN -checkPID_GEN=$(ps x|grep -v grep|grep "8888") -[[ ! $checkPID_GEN ]] && PID_GEN='(💔) OFF' || PID_GEN='(💚) ON' -[[ -e /etc/systemd/system/btkill.service ]] && kkid="✅" || kkid="❌" - -menu_src () { -#namcli=$(bash /etc/ADM-db/BotGen.sh | grep message_from_first_name | grep message_from_first_name | grep -i message_from_first_name | awk {'print $4'}) -#${message_text[$usuario]} $message_from_first_name $message_from_last_name -[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username} -bot_retorno=" 🎊 MENU PRINCIPAL DE drowkid01|ADM $(cat < /etc/SCRIPT/v-local.log) 🎊\n" - if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then - if [[ $(cat ${CID}|grep "${chatuser}") = "" ]]; then - [[ -e /root/RegBOT/banID ]] && idBAN=$(cat /root/RegBOT/banID) || idBAN="" - #[[ -z "$(echo $idBAN | grep "${chatuser")" ]] && { - bot_retorno+="$LINE\n" - #bot_retorno+="𝙃𝙤𝙡𝙖 ( $message_from_first_name $message_from_last_name ), 𝘽𝙞𝙚𝙣𝙫𝙚𝙣𝙞𝙙𝙤 𝙖𝙡 𝙈𝙚𝙣𝙪" - bot_retorno+="$LINE\n" - bot_retorno+=" ⚠️ AUN NO ESTAS AUTORIZADO 🚫" - bot_retorno+="$LINE\n" - bot_retorno+=" HOLA @${nUSER} SU ID NO ESTA VERIFICADO \n" - bot_retorno+="$LINE\n" - bot_retorno+="/ID ► MUESTRA TU ID PERSONAL 📍\n" - bot_retorno+="/menu | MENU DE COMANDOS\n" - bot_retorno+="/ayuda | INSTRUCCIONES DE COMANDOS\n" - bot_retorno+="/price | PRECIOS DE ACCESO MEMBRESIAS\n" - bot_retorno+="/chekid | VERIFICAR ID LUEGO DE PAGO\n" - bot_retorno+="$LINE\n" - bot_retorno+=" ADQUIERE UNA MENBRESIA O DIJITA /prices \n O CONTACTAME $(cat < /etc/ADM-db/resell)\n" - bot_retorno+="$LINE\n" - menu_printSN - # } || { - # bot_retorno+="$LINE\n" - # bot_retorno+=" 🚫🚫️ SU ID FUE BANEADO 🚫🚫 \n" - # bot_retorno+="$LINE\n" - # menu_printSN - # } - #msj_fun - else - [[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")" - numkey_used=$(grep -o -i $message_chat_id /etc/gerar-sh-log | wc -l) - numkey_gen=$(grep -o -i $message_chat_id /etc/ADM-db/num-key.cont | wc -l) - data_user=$(cat ${CID}|grep "${chatuser}" | awk -F "|" '{print $2}') - data_sec=$(date +%s) - data_user_sec=$(date +%s --date="$data_user") - variavel_soma=$(($data_user_sec - $data_sec)) - dias_use=$(($variavel_soma / 86400)) - [[ "$dias_use" -le 0 ]] && dias_use=0 || dias_use=$(($dias_use + 1)) - bot_retorno+="$LINE\n" - bot_retorno+=" ⚠️ ACCESO ILIMITADO POR『 $dias_use 』DIAS ⚠️ \n ✓ INCLUIDO TU RESELLER EN LA KEY ✔" - bot_retorno+=" ✩ ID AUTORIZADO HASTA EL $data_user | $(date +%R) ⌚\n" - [[ -z $checkPID_GEN ]] && bot_retorno+=" ⚠️ ADVERTENCIA!! BotGen ⚠️\n" || bot_retorno+=" ✩ BotGen FUNCIONANDO ONLINE 🔥\n" - [[ -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_retorno+="$LINE\n" - bot_retorno+=" RESELLER ACTUAL : ${firsnme} ${lastnme}\n" - bot_retorno+="$LINE\n" - bot_retorno+="/menu ► MENU DE ACCIONES PERMITIDAD | \n" - bot_retorno+="/hack ► HACKEAR LA NASA :v \n" - bot_retorno+="/rvntas ► AGREGAR REVENDEDOR \n" - bot_retorno+="/instal ► LINK DE SCRIPT |\n" - bot_retorno+="/keygen ► COMANDO DE GENERAR KEY |\n" - bot_retorno+="/ayuda ► Ayuda/Instrucciones del BOT |\n" - bot_retorno+=" ❊ 𝚁𝚎𝚌𝚞𝚎𝚛𝚍𝚊 𝙲𝚘𝚕𝚊𝚋𝚘𝚛𝚊𝚛 💸💰 , 𝚜𝚒 𝚝𝚎 𝚊𝚐𝚛𝚊𝚍𝚘 𝚖𝚒 𝚃𝚛𝚊𝚋𝚊𝚓𝚘 ❊\n" - bot_retorno+="Si tienes inconvenientes con el Bot 🎁 Contactame : +$(cat < /etc/numctc) 📲\n" - bot_retorno+=" 🔐 『 $numkey_used 』𝙆𝙚𝙮𝙨 𝙐𝙨𝙖𝙙𝙖𝙨 🔓,『 $numkey_gen 』𝙆𝙚𝙮𝙨 𝙂𝙚𝙣𝙚𝙧𝙖𝙙𝙖𝙨 🗝️ \n" - bot_retorno+="$LINE\n" - menu_print - fi - - else - unset usadas - usadas="$(cat /etc/http-instas)" - [[ ! $usadas ]] && k_used="0" || k_used="$usadas" - bot_retorno+="Gen $PID_GEN | Keys Used [$k_used]\n" - bot_retorno+="$LINE\n" - bot_retorno+="/infosys ➩ INFORMACION DEL VPS \n" - bot_retorno+="/killid ➩ LIMITADOR DE CADUCIDAD ${kkid}\n" - bot_retorno+="/idgen ➩ LISTA DE ID + GENERADAS\n" - bot_retorno+="/chat ➩ CHATEAR CON EL BOT\n" - bot_retorno+="/buscar ➩ BUSCAR ID AUTORIZADO\n" - bot_retorno+="/instal ➩ INSTALADOR OFICIAL \n" - bot_retorno+="/hack ➩ HACKEAR LA NASA :v \n" - bot_retorno+="/addrev ➩ AGREGAR REVENDEDOR \n" - bot_retorno+="/ayuda ➩ INSTRUCCIONES DE COMANDOS \n" - bot_retorno+="/cache ➩ OPTIMIZA SERVIDOR \n" - bot_retorno+="/update ➩ ACTUALIZA FILES BotGen \n" - bot_retorno+="/reboot ➩ REINICIA SERVIDOR VPS \n" - bot_retorno+="/price ➩ PRECIOS DE ACCESO MEMBRESIAS\n" - bot_retorno+="/donar ➩ ACTIVA O DESACTIVA EL MENSAJE DONATIVO \n" - bot_retorno+="$LINE\n" - menu_print - fi -} diff --git a/Code-BOT-Comandos/myip b/Code-BOT-Comandos/myip deleted file mode 100755 index a874033..0000000 --- a/Code-BOT-Comandos/myip +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -meu_ip_fun () { -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" -} - -meu_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" ]] && echo "$MIP2" || echo "$MIP" -} diff --git a/Code-BOT-Comandos/power b/Code-BOT-Comandos/power deleted file mode 100755 index 9efdeb9..0000000 --- a/Code-BOT-Comandos/power +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -start_gen () { -MSG_id=$((${message_message_id} + 1 )) -unset PIDGEN -PIDGEN=$(ps aux|grep -v grep|grep "http-server.sh") -if [[ ! $PIDGEN ]]; then -screen -dmS generador /bin/http-server.sh -start - local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" - bot_retorno+="$LINE\n" - bot_retorno+=" Generador: Online ✅\n" - bot_retorno+="$LINE\n" -msj_fun -else -killall http-server.sh - local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" - bot_retorno+="$LINE\n" - bot_retorno+=" Generador: ⚠️ Offline ❌\n" - bot_retorno+="$LINE\n" -msj_fun -fi -sleep 5s -msj_del ${message_message_id} -msj_del ${MSG_id} -} - -files_script() { -MSG_id=$((${message_message_id} + 1 )) -#echo '#!/bin/bash -local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n" -bot_retorno+="$LINE\n" -wget -q -O $HOME/lista https://www.dropbox.com/s/yqhjmr7o3342viv/lista?dl=0 -o /dev/null -rm -f /etc/SCRIPT/* -cd /etc/SCRIPT -wget --no-check-certificate -i $HOME/lista -o || echo " error!" -rm -f $HOME/lista* -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 5s -msj_del ${message_message_id} -msj_del ${MSG_id} -} diff --git a/Code-BOT-Comandos/reinicio b/Code-BOT-Comandos/reinicio deleted file mode 100755 index 38673b0..0000000 --- a/Code-BOT-Comandos/reinicio +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -reboot_src () { -bot_retorno="$LINE\n" - bot_retorno+="Reiniciando servidor VPS\n" - bot_retorno+="$LINE\n" -msj_fun -sleep 2 -sudo reboot -} diff --git a/Code-BOT-Comandos/status b/Code-BOT-Comandos/status deleted file mode 100755 index f052afd..0000000 --- a/Code-BOT-Comandos/status +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -infosys_src () { - -#HORA Y FECHA -unset _hora -unset _fecha -_hora=$(printf '%(%H:%M:%S)T') -_fecha=$(printf '%(%D)T') - -#PROCESSADOR -unset _core -unset _usop -_core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)") -_usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')") - -#MEMORIA RAM -unset ram1 -unset ram2 -unset ram3 -ram1=$(free -h | grep -i mem | awk {'print $2'}) -ram2=$(free -h | grep -i mem | awk {'print $4'}) -ram3=$(free -h | grep -i mem | awk {'print $3'}) - -unset _ram -unset _usor -_ram=$(printf ' %-9s' "$(free -h | grep -i mem | awk {'print $2'})") -_usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')") - -unset os_sys -os_sys=$(echo $(cat -n /etc/issue |grep 1 |cut -d' ' -f6,7,8 |sed 's/1//' |sed 's/ //')) && echo $system|awk '{print $1, $2}' - -bot_retorno="$LINE\n" - bot_retorno+="S.O: $os_sys\n" - bot_retorno+="Su IP es: $(meu_ip)\n" - bot_retorno+="$LINE\n" - bot_retorno+="Ram: $ram1 || En Uso: $_usor\n" - bot_retorno+="USADA: $ram3 || LIBRE: $ram2\n" - bot_retorno+="$LINE\n" - bot_retorno+="CPU: $_core || En Uso: $_usop\n" - bot_retorno+="$LINE\n" - bot_retorno+="FECHA: $_fecha\n" - bot_retorno+="HORA: $_hora\n" - bot_retorno+="$LINE\n" -msj_fun -} diff --git a/Code-BOT-Comandos/update b/Code-BOT-Comandos/update deleted file mode 100755 index e7da76f..0000000 --- a/Code-BOT-Comandos/update +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -dupdate2 (){ -rm -rf /etc/ADM-db/* -rm -rf /etc/SCRIPT/* -} - -update () { -#[[ -e /etc/nivbot ]] || echo "0" > /etc/nivbot -#[[ -d /etc/ADM-db ]] && chmod +x /etc/ADM-db/* -#echo -ne "\033[1;31m[ ! ] RESPALDANDO USUARIO ADMINISTRADOR " -#( -#[[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes $HOME/costes -#[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token $HOME/token -#[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID $HOME/Admin-ID -#[[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID $HOME/User-ID -#[[ -e /etc/ADM-db/limit ]] && mv /etc/ADM-db/limit $HOME/limit -#[[ -e /etc/ADM-db/resell ]] && mv /etc/ADM-db/resell $HOME/resell -#[[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress $HOME/ress -#[[ -e /etc/ADM-db/num-key.cont ]] && mv /etc/ADM-db/num-key.cont $HOME/num-key.cont -#) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]" -#rm -rf /etc/ADM-db -#CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} -#[[ ! -e "${CIDdir}/confbot.sh" ]] && wget --no-check-certificate -O ${CIDdir}/confbot.sh https://www.dropbox.com/s/9q5o523m1ns8vkd/confbot-t.sh &> /dev/null && chmod +x ${CIDdir}/confbot.sh -#sed -i -e 's/\r$//' ${CIDdir}/confbot.sh -#echo $id > /etc/ADM-db/idioma_menuinst -#source ${CIDdir}/confbot.sh -#bot_conf -files_script -} diff --git a/Code-BOT-General/intBOT.sh b/Code-BOT-General/intBOT.sh deleted file mode 100755 index fee7f0d..0000000 --- a/Code-BOT-General/intBOT.sh +++ /dev/null @@ -1,576 +0,0 @@ -#!/bin/bash -[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg) -bar="$(msg -bar3)" -[[ -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" -echo "$IP" > /usr/bin/vendor_code -} -function_verify () { -unset keybot -echo -e "\033[7;49;35m =====>>►► 🐲 GEN drowkid01${TTcent}VPS 🐲 ◄◄<<===== \033[0m" -msg -bar -[[ "$(echo "$(cat < /etc/nivbot)")" -ge "5" ]] && { -[[ -e /bin/downloadbot ]] && { -[[ -z $(cat < /bin/downloadbot) ]] && read -p " Ingresa tu Key de Autorizacion : " keybot || unset keybot -} || read -p " Key de Autorizacion : " keybot -} || read -p " Key de Autorizacion : " keybot -[[ -z $keybot ]] && { -rm -f /bin/downloadbot -[[ -e /bin/downloadbot ]] && link="$(cat < /bin/downloadbot)" || link='https://raw.githubusercontent.com' -permited=$(curl -sSL "${link}/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot") -} || { -permited=$(curl -sSL "${link}/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot") -} - [[ $(echo $permited|grep "${IP}") = "" ]] || { - clear - echo -e "\n\n\n\e[31m=====================================================" - 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 @drowkid01" - echo -e "\e[31m=====================================================\n\n\n\e[0m" - [[ -e "/bin/ShellBot.sh" ]] && rm -f /bin/ShellBot.sh - exit 1 - } && { - ### INTALAR VERCION DE SCRIPT - 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 @drowkid01" - echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01" - echo -e "\e[32m=====================================================\n\n\n\e[0m" - CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} - [[ -e /etc/nivbot ]] && { - i=$(cat < /etc/nivbot) - lv=$(($i+1)) - echo $lv > /etc/nivbot - } || echo "1" > /etc/nivbot - v1=$(curl -sSL "https://www.dropbox.com/s/8tizr516cvkwss6/v-new.log") - echo "$v1" > /etc/ADM-db/vercion - } -} - -edit_cost () { -msg -bar -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 -bar -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 -} - -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/@drowkid01/ \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/drowkid01 \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 -bar - echo -ne "\033[1;97m Poner en linea KILL ID [s/n]: " - read bot_ini - msg -bar -[[ $bot_ini = @(s|S|y|Y) ]] && { - - echo -e "[Unit] -Description=BotGen Service by @drowkid01 -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 -bar - echo -e "\033[1;31m Bot ID KILL ACTIVADO" - msg -bar - } -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 -bar -echo -e "\033[1;31m Bot ID KILL fuera de linea" -msg -bar -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 -bar -echo -e "\033[1;33mDescargando archivos... ESPERE " -msg -bar -mkdir -p /root/update &>/dev/null -wget -q --no-check-certificate -O $HOME/files.tar https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Code-BOT-Comandos/files.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 -echo -ne "\033[1;33mFichero \033[1;31m[${n}.bot] " -[[ -e $HOME/update/$arqx ]] && veryfy_fun $arqx -n=$(($n + 1)) -done -cd $HOME && rm -rf $HOME/update && rm -f $HOME/files.tar -echo -ne "\033[1;31m[ ! ] RESTAUDANDO ADMINISTRADOR " -( -[[ -e $HOME/costes ]] && mv $HOME/costes /etc/ADM-db/sources/costes -[[ -e $HOME/token ]] && mv $HOME/token /etc/ADM-db/token -[[ -e $HOME/resell ]] && mv $HOME/resell /etc/ADM-db/resell -[[ -e $HOME/Admin-ID ]] && mv $HOME/Admin-ID /etc/ADM-db/Admin-ID -[[ -e $HOME/User-ID ]] && mv $HOME/User-ID /etc/ADM-db/User-ID -[[ -e $HOME/ress ]] && mv $HOME/ress /etc/ADM-db/ress -[[ -e $HOME/limit ]] && mv $HOME/limit /etc/ADM-db/limit -[[ -e $HOME/num-key.cont ]] && mv $HOME/num-key.cont /etc/ADM-db/num-key.cont -) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]" -[[ ! -e ${CIDdir}/resell ]] && echo "@drowkid01" > ${CIDdir}/resell -[[ ! -e $(cat < /etc/mpayu) ]] && echo "Paypal : chumogh@outlook.com" > /etc/mpayu && echo "593987072611" > /etc/numctc - rm $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 @drowkid01 -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -User=root -WorkingDirectory=/root -ExecStart=/bin/bash ${CIDdir}/BotGen.sh -start -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 -bar -echo -e "\033[1;31m BotGen fuera de linea" -msg -bar -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 -} - -bot_conf () { -[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token /root/token -[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID /root/Admin-ID -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 - } || { - 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...!" - 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/drowkid01/drowkid01-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 @drowkid01" #-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 () { -echo "Respaldando TOKEN y ADMINISTRADOR" -[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token /root/token -[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID /root/Admin-ID -[[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID /root/User-ID -[[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress /root/ress -[[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes /root/costes -[[ $(cat < /etc/ADM-db/resell) != "@drowkid01" ]] && mv /etc/ADM-db/resell /root/resell -rm -rf /etc/ADM-db/sources/gerar_key && 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 -} - - -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}/ress ]] && rfij="\033[1;32mRESELLER FIJO (Bot Personal )" || rfij="\033[1;31mRESELLER ALEATORIO ( Bot Custom )" -limcont=$(cat /etc/ADM-db/limit) -[[ "${limcont}" = "999" ]] && limted=" ∞ " || limted=$(cat /etc/ADM-db/limit) -msg -bar -echo -e " \033[7;49;35m ${TTini} 🐲 BotGEN drowkid01${TTcent}ADM $(cat ${CIDdir}/vercion) 🐲 ◄◄<=== \033[0m" -msg -bar -echo -e " - LIMITADOR \033[1;32m ( $limted ) \033[1;37m KILL ID VENCIDOS ${PID_kill} " -msg -bar -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 DE USUARIO TELEGRAM $adid" -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" -echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;35m> \033[1;37m MSG POR ID" -echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;35m> \033[1;37m Modificar COSTES DEL BOT" -msg -bar -echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR" -msg -bar -selection=$(selection_fun 11) -case ${selection} in -0) gerar && exit ;; -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)msj_ind;; -11)edit_cost;; -*) bot_gen;; -esac -} diff --git a/Instalador/install.sh b/Instalador/install.sh deleted file mode 100644 index 257323e..0000000 --- a/Instalador/install.sh +++ /dev/null @@ -1,471 +0,0 @@ -##!/bin/bashlink -#Instalador del BOT -coo=1 -IVAR="/etc/http-instas" -SCPT_DIR="/etc/SCRIPT" -rm -f gera* -source <(curl -sSL https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg) >/dev/null -#!/bin/bash - -# menu maker (opciones 1, 2, 3,.....) - -flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•' -cOpyRig='©' && mbar2=' •••••••••••••••••••••••' - -menu_func() { - local options=${#@} - local array - for ((num = 1; num <= $options; num++)); do - echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") " - array=(${!num}) - case ${array[0]} in - "-vd") echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}" ;; - "-vm") echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}" ;; - "-fi") echo -e "${array[@]:2} ${array[1]}" ;; - -bar | -bar2 | -bar3 | -bar4) echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})" ;; - *) echo -e "\033[1;37m${array[@]}" ;; - esac - done -} - -selection_fun() { - local selection="null" - local range - for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done - while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do - echo -ne "\033[1;37m ► Opcion : " >&2 - read selection - tput cuu1 >&2 && tput dl1 >&2 - done - echo $selection -} - -tittle() { - [[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh' - clear && clear - msg -bar - echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]" - msg -bar -} -in_opcion() { - unset opcion - if [[ -z $2 ]]; then - msg -nazu " $1: " >&2 - else - msg $1 " $2: " >&2 - fi - read opcion - echo "$opcion" -} -# centrado de texto -print_center() { - if [[ -z $2 ]]; then - text="$1" - else - col="$1" - text="$2" - fi - - while read line; do - unset space - x=$(((54 - ${#line}) / 2)) - for ((i = 0; i < $x; i++)); do - space+=' ' - done - space+="$line" - if [[ -z $2 ]]; then - msg -azu "$space" - else - msg "$col" "$space" - fi - done <<<$(echo -e "$text") -} -# titulos y encabesados -title() { - clear - msg -bar - if [[ -z $2 ]]; then - print_center -azu "$1" - else - print_center "$1" "$2" - fi - msg -bar -} - -# finalizacion de tareas -enter() { - msg -bar - text="►► Presione enter para continuar ◄◄" - if [[ -z $1 ]]; then - print_center -ama "$text" - else - print_center "$1" "$text" - fi - read -} - -# opcion, regresar volver/atras -back() { - msg -bar - echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER" - msg -bar -} - -msg() { - local colors="/etc/new-adm-color" - if [[ ! -e $colors ]]; then - COLOR[0]='\033[1;37m' #BRAN='\033[1;37m' - COLOR[1]='\e[31m' #VERMELHO='\e[31m' - COLOR[2]='\e[32m' #VERDE='\e[32m' - COLOR[3]='\e[33m' #AMARELO='\e[33m' - COLOR[4]='\e[34m' #AZUL='\e[34m' - COLOR[5]='\e[35m' #MAGENTA='\e[35m' - COLOR[6]='\033[1;97m' #MAG='\033[1;36m' - COLOR[7]='\033[1;49;95m' - COLOR[8]='\033[1;49;96m' - else - local COL=0 - for number in $(cat $colors); do - case $number in - 1) COLOR[$COL]='\033[1;37m' ;; - 2) COLOR[$COL]='\e[31m' ;; - 3) COLOR[$COL]='\e[32m' ;; - 4) COLOR[$COL]='\e[33m' ;; - 5) COLOR[$COL]='\e[34m' ;; - 6) COLOR[$COL]='\e[35m' ;; - 7) COLOR[$COL]='\033[1;36m' ;; - 8) COLOR[$COL]='\033[1;49;95m' ;; - 9) COLOR[$COL]='\033[1;49;96m' ;; - esac - let COL++ - done - fi - NEGRITO='\e[1m' - SEMCOR='\e[0m' - case $1 in - -ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -aqua) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -bra) cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}" ;; - -nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -nverd) cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -verm3) cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -teal2) cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blak2) cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}" ;; - #-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar1) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar2) ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar3) ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar4) ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - esac -} - -fun_bar() { - comando[0]="$1" - comando[1]="$2" - ( - [[ -e $HOME/fim ]] && rm $HOME/fim - ${comando[0]} -y >/dev/null 2>&1 - ${comando[1]} -y >/dev/null 2>&1 - touch $HOME/fim - ) >/dev/null 2>&1 & - echo -ne "\033[1;33m [" - while true; do - for ((i = 0; i < 18; i++)); do - echo -ne "\033[1;31m##" - sleep 0.1s - done - [[ -e $HOME/fim ]] && rm $HOME/fim && break - echo -e "\033[1;33m]" - sleep 1s - tput cuu1 - tput dl1 - echo -ne "\033[1;33m [" - done - echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m" -} - -del() { - for ((i = 0; i < $1; i++)); do - tput cuu1 && tput dl1 - done -} - -[[ -d /bin/ejecutar ]] && { - [[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg -} || mkdir /bin/ejecutar -cor[0]="\033[0m" -cor[1]="\033[1;34m" -cor[2]="\033[1;32m" -cor[3]="\033[1;37m" -cor[4]="\033[1;36m" -cor[5]="\033[1;33m" -cor[6]="\033[1;35m" -export -f msg -export -f fun_bar -export -f tittle -export -f enter -export -f back -export -f print_center -export -f in_opcion -export -f del - -add-apt-repository universe -apt update -y -apt upgrade -y - -install_ini() { - clear - 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 "apache2" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null - [[ $(dpkg --get-selections | grep -w "apache2" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null - echo -e "\033[97m # apt-get install apache2.............. $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 install 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 " - #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 Reintentar Install Paquetes [ 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" - echo "$IP" >/usr/bin/vendor_code -} -function_verify() { - unset keybot - msg -bar - [[ ! -e /etc/nivbot ]] && echo >/etc/nivbot - echo -e "\e[31m BOTGEN LIBRE TE LO VENDIERON ?\e[32m" - [[ "$(echo "$(cat /bin/downloadbot || echo -e "$(ofus $keybot)" >/bin/downloadbot - } - permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/Control-Bot") - [[ $(echo $permited | grep "${IP}") = "" ]] || { - clear - msg -bar - echo -e "\n" - 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 @drowkid01" - msg -bar - [[ -e "/bin/ShellBot.sh" ]] && rm /bin/ShellBot.sh - [[ -e /bin/downloadbot ]] && rm -f /bin/downloadbot - echo -e "\n" - msg -bar - exit 1 - } && { - ### INTALAR VERCION DE SCRIPT - clear && clear - msg -bar - echo -e "\e[32m LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!" - [[ -e /usr/bin/downBase ]] || echo 'https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/lista' >/usr/bin/downBase && chmod 777 /usr/bin/downBase - v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/v-local.log") - [[ ! -e /bin/downloadbot ]] && { - [[ $link = 'https://raw.githubusercontent.com' ]] && echo "https://raw.githubusercontent.com" >/bin/downloadbot || echo "$(ofus $keybot)" >/bin/downloadbot - chmod +x /bin/downloadbot - } - [[ -e /etc/nivbot ]] && { - i=$(cat /etc/nivbot - } || echo "1" >/etc/nivbot - echo $Key >/etc/valkey && chmod +x /etc/valkey - [[ -e /usr/bin/downBase ]] || echo 'https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/lista' >/usr/bin/downBase && chmod 777 /usr/bin/downBase - [[ -e /bin/ShellBot.sh ]] && wget -O /bin/ShellBot.sh https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/ShellBot.sh >/dev/null && chmod +rwx /bin/ShellBot.sh - - sleep 3s - } - -} - -echo '0' >/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 - -#COMPARA -fun_filez() { - fup="$HOME/update" - echo "$1" >>$HOME/files.log - - wget -O /bin/http-server.sh https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Bot/http-server.py && chmod +x /bin/http-server.sh - [[ -e $1 ]] && mv -f ${fup}/$1 /etc/SCRIPT/$1 -} - -ofus() { - unset txtofus - number=$(expr length $1) - for ((i = 1; i < $number + 1; i++)); do - txt[$i]=$(echo "$1" | cut -b $i) - case ${txt[$i]} in - ".") txt[$i]="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 -} - -DOWS() { - wget -O /root/lista https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/lista - wget --no-check-certificate -i $HOME/lista -} - -function aguarde() { - sleep 1 - fun_ejec=$1 - helice() { - DOWS >/dev/null 2>&1 & - tput civis - while [ -d /proc/$! ]; do - for i in / - \\ \|; do - sleep .1 - echo -ne "\e[1D$i" - done - done - tput cnorm - } - echo -ne "\033[1;37m TRASLADANDO FILES \033[1;32mSCRIPT \033[1;37me \033[1;32mAUTOGEN\033[1;32m.\033[1;33m.\033[1;31m. \033[1;33m" - helice - echo -e "\e[1D REALIZADO" -} - -atualiza_fun() { - msg -bar - [[ -d ./update ]] && rm -rf ./update/* || mkdir ./update - cd ./update/ - aguarde - unset arqs - n=1 - rm -f $HOME/files.log - for arqs in $(ls $HOME/update); do - echo -ne "\033[1;33m FILE \e[32m [${n}.gen] \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 - mkdir -p /etc/SCRIPT - mv -f /root/update/* /etc/SCRIPT/ - wget -q -O /usr/bin/gerar https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Menu-Bash/gerador.sh && chmod +rwx /usr/bin/gerar - cd $HOME - msg -bar - echo -e "\033[1;92m DIGITE EL COMANDO: \033[1;33mgerar " - msg -bar - [[ -e $HOME/lista ]] && rm $HOME/lista - [[ -d $HOME/update ]] && rm -rf $HOME/update -} - -unset Key -[[ $1 = '--install' ]] && install_ini -[[ $1 = '' ]] && clear && echo " DESTRUYENDO FICHERO rm -rf /bin " && exit -clear -check_ip -#function_verify -atualiza_fun diff --git a/Menu-Bash/gerador.sh b/Menu-Bash/gerador.sh deleted file mode 100755 index 0580c6c..0000000 --- a/Menu-Bash/gerador.sh +++ /dev/null @@ -1,866 +0,0 @@ -#!/bin/bash -clear -unset readvalue -[[ ! -d /etc/http-shell ]] && mkdir /etc/http-shell -[[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads ssl paysnd.sh verifica PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py" -IVAR="/etc/http-instas" -source <(curl -sSL https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg) >/dev/null -#!/bin/bash -# menu maker (opciones 1, 2, 3,.....) -flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && cG='/c' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && _kl1='ghkey' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && kL10='tc' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && am1='/e' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•' nib="${am1}${kL10}" -cOpyRig='©' && mbar2=' •••••••••••••••••••••••' - -menu_func() { - local options=${#@} - local array - for ((num = 1; num <= $options; num++)); do - echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") " - array=(${!num}) - case ${array[0]} in - "-vd") echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}" ;; - "-vm") echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}" ;; - "-fi") echo -e "${array[@]:2} ${array[1]}" ;; - -bar | -bar2 | -bar3 | -bar4) echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})" ;; - *) echo -e "\033[1;37m${array[@]}" ;; - esac - done -} - -selection_fun() { - local selection="null" - local range - for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done - while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do - echo -ne "\033[1;37m ► Opcion : " >&2 - read selection - tput cuu1 >&2 && tput dl1 >&2 - done - echo $selection -} - -tittle() { - [[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh' - clear && clear - msg -bar - echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]" - msg -bar -} -in_opcion() { - unset opcion - if [[ -z $2 ]]; then - msg -nazu " $1: " >&2 - else - msg $1 " $2: " >&2 - fi - read opcion - echo "$opcion" -} -# centrado de texto -print_center() { - if [[ -z $2 ]]; then - text="$1" - else - col="$1" - text="$2" - fi - - while read line; do - unset space - x=$(((54 - ${#line}) / 2)) - for ((i = 0; i < $x; i++)); do - space+=' ' - done - space+="$line" - if [[ -z $2 ]]; then - msg -azu "$space" - else - msg "$col" "$space" - fi - done <<<$(echo -e "$text") -} -# titulos y encabesados -title() { - clear - msg -bar - if [[ -z $2 ]]; then - print_center -azu "$1" - else - print_center "$1" "$2" - fi - msg -bar -} - -# finalizacion de tareas -enter() { - msg -bar - text="►► Presione enter para continuar ◄◄" - if [[ -z $1 ]]; then - print_center -ama "$text" - else - print_center "$1" "$text" - fi - read -} - -# opcion, regresar volver/atras -back() { - msg -bar - echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER" - msg -bar -} - -msg() { - local colors="/etc/new-adm-color" - if [[ ! -e $colors ]]; then - COLOR[0]='\033[1;37m' #BRAN='\033[1;37m' - COLOR[1]='\e[31m' #VERMELHO='\e[31m' - COLOR[2]='\e[32m' #VERDE='\e[32m' - COLOR[3]='\e[33m' #AMARELO='\e[33m' - COLOR[4]='\e[34m' #AZUL='\e[34m' - COLOR[5]='\e[35m' #MAGENTA='\e[35m' - COLOR[6]='\033[1;97m' #MAG='\033[1;36m' - COLOR[7]='\033[1;49;95m' - COLOR[8]='\033[1;49;96m' - else - local COL=0 - for number in $(cat $colors); do - case $number in - 1) COLOR[$COL]='\033[1;37m' ;; - 2) COLOR[$COL]='\e[31m' ;; - 3) COLOR[$COL]='\e[32m' ;; - 4) COLOR[$COL]='\e[33m' ;; - 5) COLOR[$COL]='\e[34m' ;; - 6) COLOR[$COL]='\e[35m' ;; - 7) COLOR[$COL]='\033[1;36m' ;; - 8) COLOR[$COL]='\033[1;49;95m' ;; - 9) COLOR[$COL]='\033[1;49;96m' ;; - esac - let COL++ - done - fi - NEGRITO='\e[1m' - SEMCOR='\e[0m' - case $1 in - -ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -aqua) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -bra) cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}" ;; - -nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -nverd) cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;; - -verm3) cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -teal2) cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blak2) cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;; - -blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}" ;; - #-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar1) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar2) ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar3) ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - -bar4) ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;; - esac -} - -fun_bar() { - comando[0]="$1" - comando[1]="$2" - ( - [[ -e $HOME/fim ]] && rm $HOME/fim - ${comando[0]} -y >/dev/null 2>&1 - ${comando[1]} -y >/dev/null 2>&1 - touch $HOME/fim - ) >/dev/null 2>&1 & - echo -ne "\033[1;33m [" - while true; do - for ((i = 0; i < 18; i++)); do - echo -ne "\033[1;31m##" - sleep 0.1s - done - [[ -e $HOME/fim ]] && rm $HOME/fim && break - echo -e "\033[1;33m]" - sleep 1s - tput cuu1 - tput dl1 - echo -ne "\033[1;33m [" - done - echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m" -} - -del() { - for ((i = 0; i < $1; i++)); do - tput cuu1 && tput dl1 - done -} - -[[ -d /bin/ejecutar ]] && { - [[ ! -e /etc/cghkey ]] && rm -rf /etc/adm-lite - [[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg -} || mkdir /bin/ejecutar -cor[0]="\033[0m" -cor[1]="\033[1;34m" -cor[2]="\033[1;32m" -cor[3]="\033[1;37m" -cor[4]="\033[1;36m" -cor[5]="\033[1;33m" -cor[6]="\033[1;35m" -export -f msg -export -f fun_bar -export -f tittle -export -f enter -export -f back -export -f print_center -export -f in_opcion -export -f del - -tittle() { - killall kswapd0 ksoftirqd >/dev/null 2>&1 - clear && clear - msg -bar - echo -e " \033[7;49;35m${TTini} GEN drowkid01${TTcent}VPS ${TTfin} \033[0m" -} - -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" - echo "$IP" >/usr/bin/vendor_code -} - -####inicio puertos -ports_() { - unset porta - _core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)") - _usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')") - ## - ram1=$(free -h | grep -i mem | awk {'print $2'}) - ram2=$(free -h | grep -i mem | awk {'print $4'}) - ram3=$(free -h | grep -i mem | awk {'print $3'}) - ## - _ram=$(printf ' %-9s' "$(free -h | grep -i mem | awk {'print $2'})") - _usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')") - _core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)") - _usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')") - - mt=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f2) - mb=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f6) - ml=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f7) - pp=$(cat /proc/cpuinfo | grep "model name" | uniq | awk -F ":" '{print $2}') - csss=$(cat /proc/cpuinfo | grep processor | wc -l) - usoo=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}') - CPU=$(echo $usoo | awk '{printf("%d\n",$1 + 0.5)}') - PID_GEN1=$(ps x | grep -v grep | grep "8888") - [[ ! $PID_GEN1 ]] && PID_GEN1="\033[0;31m[\033[0;35mCOLAPZADO\033[0;31m]" || PID_GEN1="\033[0;35m[\033[0;36mFUNCIONANDO\033[0;31m]" - porta=$(if netstat -tunlp | grep nc.tradit 1>/dev/null 2>/dev/null; then - echo -e "\033[0;36m Keygen: \033[0;31m[\033[0;32m ON \033[0;31m]" - else - echo -e "\033[0;36m Keygen: \033[0;35m[\033[0;31m OFF \033[0;35m]" - fi) - [[ $v1 = $v2 ]] && vesaoSCT="\033[1;32m${txt[315]} \033[0;33m ($v2)" || vesaoSCT="\033[1;31m${txt[316]}\033[0;33m($v2) �72 \033[1;32m($v1)\033[1;31m" - echo -e " ${cor[2]} ${vesaoSCT} ${cor[0]}" - msg -bar - echo -e "\033[1;34m ${TOP}\033[1;31m TOTAL:\033[1;32m "$mt "\033[1;34m ${TOP} \033[1;31m Libre:\033[1;32m "$ram2 "\033[1;34m ${TOP} \033[1;31m Usada:\033[1;32m"$ram3 - echo -e "\033[1;34m ${TOP}\033[1;31m Uso RAM: \033[1;32m"$_usor "\033[1;34m${TOP}\033[1;31m Uso CPU: \033[1;32m$_usop \033[1;34m ${TOP}\033[1;31m Cache:\033[1;32m"$mb # $CPU"%" - msg -bar - echo -e "\033[0;31mSystem:\033[0;32m$(cat /etc/issue.net) \033[0;31mIP:\033[0;32m $(wget -qO- ipv4.icanhazip.com)" - msg -bar - echo "" - echo -ne "$(msg -verd " Keys Usadas") $(msg -azu " : ") " && msg -bra "\033[1;41m $(cat $IVAR) $porta" - echo "" -} - -SCPT_DIR="/etc/SCRIPT" -[[ ! -e ${SCPT_DIR} ]] && mkdir ${SCPT_DIR} -[[ ! -e ${SCPT_DIR} ]] && bash /bin/ejecutar/echo-ram.sh -DIR="/etc/http-shell" -LIST="-SPVweN" -wget -O /bin/ejecutar/v-new.log https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/v-local.log &>/dev/null -v1=$(cat /bin/ejecutar/v-new.log) -v2=$(cat <${SCPT_DIR}/v-local.log) -txt[315]=" ${FlT} drowkid01 Keygen ${FlT} IS UPDATED!" -txt[316]=" ${aLerT} drowkid01 Keygen ${aLerT} NEEDS UPDATE!" - -meu_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" -} - -mudar_instacao() { - while [[ ${var[$value]} != 0 ]]; do - [[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads ssl paysnd.sh verifica PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py" - clear - echo -e $BARRA - echo -e "MENU SSELECCI�N DE INSTALACI�N" - echo -e $BARRA - echo "[0] - FINALIZAR PROCEDIMIENTO" - i=1 - for arqx in $(ls ${SCPT_DIR}); do - [[ $arqx = @(gerar.sh|http-server.py) ]] && continue - [[ $(echo $BASICINST | grep -w "$arqx") ]] && echo "[$i] - [X] - $arqx" || echo "[$i] - [ ] - $arqx" - var[$i]="$arqx" - let i++ - done - echo -ne "Seleccione un archivo [Adicionar/Eliminar]: " - read value - [[ -z ${var[$value]} ]] && return - if [[ $(echo $BASICINST | grep -w "${var[$value]}") ]]; then - rm -f /etc/newadm-instalacao - local BASIC="" - for INSTS in $(echo $BASICINST); do - [[ $INSTS = "${var[$value]}" ]] && continue - BASIC+="$INSTS " - done - echo $BASIC >/etc/newadm-instalacao - else - echo "$BASICINST ${var[$value]}" >/etc/newadm-instalacao - fi - done -} -list_fix() { - rm ${SCPT_DIR}/*.x.c &>/dev/null - unset KEY - KEY="$1" - name="$2" - #CRIA DIR - [[ ! -e ${DIR} ]] && mkdir ${DIR} - #ENVIA ARQS - i=0 - VALUE+="gerar.sh http-server.py $BASICINST" - for arqx in $(ls ${SCPT_DIR}); do - [[ $(echo $VALUE | grep -w "${arqx}") ]] && continue - echo -e "[$i] -> ${arqx}" - arq_list[$i]="${arqx}" - let i++ - done - msg -bar - #read -p " OPCION : " readvalue - #CRIA KEY - [[ ! -e ${DIR}/${KEY} ]] && mkdir ${DIR}/${KEY} - #PASSA ARQS - [[ -z $readvalue ]] && readvalue="1" - [[ -z $nombrevalue ]] && nombrevalue="$nomkey$name" - if [[ $readvalue = @(cgh|1) ]]; then - #ADM BASIC - echo -e " - KEY SCRIPT BASE ADM - " - arqslist="$BASICINST" - for arqx in $(echo "${arqslist}"); do - [[ -e ${DIR}/${KEY}/$arqx ]] && continue #ANULA ARQUIVO CASO EXISTA - cp ${SCPT_DIR}/$arqx ${DIR}/${KEY}/ - echo "$arqx" >>${DIR}/${KEY}/${LIST} - done - else - for arqx in $(echo "${readvalue}"); do - #UNE ARQ - [[ -e ${DIR}/${KEY}/${arq_list[$arqx]} ]] && continue #ANULA ARQUIVO CASO EXISTA - rm ${SCPT_DIR}/*.x.c &>/dev/null - cp ${SCPT_DIR}/${arq_list[$arqx]} ${DIR}/${KEY}/ - echo "${arq_list[$arqx]}" >>${DIR}/${KEY}/${LIST} - done - echo "TRUE" >>${DIR}/${KEY}/FERRAMENTA - fi - rm ${SCPT_DIR}/*.x.c &>/dev/null - echo "$nombrevalue" >${DIR}/${KEY}.name - [[ ! -z $IPFIX ]] && echo "$IPFIX" >${DIR}/${KEY}/keyfixa - echo -e "-------------------------------------------------" -} - -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 -} - -fix_key() { - unset nomkey - echo " Bienvenido, Porfavor dijita el Nombre del DUE�O de la KEYs" - echo " DIJITA 0 PARA REGRESAR " - read -p " RESELLER deL Keys : " nomkey - [[ $nomkey = 0 ]] && return - [[ -z $nomkey ]] && { - [[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")" - } - msg -bar - echo " Bienvenido, Porfavor ingresa el numero de keys a generar" - read -p "Numero de Keys : " numk - [[ -z ${numk} ]] && numk=0 - msg -bar - read -p "INGRESA NOMBRE DE VENDEDOR : " vkey - clear - msg -bar - echo -e "$numk Keys activas,de $nomkey y esperando instalaci�n!" - echo "$nomkey" >${SCPT_DIR}/menu_credito - for ((w = 0; w < $numk; w++)); do - valuekey="$(date | md5sum | head -c11)" - valuekey+="$(echo $(($RANDOM * 10)) | head -c 6)" - xyz+="$(echo $(($RANDOM * 3)) | head -c 4)" - #valuekey+="$(echo $(($RANDOM*10))|head -c 5)" - list_fix "$valuekey" "$(($w + 1))" - keyfinal=$(ofus "$(wget -qO- ipv4.icanhazip.com):8888/$valuekey/$LIST") - echo -e " ${CHeko} Key $(($w + 1)) Exitosa! $(printf '%(%D-%H:%M:%S)T') \n" - echo -e " ${TTcent} ${keyfinal} ${TTcent}" | pv -qL 80 - done - [[ -e /etc/menu_ito ]] && cat /etc/menu_ito >${SCPT_DIR}/menu_credito || echo -e "\nCreditos Aplicados Exitosamente" - #$(cat < /etc/ADM-db/resell) - msg -bar - echo -e " ${ScT} *INSTALADOR UNIVERSAL* ${ScT}" - msg -bar && echo -ne "$(msg -verd "apt update -y &&") $(msg -aqua "apt upgrade -y &&\n") " && msg -bra "\033[7;49;35m wget -q https://raw.githubusercontent.com/drowkid01/ScriptCGH/main/setup && chmod 777 setup && ./setup --install" - msg -bar - [[ -e /etc/menu_numito ]] && menumito="$(cat /etc/menu_numito)" || menumito="https://t.me/drowkid01_bot" - [[ -z $vkey ]] && vkey="@drowkid01" - echo -e " ${ceLL} Soporte : Ubuntu 14.04 - 16.04 - 18.04 - 20.04 - 21.04 - 22.04\n S.O PREFERENTE 18.04" - echo -e " Verificada: $vkey ${ScT} RESELLER ACTUAL : $nomkey" | pv -qL 80 - msg -bar - read -p "Enter para finalizar" -} -att_gen_key() { - i=0 - rm ${SCPT_DIR}/*.x.c &>/dev/null - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - echo "[$i] Volver" - keys="$keys retorno" - let i++ - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - arqsx=$(ofus "$IP:8888/$arqs/$LIST") - if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then - echo -e "\033[1;31m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;32m ($(cat ${DIR}/${arqs}/keyfixa))\033[0m" - keys="$keys $arqs" - let i++ - fi - done - keys=($keys) - msg -bar - while [[ -z ${keys[$value]} || -z $value ]]; do - read -p "Escolha qual Atualizar[t=todos]: " -e -i 0 value - done - [[ $value = 0 ]] && return - if [[ $value = @(t|T) ]]; then - i=0 - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - KEYDIR="$DIR/$arqs" - rm $KEYDIR/*.x.c &>/dev/null - if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then #Keyen Atualiza - rm ${KEYDIR}/${LIST} - for arqx in $(ls $SCPT_DIR); do - cp ${SCPT_DIR}/$arqx ${KEYDIR}/$arqx - echo "${arqx}" >>${KEYDIR}/${LIST} - rm ${SCPT_DIR}/*.x.c &>/dev/null - rm $KEYDIR/*.x.c &>/dev/null - done - arqsx=$(ofus "$IP:8888/$arqs/$LIST") - echo -e "\033[1;33m[KEY]: $arqsx \033[1;32m(ATUALIZADA!)\033[0m" - fi - let i++ - done - rm ${SCPT_DIR}/*.x.c &>/dev/null - msg -bar2 - echo -ne "\033[0m" && read -p "Enter" - return 0 - fi - KEYDIR="$DIR/${keys[$value]}" - [[ -d "$KEYDIR" ]] && { - rm $KEYDIR/*.x.c &>/dev/null - rm ${KEYDIR}/${LIST} - for arqx in $(ls $SCPT_DIR); do - cp ${SCPT_DIR}/$arqx ${KEYDIR}/$arqx - echo "${arqx}" >>${KEYDIR}/${LIST} - rm ${SCPT_DIR}/*.x.c &>/dev/null - rm $KEYDIR/*.x.c &>/dev/null - done - arqsx=$(ofus "$IP:8888/${keys[$value]}/$LIST") - echo -e "\033[1;33m[KEY]: $arqsx \033[1;32m(ATUALIZADA!)\033[0m" - read -p "Enter" - rm ${SCPT_DIR}/*.x.c &>/dev/null - } -} - -del_KILL() { - for arqlist in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - [[ -e /${DIR}/${arqlist}.name ]] || rm -rf /${DIR}/${arqlist} - done -} - -remover_key() { - del_KILL - i=0 - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - echo "[$i] Volver" - keys="$keys retorno" - let i++ - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - arqsx=$(ofus "$IP:8888/$arqs/$LIST") - if [[ ! -e ${DIR}/${arqs}/used.date ]]; then - echo -e "\033[1;32m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;33m (Key Activa)\033[0m" || rm -rf ${DIR}/${arqs} - else - echo -e "\033[1;31m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;33m ($(cat ${DIR}/${arqs}/used.date) IP: $(cat ${DIR}/${arqs}/used))\033[0m" - fi - keys="$keys $arqs" - let i++ - done - keys=($keys) - msg -bar - while [[ -z ${keys[$value]} || -z $value ]]; do - read -p "Elija cual remover: " -e -i 0 value - done - [[ -d "$DIR/${keys[$value]}" ]] && rm -rf $DIR/${keys[$value]}* || return -} -remover_key_usada() { - i=0 - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - arqsx=$(ofus "$IP:8888/$arqs/$LIST") - if [[ -e ${DIR}/${arqs}/used.date ]]; then #KEY USADA - if [[ $(ls -l -c ${DIR}/${arqs}/used.date | cut -d' ' -f7) != $(date | cut -d' ' -f3) ]]; then - rm -rf ${DIR}/${arqs}* - echo -e "\033[1;31m[KEY]: $arqsx \033[1;32m(Eliminada!)\033[0m" - else - echo -e "\033[1;32m[KEY]: $arqsx \033[1;32m(Key Activa!)\033[0m" - fi - else - echo -e "\033[1;32m[KEY]: $arqsx \033[1;32m(Key Activa!)\033[0m" - fi - let i++ - done - msg -bar2 - echo -ne "\033[0m" && read -p "Enter" -} -start_gen() { - unset bot_ini - PIDGEN=$(ps x | grep -v grep | grep "http-server.sh") - if [[ ! $PIDGEN ]]; then - msg -bar - echo -ne "\033[1;97m Poner en linea despues de un reinicio [s/n]: " - read bot_ini - msg -bar - [[ $bot_ini = @(s|S|y|Y) ]] && { - crontab -l >/root/cron - echo "@reboot screen -dmS generador /bin/http-server.sh -start" >>/root/cron - crontab /root/cron - rm /root/cron - echo '#!/bin/bash -killall http-server.sh -screen -dmS generador /bin/http-server.sh -start -echo #' >/bin/genon - chmod +rwx /bin/genon - echo "00 * * * * root bash /bin/genon" >>/etc/crontab - service cron restart - } || { - crontab -l >/root/cron - sed -i '/http-server.sh/ d' /root/cron - crontab /root/cron - rm /root/cron - sed '/genon/ d' /etc/crontab >/bin/ejecutar/crontab - cat /bin/ejecutar/crontab >/etc/crontab - service cron restart - - } - genon - else - killall http-server.sh - fi -} -message_gen() { - read -p "Ingresa el Mensaje: " MSGNEW - [[ -z $MSGNEW ]] && return - echo $MSGNEW >/etc/menu_ito - cat /etc/menu_ito >${SCPT_DIR}/menu_credito - read -p "Ingresa tu Numero de Contacto o tu ALIAS de TELEGRAM: " MSGNEW - echo $MSGNEW >/etc/menu_numito && chmod +rwx /etc/menu_numito - msg -bar -} - -act_gen() { - while [[ ${varread} != @([0-2]) ]]; do - echo -e "Bienvenido al Actualizador, Escoje que vas a Actualizar\n 1).- KEY ACTIVA\n 2).- Creditos del ADM\n " | lolcat - echo -ne "${cor[6]}" - read -p " Escoje :" varread - done - msg -bar - if [[ ${varread} = 0 ]]; then - return - elif [[ ${varread} = 1 ]]; then - att_gen_key - elif [[ ${varread} = 2 ]]; then - message_gen - fi - - #source <(curl -sL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/Key-gerar/insta.sh) -} - -rmv_iplib() { - echo -e "SERVIDORES DE KEY ATIVOS!" - rm /var/www/html/newlib && touch /var/www/html/newlib - rm ${SCPT_DIR}/*.x.c &>/dev/null - [[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return - for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do - if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then - var=$(cat ${DIR}/${arqs}.name) - ip=$(cat ${DIR}/${arqs}/keyfixa) - # echo -ne "\033[1;31m[USUARIO]:(\033[1;32m${var%%[*}\033[1;31m) \033[1;33m[GERADOR]:\033[1;32m ($ip)\033[0m" - echo "$ip" >>/var/www/html/newlib && echo -e " \033[1;36m[ATUALIZADO]" - fi - done - echo "51.222.29.216" >>/var/www/html/newlib - msg -bar - read -p "Enter" -} - -bot_menu() { - [[ -e /etc/nivbot ]] || echo "0" >/etc/nivbot - [[ -d /etc/ADM-db ]] && chmod +rwx /etc/ADM-db/* - echo -ne "\033[1;31m[ ! ] RESPALDANDO USUARIO ADMINISTRADOR " - ( - [[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes $HOME/costes - [[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token $HOME/token - [[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID $HOME/Admin-ID - [[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID $HOME/User-ID - [[ -e /etc/ADM-db/limit ]] && mv /etc/ADM-db/limit $HOME/limit - [[ -e /etc/ADM-db/resell ]] && mv /etc/ADM-db/resell $HOME/resell - [[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress $HOME/ress - [[ -e /etc/ADM-db/num-key.cont ]] && mv /etc/ADM-db/num-key.cont $HOME/num-key.cont - ) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]" - rm -rf /etc/ADM-db - CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir} - [[ ! -e "${CIDdir}/confbot.sh" ]] && wget --no-check-certificate -O ${CIDdir}/confbot.sh https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Code-BOT-General/intBOT.sh &>/dev/null && chmod +rwx ${CIDdir}/confbot.sh - sed -i -e 's/\r$//' ${CIDdir}/confbot.sh - source ${CIDdir}/confbot.sh && rm -f ${CIDdir}/confbot.sh - bot_conf -} - -fum_ver() { - while [[ ! $Keey ]]; do - clear - export PATH=$PATH:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin:/usr/games - echo -e "\n \033[1;32m DIGITA TU KEY A VERIFICAR " - msg -ne "Script Key: " && read Keey - [[ ! -z $Keey ]] && Keey="$(echo "$Keey" | tr -d '[[:space:]]')" - tput cuu1 && tput dl1 - done - REQUEST=$(ofus "$Keey" | cut -d'/' -f2) - echo -e "\n" - echo -e " FILE Contend : ${REQUEST} $(echo ${REQUEST} | wc -c)" - echo -e "\n" - echo -e " VERIFICA, Si tu key Contiene \033[1;45m KEY DE drowkid01! \033[0m " - echo -e "\n" - msg -ne " Link Key: http://$(ofus $Keey) \n " - IiP=$(ofus "$Keey" | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') - [[ $(curl -s --connect-timeout 2 $IiP:8888) ]] && echo -e "\033[1;42mCONEXION CON SERVIDOR EXITOSA\033[0m" || echo -e "\033[1;43mCONEXION CON SERVIDOR FALLIDA\033[0m" - wget --no-check-certificate -O $HOME/list-key $(ofus $Keey)/$(wget -qO- ipv4.icanhazip.com) >/dev/null 2>&1 && echo -ne "\033[1;32m [ VERIFICANDO ]" || echo -e "\033[1;31m [ No Existe Acceso al KEY ]" #&& echo -e "\033[1;32m [ Key ]\n" || echo -e "\033[1;31m [ No Existe Acceso al KEY ]" - ofen=$(wget -qO- $(ofus $Keey)) - unset arqx - [[ -d $HOME/install ]] && rm -rf $HOME/install/* || mkdir $HOME/install - verificar_arq() { - echo "$1" >>$HOME/install/log.txt - } - n=1 - IP=$(ofus "$Keey" | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') && echo "$IP" >/usr/bin/vendor_code - pontos="." - stopping=" COMPROBANDO " | sed -e 's/[^a-z -]//ig' - for arqx in $(cat $HOME/list-key); do - msg -verm "${stopping}${pontos}" && sleep 0.3s - wget --no-check-certificate -O $HOME/install/${arqx} ${IP}:81/${REQUEST}/${arqx} >/dev/null 2>&1 && verificar_arq "${arqx}" - tput cuu1 && tput dl1 - pontos+="." - n=$(($n + 1)) - done - echo -ne " ---> ESTADO : \033[1;45m$ofen\033[0m con " - [[ ! -e $HOME/install/log.txt ]] && touch $HOME/install/log.txt - echo " $(cat <$HOME/install/log.txt | wc -l) FILES " && rm -f $HOME/install/log.txt - msg -ne " \033[1;42mESTADO :\033[0m " - [[ -e $HOME/list-key ]] && { - echo -ne " " - [[ $ofen = "KEY DE drowkid01!" ]] && - echo -e "KEY FUNCIONAL" && rm -f $HOME/list-key && echo -ne "\033[0m" - } || echo -e " KEY INVALIDA O USADA\033[0m\n" - #curl -s --connect-timeout 2 ${IiP}:81/${REQUEST}/menu_credito > menu_credito - msg -ne " RESELLER del Key :\033[0m " - [[ -e $HOME/install/menu_credito ]] && { - echo -ne " " - [[ "$(cat $HOME/install/menu_credito)" = "" ]] && { - echo -e "SIN RESELLER\033[0m" - } || echo -e "$(cat $HOME/install/menu_credito)\033[0m" && rm -rf $HOME/install && echo -ne "\033[0m" - } || echo -e " NO HAY CONTENIDO DE KEY Key\033[0m\n" - read -p "Enter" -} - -alter_id() { - while [[ ${varread} != @([0-3]) ]]; do - tittle - msg -bar - echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m Alterar Creditos POR ID \033[0;32m(#OFICIAL)" - echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m REINICIAR CONTADOR TOTAL \033[0;32m(#OFICIAL)" - msg -bar - echo -e " \033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m Regresar" - msg -bar - echo -ne "${cor[6]}" - read -p " Opcion : " varread - done - msg -bar - if [[ ${varread} = 0 ]]; then - return 0 - elif [[ ${varread} = 1 ]]; then - echo -e "\033[1;32m DIGITA ID A REINICIAR " - msg -ne " Paste ID : " && read newli - sed -i "/${newli}/d" /etc/ADM-db/num-key.cont - echo "REGISTRO EN $(grep -o -i $newli /etc/ADM-db/num-key.cont | wc -l) KEYS" - read -p "Limite Aplicado Exitosamente" - elif [[ ${varread} = 2 ]]; then - echo -e "\033[1;32m BORRAREMOS EL CONTEO TOTAL DEL GENERADOR " - rm -rf /etc/ADM-db/num-key.cont && touch /etc/ADM-db/num-key.cont - echo "REGISTRO EN $(cat /etc/ADM-db/num-key.cont | wc -l) KEYS" - read -p "Limite Aplicado Exitosamente" - fi -} - -# 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 -} -alter_limit() { - echo -e "\033[1;32m DIGITA TU NUEVO LIMITE " - msg -ne "New Limit: " && read newli - echo $newli >/etc/ADM-db/limit - read -p "Limite Aplicado Exitosamente" -} - -dropIP() { - [[ ! -e /etc/dropIP.sh ]] && wget -q -O /etc/dropIP.sh https://www.dropbox.com/s/12r0h64vb1lc1oy/dropIP.sh?dl=0 - unset PIDGEN - if [[ -e /var/www/html/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot ]]; then - echo -e "[Unit] -Description=BotGen Service by @drowkid01 -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -User=root -WorkingDirectory=/root -ExecStart=/bin/bash /etc/dropIP.sh -Restart=always -RestartSec=3s - -[Install] -WantedBy=multi-user.target" >/etc/systemd/system/dropIP.service - - systemctl enable dropIP &>/dev/null - systemctl start dropIP &>/dev/null - else - killall dropIP &>/dev/null - systemctl stop dropIP &>/dev/null - systemctl disable dropIP &>/dev/null - rm /etc/systemd/system/dropIP.service &>/dev/null - clear - msg -bar - echo -e "\033[1;31m BotGen fuera de linea" - msg -bar - read -p "Presione Enter para continuar " - fi - -} - -meu_ip - -menau() { - unset PID_GEN1 - PID_GEN=$(ps x | grep -v grep | grep "http-server.sh") - PID_GEN1=$(ps x | grep -v grep | grep "8888") - PID_BGEN1=$(ps x | grep -v grep | grep "BotGen.sh") - add_fun="${PID_BGEN1}" - tittle - [[ -e /etc/valkey ]] && { - figlet -f smslant "$(cat \033[1;31m ${SCPT_DIR} \033[0;34mcon\033[0;35m |\033[0;32m$(ls /etc/http-shell/ | grep name | wc -l)\033[0;35m|\033[0;33m\033[0;33m KEYs" - cd $HOME - msg -bar - meu_ip - [[ -z $add_fun ]] || echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m Alterar Limite del BOT ( $limted )" #$PID_GEN1\033[0m - echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m APAGAR/VER KEYS" - #echo -e "\033[0;35m[\033[0;36mx\033[0;35m] \033[0;34m<\033[0;33m ------------------------" #KEYS ( GENERADOR )" - echo -e "\033[0;35m[\033[0;36m4\033[0;35m] \033[0;34m<\033[0;34m Generar Keys ALEATORIAS" - echo -e "\033[0;35m[\033[0;36m5\033[0;35m] \033[0;34m<\033[0;33m INICIAR/PARAR KEYGEN $PID_GEN\033[0m" - echo -e "\033[0;35m[\033[0;36m6\033[0;35m] \033[0;34m<\033[0;33m REGISTRO DE KEYS USADAS" - echo -e "\033[0;35m[\033[0;36m7\033[0;35m] \033[0;34m<\033[0;33m Checar KEY ACTIVADA" - echo -e "\033[0;35m[\033[0;36m8\033[0;35m] \033[0;34m<\033[0;33m ACTUALIZAR GENERADOR/KEY/CREDITOS " - echo -e "\033[0;35m[\033[0;36m9\033[0;35m] \033[0;34m<\033[0;33m Actualizar KEY" - echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;34m<\033[0;33m CONFIGURAR BOT DE TELEGRAM $PID_BGEN1\033[0m" - [[ -z $add_fun ]] || echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;34m<\033[0;33m + / - CREDITOS Por ID" - echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR" - msg -bar - -} - -while :; do - menau - selection=$(selection_fun $lim_menu) - case ${selection} in - 0) cd $HOME && break ;; - 1) alter_limit ;; - 2) remover_key ;; - 3) remover_key_usada ;; - 4) fix_key ;; - 5) start_gen ;; - 6) - echo -ne "\033[1;36m" - echo -e "$(cat /etc/gerar-sh-log)" 2>/dev/null || echo "NINGUN LOG DE MOMENTO" - echo -ne "\033[0m" && read -p "Enter" - ;; - 7) fum_ver ;; - 8) act_gen ;; - 9) att_gen_key ;; - 10) bot_menu ;; - 11) alter_id ;; - esac -done diff --git a/Otros/ShellBot.sh b/Otros/ShellBot.sh deleted file mode 100755 index ede264a..0000000 --- a/Otros/ShellBot.sh +++ /dev/null @@ -1,4241 +0,0 @@ -#!/bin/bash - -#----------------------------------------------------------------------------------------------------------- -# DATA: 07 de Março de 2017 -# SCRIPT: ShellBot.sh -# VERSÃO: 5.3 -# DESENVOLVIDO POR: Juliano Santos [SHAMAN] -# PÁGINA: http://www.shellscriptx.blogspot.com.br -# FANPAGE: https://www.facebook.com/shellscriptx -# GITHUB: https://github.com/shellscriptx -# CONTATO: shellscriptx@gmail.com -# -# DESCRIÇÃO: ShellBot é uma API não-oficial desenvolvida para facilitar a criação de -# bots na plataforma TELEGRAM. Constituída por uma coleção de métodos -# e funções que permitem ao desenvolvedor: -# -# * Gerenciar grupos, canais e membros. -# * Enviar mensagens, documentos, músicas, contatos e etc. -# * Enviar teclados (KeyboardMarkup e InlineKeyboard). -# * Obter informações sobre membros, arquivos, grupos e canais. -# * Para mais informações consulte a documentação: -# -# https://github.com/shellscriptx/ShellBot/wiki -# -# O ShellBot mantém o padrão da nomenclatura dos métodos registrados da -# API original (Telegram), assim como seus campos e valores. Os métodos -# requerem parâmetros e argumentos para a chamada e execução. Parâmetros -# obrigatórios retornam uma mensagem de erro caso o argumento seja omitido. -# -# NOTAS: Desenvolvida na linguagem Shell Script, utilizando o interpretador de -# comandos BASH e explorando ao máximo os recursos built-in do mesmo, -# reduzindo o nível de dependências de pacotes externos. -#----------------------------------------------------------------------------------------------------------- - -# Verifica se a API já foi instanciada. -[[ $_SHELLBOT_SH_ ]] && return 1 - -# Verifica se os pacotes necessários estão instalados. -for _pkg_ in curl jq getopt; do - # Se estiver ausente, trata o erro e finaliza o script. - if ! which $_pkg_ &>/dev/null; then - echo "ShellBot.sh: erro: '$_pkg_' O pacote requerido não está instalado." 1>&2 - exit 1 # Status - fi -done - -# Script que importou a API. -declare -r _BOT_SCRIPT_=$(basename "$0") - -# API inicializada. -declare -r _SHELLBOT_SH_=1 - -# Desabilitar globbing -set -f - -# curl parâmetros -declare -r _CURL_OPT_='--silent --request' - -# Erros registrados da API (Parâmetros/Argumentos) -declare -r _ERR_TYPE_BOOL_='Tipo incompatível: Suporta somente "true" ou "false".' -declare -r _ERR_TYPE_PARSE_MODE_='Formatação inválida: Suporta somente "markdown" ou "html".' -declare -r _ERR_TYPE_INT_='Tipo incompatível: Suporta somente inteiro.' -declare -r _ERR_TYPE_FLOAT_='Tipo incompatível: Suporta somente float.' -declare -r _ERR_TYPE_POINT_='Máscara inválida: Deve ser “forehead”, “eyes”, “mouth” ou “chin”.' -declare -r _ERR_ACTION_MODE_='Ação inválida: A definição da ação não é suportada.' -declare -r _ERR_PARAM_REQUIRED_='Opção requerida: Verique se o(s) parâmetro(s) ou argumento(s) obrigatório(s) estão presente(s).' -declare -r _ERR_TOKEN_UNAUTHORIZED_='Não autorizado: Verifique se possui permissões para utilizar o token.' -declare -r _ERR_TOKEN_INVALID_='TOKEN inválido: Verique o número do token e tente novamente.' -declare -r _ERR_FUNCTION_NOT_FOUND_='Função inválida: Verique se o nome está correto ou se a função existe.' -declare -r _ERR_BOT_ALREADY_INIT_='Ação não permitida: O bot já foi inicializado.' -declare -r _ERR_FILE_NOT_FOUND_='Arquivo não encontrado: Não foi possível ler o arquivo especificado.' -declare -r _ERR_DIR_WRITE_DENIED_='Permissão negada: Não é possível gravar no diretório.' -declare -r _ERR_DIR_NOT_FOUND_='Não foi possível acessar: Diretório não encontrado.' -declare -r _ERR_FILE_DOWNLOAD_='Falha no download: Arquivo não encontrado.' -declare -r _ERR_FILE_INVALID_ID_='ID inválido: Arquivo não encontrado.' -declare -r _ERR_UNKNOWN_='Erro desconhecido: Ocorreu uma falha inesperada. Reporte o problema ao desenvolvedor.' -declare -r _ERR_SERVICE_NOT_ROOT_='Acesso negado: Requer privilégios de root.' -declare -r _ERR_SERVICE_EXISTS_='Erro ao criar o serviço: O nome do serviço já existe.' -declare -r _ERR_SERVICE_SYSTEMD_NOT_FOUND_='Erro ao ativar: O sistema não possui suporte ao gerenciamento de serviços "systemd".' -declare -r _ERR_SERVICE_USER_NOT_FOUND_='Usuário não encontrado: A conta de usuário informada é inválida.' -declare -r _ERR_VAR_NAME='O identificador da variável é inválido.' - -Json() { jq "$1" <<< "${*:2}" 2>/dev/null | sed -r 's/(^"|"$)//g'; } -GetObjValue(){ sed -nr 's/^\s+"[a-z_]+":\s+"?(.+[^",])*"?,?$/\1/p' | sed ':a;N;s/\n/|/;ta'; } -JsonStatus(){ [[ $(jq '.ok' <<< "$*") == true ]] && return 0 || return 1; } - -MessageError() -{ - # Variáveis locais - local err_message err_param err_line err_func assert ind - - # A variável 'BASH_LINENO' é dinâmica e armazena o número da linha onde foi expandida. - # Quando chamada dentro de um subshell, passa ser instanciada como um array, armazenando diversos - # valores onde cada índice refere-se a um shell/subshell. As mesmas caracteristicas se aplicam a variável - # 'FUNCNAME', onde é armazenado o nome da função onde foi chamada. - - # Obtem o índice da função na hierarquia de chamada. - [[ ${FUNCNAME[1]} == CheckArgType ]] && ind=2 || ind=1 - err_line=${BASH_LINENO[$ind]} # linha - err_func=${FUNCNAME[$ind]} # função - - # Lê o tipo de ocorrência. - # TG - Erro externo retornado pelo core do telegram. - # API - Erro interno gerado pela API do ShellBot. - case $1 in - TG) - # arquivo Json - err_param="$(Json '.error_code' ${*:2})" - err_message="$(Json '.description' ${*:2})" - ;; - API) - err_param="${3:--}: ${4:--}" - err_message="$2" - assert=1 - ;; - esac - - # Imprime erro - printf "%s: erro: linha %s: %s: %s: %s\n" "${_BOT_SCRIPT_}" \ - "${err_line:--}" \ - "${err_func:--}" \ - "${err_param:--}" \ - "${err_message:-$_ERR_UNKNOWN_}" 1>&2 - - # Finaliza script/thread em caso de erro interno, caso contrário retorna 1 - [[ $assert ]] && exit 1 || return 1 -} - -CheckArgType(){ - - local ctype="$1" - local param="$2" - local value="$3" - - # CheckArgType recebe os dados da função chamadora e verifica - # o dado recebido com o tipo suportado pelo parâmetro. - # É retornado '0' para sucesso, caso contrário uma mensagem - # de erro é retornada e o script/thread é finalizado com status '1'. - case $ctype in - var) [[ $value =~ ^[a-zA-Z_]+[a-zA-Z0-9_]*$ ]] || MessageError API "$_ERR_VAR_NAME" "$param" "$value";; - int) [[ $value =~ ^[0-9]+$ ]] || MessageError API "$_ERR_TYPE_INT_" "$param" "$value";; - float) [[ $value =~ ^-?[0-9]+\.[0-9]+$ ]] || MessageError API "$_ERR_TYPE_FLOAT_" "$param" "$value";; - bool) [[ $value =~ ^(true|false)$ ]] || MessageError API "$_ERR_TYPE_BOOL_" "$param" "$value";; - token) [[ $value =~ ^[0-9]+:[a-zA-Z0-9_-]+$ ]] || MessageError API "$_ERR_TOKEN_INVALID_" "$param" "$value";; - file) [[ $value =~ ^@ && ! -f ${value#@} ]] && MessageError API "$_ERR_FILE_NOT_FOUND_" "$param" "$value";; - parsemode) [[ $value =~ ^(markdown|html)$ ]] || MessageError API "$_ERR_TYPE_PARSE_MODE_" "$param" "$value";; - point) [[ $value =~ ^(forehead|eyes|mouth|chin)$ ]] || MessageError API "$_ERR_TYPE_POINT_" "$param" "$value";; - action) [[ $value =~ ^(typing| - upload_photo| - record_video| - upload_video| - record_audio| - upload_audio| - upload_document| - find_location| - record_video_note| - upload_video_note)$ ]] || MessageError API "$_ERR_ACTION_MODE_" "$param" "$value";; - esac - - return 0 -} - -FlushOffset() -{ - local first_id last_id cod end jq_obj - - # Sem erro - cod=0 - update_id=0 - - while [[ $update_id ]] - do - # Lê as atualizações do offset atual. É possível listar no máximo 100 objetos por offset. - if jq_obj=$(ShellBot.getUpdates --limit 100 --offset $(ShellBot.OffsetNext)) - then - # Lê os IDs das atualizações disponíveis, salva o primeiro e último elemento da lista. - # Interrompe o laço se não houver mais atualizações. - unset update_id - update_id=($(Json '.result|.[]|.update_id' $jq_obj)) - - first_id=${first_id:-$update_id} - end=$(ShellBot.OffsetEnd) - ((end > 0)) && last_id=$end - else - # Seta o erro e finaliza o laço em caso de falha na chamada do método. - cod=1 - break - fi - done - - # Retorna '0' se não houver registro. - # Saída: 0|0 - echo "${first_id:-0}|${last_id:-0}" - - # Desativa a flag - unset _FLUSH_OFFSET_ - - # Status - return $cod -} - -CreateUnitService() -{ - local service=${1%.*}.service - local ok='\033[0;32m[OK]\033[0;m' - local fail='\033[0;31m[FALHA]\033[0;m' - - ((UID == 0)) || MessageError API "$_ERR_SERVICE_NOT_ROOT_" - - # O modo 'service' requer que o sistema de gerenciamento de processos 'systemd' - # esteja presente para que o Unit target seja linkado ao serviço. - if ! which systemd &>/dev/null; then - MessageError API "$_ERR_SERVICE_SYSTEMD_NOT_FOUND_"; fi - - - # Se o serviço existe. - test -e /lib/systemd/system/$service && \ - MessageError API "$_ERR_SERVICE_EXISTS_" "$service" - - # Gerando as configurações do target. - cat > /lib/systemd/system/$service << _eof -[Unit] -Description=$1 - (SHELLBOT) -After=network-online.target - -[Service] -User=$2 -WorkingDirectory=$PWD -ExecStart=/bin/bash $1 -ExecReload=/bin/kill -HUP \$MAINPID -ExecStop=/bin/kill -KILL \$MAINPID -KillMode=process -Restart=on-failure -RestartPreventExitStatus=255 -Type=simple - -[Install] -WantedBy=multi-user.target -_eof - - [[ $? -eq 0 ]] && { - - printf '%s foi criado com sucesso !!\n' $service - - ln -s /lib/systemd/system/$service /etc/systemd/system/$service - systemctl daemon-reload - - echo -n "Habilitando..." - systemctl enable $service &>/dev/null && echo -e $ok || \ - { echo -e $fail; MessageError API; } - - sed -i -r '/^\s*ShellBot.init\s/s/\s--?(s(ervice)?|u(ser)?\s+\w+)\b//g' "$1" - - echo -n "Iniciando..." - systemctl start $service &>/dev/null && { - - echo -e $ok - systemctl status $service - echo -e "\nUso: sudo systemctl {start|stop|restart|reload|status} $service" - - } || echo -e $fail - - } || MessageError API - - exit 0 -} - -# Inicializa o bot, definindo sua API e _TOKEN_. -ShellBot.init() -{ - # Verifica se o bot já foi inicializado. - [[ $_SHELLBOT_INIT_ ]] && MessageError API "$_ERR_BOT_ALREADY_INIT_" - - local enable_service user_unit _jq_bot_info - - local param=$(getopt --name "$FUNCNAME" \ - --options 't:mfsu:' \ - --longoptions 'token:, - monitor, - flush, - service, - user:' \ - -- "$@") - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -t|--token) - CheckArgType token "$1" "$2" - declare -gr _TOKEN_="$2" # TOKEN - declare -gr _API_TELEGRAM_="https://api.telegram.org/bot$_TOKEN_" # API - shift 2 - ;; - -m|--monitor) - # Ativa modo monitor - declare -gr _BOT_MONITOR_=1 - shift - ;; - -f|--flush) - # Define a FLAG flush para o método 'ShellBot.getUpdates'. Se ativada, faz com que - # o método obtenha somente as atualizações disponíveis, ignorando a extração dos - # objetos JSON e a inicialização das variáveis. - declare -x _FLUSH_OFFSET_=1 - shift - ;; - -s|--service) - enable_service=1 - shift - ;; - -u|--user) - if ! id "$2" &>/dev/null; then - MessageError API "$_ERR_SERVICE_USER_NOT_FOUND_" "[-u, --user]" "$2"; fi - - user_unit="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetro obrigatório. - [[ $_TOKEN_ ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-t, --token]" - [[ $user_unit && ! $enable_service ]] && MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --service]" - [[ $enable_service ]] && CreateUnitService "$_BOT_SCRIPT_" "${user_unit:-$USER}" - - # Um método simples para testar o token de autenticação do seu bot. - # Não requer parâmetros. Retorna informações básicas sobre o bot em forma de um objeto Usuário. - - ShellBot.getMe() - { - # Chama o método getMe passando o endereço da API, seguido do nome do método. - local jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.}) - - _jq_bot_info=$jq_obj - - # Verifica o status de retorno do método - JsonStatus $jq_obj && { - # Retorna as informações armazenadas em "result". - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - } - - ShellBot.getMe &>/dev/null || MessageError API "$_ERR_TOKEN_UNAUTHORIZED_" '[-t, --token]' - - # Salva as informações do bot. - _BOT_INFO_[0]=$_TOKEN_ - _BOT_INFO_[1]=$(Json '.result.id' $_jq_bot_info) - _BOT_INFO_[2]=$(Json '.result.first_name' $_jq_bot_info) - _BOT_INFO_[3]=$(Json '.result.username' $_jq_bot_info) - - # Bot inicializado - declare -gr _BOT_INFO_ - declare -gr _SHELLBOT_INIT_=1 - - # SHELLBOT (FUNÇÕES) - # Inicializa as funções para chamadas aos métodos da API do telegram. - ShellBot.ListUpdates(){ echo ${!update_id[@]}; } - ShellBot.TotalUpdates(){ echo ${#update_id[@]}; } - ShellBot.OffsetEnd(){ local -i offset=${update_id[@]: -1}; echo $offset; } - ShellBot.OffsetNext(){ echo $(($(ShellBot.OffsetEnd)+1)); } - - ShellBot.token() { echo "${_BOT_INFO_[0]}"; } - ShellBot.id() { echo "${_BOT_INFO_[1]}"; } - ShellBot.first_name() { echo "${_BOT_INFO_[2]}"; } - ShellBot.username() { echo "${_BOT_INFO_[3]}"; } - - ShellBot.regHandleFunction() - { - local function callback_data handle args - - local param=$(getopt --name "$FUNCNAME" \ - --options 'f:a:d:' \ - --longoptions 'function:, - args:, - callback_data:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -f|--function) - # Verifica se a função especificada existe. - if ! declare -fp $2 &>/dev/null; then - MessageError API "$_ERR_FUNCTION_NOT_FOUND_" "$1" "$2" - return 1 - fi - function="$2" - shift 2 - ;; - -a|--args) - args="$2" - shift 2 - ;; - -d|--callback_data) - callback_data="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $function ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-f, --function]" - [[ $callback_data ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-d, --callback_data]" - - # Testa se o indentificador armazenado em handle já existe. Caso já exista, repete - # o procedimento até que um handle válido seja gerado; Evitando sobreescrever handle's existentes. - until ! declare -fp $handle &>/dev/null; do - handle=$(mktemp --dry-run HandleID:XXXXXXXXXXXXXXX) - done - - # Cria a função com o nome gerado e adiciona a chamada com os argumentos especificados. - # Anexa o novo handle a lista no índice associativo definindo em callback_data - function="$handle(){ $function $args; }" - eval "$function" - - declare -Ag _reg_func_handle_list_ - _reg_func_handle_list_[$callback_data]+="$handle " - - return 0 - } - - ShellBot.watchHandle() - { - local callback_data func_handle \ - param=$(getopt --name "$FUNCNAME" \ - --options 'd' \ - --longoptions 'callback_data' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -d|--callback_data) - shift 2 - callback_data="$1" - ;; - *) - shift - break - ;; - esac - done - - # O parâmetro callback_data é parcial, ou seja, Se o handle for válido, os elementos - # serão listados. Caso contrário a função é finalizada. - [[ $callback_data ]] || return 1 - - # Lista todos os handles no índice callback_data e executa-os - # consecutivamente. A ordem de execução das funções é determinada - # pela ordem de declaração. - for func_handle in ${_reg_func_handle_list_[$callback_data]}; do - $func_handle; done # executa - - # retorno - return 0 - } - - ShellBot.getWebhookInfo() - { - # Variável local - local jq_obj - - # Chama o método getMe passando o endereço da API, seguido do nome do método. - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.}) - - # Verifica o status de retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - } - - ShellBot.deleteWebhook() - { - # Variável local - local jq_obj - - # Chama o método getMe passando o endereço da API, seguido do nome do método. - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.}) - - # Verifica o status de retorno do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - return $? - } - - ShellBot.setWebhook() - { - local url certificate max_connections allowed_updates jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'u:c:m:a:' \ - --longoptions 'url:, - certificate:, - max_connections:, - allowed_updates:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -u|--url) - url="$2" - shift 2 - ;; - -c|--certificate) - CheckArgType file "$1" "$2" - certificate="$2" - shift 2 - ;; - -m|--max_connections) - CheckArgType int "$1" "$2" - max_connections="$2" - shift 2 - ;; - -a|--allowed_updates) - allowed_updates="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $url ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-u, --url]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${url:+-d url="$url"} \ - ${certificate:+-d certificate="$certificate"} \ - ${max_connections:+-d max_connections="$max_connections"} \ - ${allowed_updates:+-d allowed_updates="$allowed_updates"}) - - # Testa o retorno do método. - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.setChatPhoto() - { - local chat_id photo jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:p:' \ - --longoptions 'chat_id:,photo:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -p|--photo) - CheckArgType file "$1" "$2" - photo="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $photo ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-p, --photo]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${photo:+-F photo="$photo"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.deleteChatPhoto() - { - local chat_id jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:' \ - --longoptions 'chat_id:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - - } - - ShellBot.setChatTitle() - { - - local chat_id title jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:t:' \ - --longoptions 'chat_id:,title:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -t|--title) - title="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $title ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-t, --title]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${title:+-d title="$title"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - - ShellBot.setChatDescription() - { - - local chat_id description jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:d:' \ - --longoptions 'chat_id:,description:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -d|--description) - description="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $description ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-d, --description]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${description:+-d description="$description"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.pinChatMessage() - { - - local chat_id message_id disable_notification jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:m:n:' \ - --longoptions 'chat_id:, - message_id:, - disable_notification:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -m|--message_id) - CheckArgType int "$1" "$2" - message_id="$2" - shift 2 - ;; - -n|--disable_notification) - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $message_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --message_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${message_id:+-d message_id="$message_id"} \ - ${disable_notification:+-d disable_notification="$disable_notification"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.unpinChatMessage() - { - local chat_id jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:' \ - --longoptions 'chat_id:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.restrictChatMember() - { - local chat_id user_id until_date can_send_messages \ - can_send_media_messages can_send_other_messages \ - can_add_web_page_previews jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:u:d:s:m:o:w:' \ - --longoptions 'chat_id:, - user_id:, - until_date:, - can_send_messages:, - can_send_media_messages:, - can_send_other_messages:, - can_add_web_page_previews:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - -d|--until_date) - CheckArgType int "$1" "$2" - until_date="$2" - shift 2 - ;; - -s|--can_send_messages) - CheckArgType bool "$1" "$2" - can_send_messages="$2" - shift 2 - ;; - -m|--can_send_media_messages) - CheckArgType bool "$1" "$2" - can_send_media_messages="$2" - shift 2 - ;; - -o|--can_send_other_messages) - CheckArgType bool "$1" "$2" - can_send_other_messages="$2" - shift 2 - ;; - -w|--can_add_web_page_previews) - CheckArgType bool "$1" "$2" - can_add_web_page_previews="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --user_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${user_id:+-d user_id="$user_id"} \ - ${until_date_:+-d until_date="$until_date"} \ - ${can_send_messages:+-d can_send_messages="$can_send_messages"} \ - ${can_send_media_messages:+-d can_send_media_messages="$can_send_media_messages"} \ - ${can_send_other_messages:+-d can_send_other_messages="$can_send_other_messages"} \ - ${can_add_web_page_previews:+-d can_add_web_page_previews="$can_add_web_page_previews"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - - } - - - ShellBot.promoteChatMember() - { - local chat_id user_id can_change_info can_post_messages \ - can_edit_messages can_delete_messages can_invite_users \ - can_restrict_members can_pin_messages can_promote_members \ - jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:u:i:p:e:d:v:r:f:m:' \ - --longoptions 'chat_id:, - user_id:, - can_change_info:, - can_post_messages:, - can_edit_messages:, - can_delete_messages:, - can_invite_users:, - can_restrict_members:, - can_pin_messages:, - can_promote_members:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - -i|--can_change_info) - CheckArgType bool "$1" "$2" - can_change_info="$2" - shift 2 - ;; - -p|--can_post_messages) - CheckArgType bool "$1" "$2" - can_post_messages="$2" - shift 2 - ;; - -e|--can_edit_messages) - CheckArgType bool "$1" "$2" - can_edit_messages="$2" - shift 2 - ;; - -d|--can_delete_messages) - CheckArgType bool "$1" "$2" - can_delete_messages="$2" - shift 2 - ;; - -v|--can_invite_users) - CheckArgType bool "$1" "$2" - can_invite_users="$2" - shift 2 - ;; - -r|--can_restrict_members) - CheckArgType bool "$1" "$2" - can_restrict_members="$2" - shift 2 - ;; - -f|--can_pin_messages) - CheckArgType bool "$1" "$2" - can_pin_messages="$2" - shift 2 - ;; - -m|--can_promote_members) - CheckArgType bool "$1" "$2" - can_promote_members="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --user_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${user_id:+-d user_id="$user_id"} \ - ${can_change_info:+-d can_change_info="$can_change_info"} \ - ${can_post_messages:+-d can_post_messages="$can_post_messages"} \ - ${can_edit_messages:+-d can_edit_messages="$can_edit_messages"} \ - ${can_delete_messages:+-d can_delete_messages="$can_delete_messages"} \ - ${can_invite_users:+-d can_invite_users="$can_invite_users"} \ - ${can_restrict_members:+-d can_restrict_members="$can_restrict_members"} \ - ${can_pin_messages:+-d can_pin_messages="$can_pin_messages"} \ - ${can_promote_members:+-d can_promote_members="$can_promote_members"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.exportChatInviteLink() - { - local chat_id jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:' \ - --longoptions 'chat_id:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"}) - - # Testa o retorno do método. - JsonStatus $jq_obj && { - Json '.result' $jq_obj - } || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.sendVideoNote() - { - local chat_id video_note duration length disable_notification \ - reply_to_message_id reply_markup jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:v:t:l:n:r:m:' \ - --longoptions 'chat_id:, - video_note:, - duration:, - length:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -v|--video_note) - CheckArgType file "$1" "$2" - video_note="$2" - shift 2 - ;; - -t|--duration) - CheckArgType int "$1" "$2" - duration="$2" - shift 2 - ;; - -l|--length) - CheckArgType int "$1" "$2" - length="$2" - shift 2 - ;; - -n|--disable_notification) - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -m|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $video_note ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-v, --video_note]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${video_note:+-F video_note="$video_note"} \ - ${duration:+-F duration="$duration"} \ - ${length:+-F length="$length"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Testa o retorno do método. - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - - ShellBot.InlineKeyboardButton() - { - local __button __line __text __url __callback_data \ - __switch_inline_query __switch_inline_query_current_chat \ - __delm - - local __param=$(getopt --name "$FUNCNAME" \ - --options 'b:l:t:u:c:q:s:' \ - --longoptions 'button:, - line:, - text:, - url:, - callback_data:, - switch_inline_query:, - switch_inline_query_chat:' \ - -- "$@") - - eval set -- "$__param" - - while : - do - case $1 in - -b|--button) - # Ponteiro que recebe o endereço de "button" com as definições - # da configuração do botão inserido. - CheckArgType var "$1" "$2" - __button="$2" - shift 2 - ;; - -l|--line) - CheckArgType int "$1" "$2" - __line="$2" - shift 2 - ;; - -t|--text) - __text="$2" - shift 2 - ;; - -u|--url) - __url="$2" - shift 2 - ;; - -c|--callback_data) - __callback_data="$2" - shift 2 - ;; - -q|--switch_inline_query) - __switch_inline_query="$2" - shift 2 - ;; - -s|--switch_inline_query_current_chat) - __switch_inline_query_current_chat="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $__button ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-b, --button]" - [[ $__text ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-t, --text]" - [[ $__callback_data ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --callback_data]" - [[ $__line ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-l, --line]" - - # Inicializa a variável armazenada em button, definindo seu - # escopo como global, tornando-a visível em todo o projeto (source) - # O ponteiro button recebe o endereço do botão armazenado. - declare -n __button # Ponteiro - - # Abre o array para receber o novo objeto - __button[$__line]="${__button[$__line]#[}" - __button[$__line]="${__button[$__line]%]}" - - # Verifica se já existe um botão na linha especificada. - [[ ${__button[$__line]} ]] && __delm=',' - - # Salva as configurações do botão. - # - # Obrigatório: text, callback_data - # Opcional: url, switch_inline_query, switch_inline_query_current_chat - __button[$__line]+="$__delm{ - \"text\":\"$__text\", - \"callback_data\":\"$__callback_data\" - ${__url:+,\"url\":\"$__url\"} - ${__switch_inline_query:+,\"switch_inline_query\":\"$__switch_inline_query\"} - ${__switch_inline_query_current_chat:+,\"switch_inline_query_current_chat\":\"$__switch_inline_query_current_chat\"} - }" || return 1 # Erro ao salvar o botão. - - # Fecha o array - __button[$__line]="${__button[$__line]/#/[}" - __button[$__line]="${__button[$__line]/%/]}" - - # retorno - return 0 - } - - ShellBot.InlineKeyboardMarkup() - { - local __button __keyboard - - local __param=$(getopt --name "$FUNCNAME" \ - --options 'b:' \ - --longoptions 'button:' \ - -- "$@") - - eval set -- "$__param" - - while : - do - case $1 in - -b|--button) - # Ponteiro que recebe o endereço da variável "teclado" com as definições - # de configuração do botão inserido. - CheckArgType var "$1" "$2" - __button="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $__button ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-b, --button]" - - # Ponteiro - declare -n __button - - # Salva todos elementos do array do teclado, convertendo-o em uma variável de índice 0. - # Cria-se uma estrutura do tipo 'inline_keyboard' e anexa os botões e fecha a estrutura. - # O ponteiro matriz é limpo para receber a nova estrutura contendo o layout do objeto. - # O tipo 'inline_keyboard' é definido, adicionando os botões separando-os pelo delimitador - # ',' vírgula. A posição dos botões é determinada pelo índice da linha na inicilização. - # - # Exemplo: - # - # Linha array - # - # 1 [inline_botao1] [inline_botao2] [inline_botao3] - # 2 [inline_botao4] [inline_botao5] - # 3 [inline_botao7] - - __keyboard="${__button[@]}" || return 1 - - # Cria estrutura do teclado - __keyboard="${__keyboard/#/{\"inline_keyboard\":[}" - __keyboard="${__keyboard//]/],}" - __keyboard="${__keyboard%,}" - __keyboard="${__keyboard/%/]\}}" - - # Retorna a estrutura - echo $__keyboard - - # status - return 0 - } - - ShellBot.answerCallbackQuery() - { - local callback_query_id text show_alert url cache_time jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:t:s:u:e:' \ - --longoptions 'callback_query_id:, - text:, - show_alert:, - url:, - cache_time:' \ - -- "$@") - - - eval set -- "$param" - - while : - do - case $1 in - -c|--callback_query_id) - callback_query_id="$2" - shift 2 - ;; - -t|--text) - text="$2" - shift 2 - ;; - -s|--show_alert) - # boolean - CheckArgType bool "$1" "$2" - show_alert="$2" - shift 2 - ;; - -u|--url) - url="$2" - shift 2 - ;; - -e|--cache_time) - # inteiro - CheckArgType int "$1" "$2" - cache_time="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $callback_query_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --callback_query_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${callback_query_id:+-d callback_query_id="$callback_query_id"} \ - ${text:+-d text="$text"} \ - ${show_alert:+-d show_alert="$show_alert"} \ - ${url:+-d url="$url"} \ - ${cache_time:+-d cache_time="$cache_time"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - return $? - } - - # Cria objeto que representa um teclado personalizado com opções de resposta - ShellBot.ReplyKeyboardMarkup() - { - # Variáveis locais - local __button __resize_keyboard __on_time_keyboard __selective - - # Lê os parâmetros da função. - local __param=$(getopt --name "$FUNCNAME" \ - --options 'b:r:t:s:' \ - --longoptions 'button:, - resize_keyboard:, - one_time_keyboard:, - selective:' \ - -- "$@") - - # Transforma os parâmetros da função em parâmetros posicionais - # - # Exemplo: - # --param1 arg1 --param2 arg2 --param3 arg3 ... - # $1 $2 $3 - eval set -- "$__param" - - # Aguarda leitura dos parâmetros - while : - do - # Lê o parâmetro da primeira posição "$1"; Se for um parâmetro válido, - # salva o valor do argumento na posição '$2' e desloca duas posições a esquerda (shift 2); Repete o processo - # até que o valor de '$1' seja igual '--' e finaliza o loop. - case $1 in - -b|--button) - CheckArgType var "$1" "$2" - __button="$2" - shift 2 - ;; - -r|--resize_keyboard) - # Tipo: boolean - CheckArgType bool "$1" "$2" - __resize_keyboard="$2" - shift 2 - ;; - -t|--one_time_keyboard) - # Tipo: boolean - CheckArgType bool "$1" "$2" - __on_time_keyboard="$2" - shift 2 - ;; - -s|--selective) - # Tipo: boolean - CheckArgType bool "$1" "$2" - __selective="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Imprime mensagem de erro se o parâmetro obrigatório for omitido. - [[ $__button ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-b, --button]" - - # Ponteiro - declare -n __button - - # Constroi a estrutura dos objetos + array keyboard, define os valores e salva as configurações. - # Por padrão todos os valores são 'false', até que seja definido. - cat << _EOF -{"keyboard":$__button, -"resize_keyboard":${__resize_keyboard:-false}, -"one_time_keyboard":${__on_time_keyboard:-false}, -"selective": ${__selective:-false}} -_EOF - - # status - return 0 - } - - # Envia mensagens - ShellBot.sendMessage() - { - # Variáveis locais - local chat_id text parse_mode disable_web_page_preview - local disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:t:p:w:n:r:k:' \ - --longoptions 'chat_id:, - text:, - parse_mode:, - disable_web_page_preview:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -t|--text) - text="$2" - shift 2 - ;; - -p|--parse_mode) - # Tipo: "markdown" ou "html" - CheckArgType parsemode "$1" "$2" - parse_mode="$2" - shift 2 - ;; - -w|--disable_web_page_preview) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_web_page_preview="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $text ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-t, --text]" - - # Chama o método da API, utilizando o comando request especificado; Os parâmetros - # e valores são passados no form e lidos pelo método. O retorno do método é redirecionado para o arquivo 'update.Json'. - # Variáveis com valores nulos são ignoradas e consequentemente os respectivos parâmetros omitidos. - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${text:+-d text="$text"} \ - ${parse_mode:+-d parse_mode="$parse_mode"} \ - ${disable_web_page_preview:+-d disable_web_page_preview="$disable_web_page_preview"} \ - ${disable_notification:+-d disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-d reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-d reply_markup="$reply_markup"}) - - # Testa o retorno do método. - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - # Função para reencaminhar mensagens de qualquer tipo. - ShellBot.forwardMessage() - { - # Variáveis locais - local chat_id form_chat_id disable_notification message_id jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:f:n:m:' \ - --longoptions 'chat_id:, - from_chat_id:, - disable_notification:, - message_id:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -f|--from_chat_id) - from_chat_id="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -m|--message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - message_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $from_chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-f, --from_chat_id]" - [[ $message_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --message_id]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${from_chat_id:+-d from_chat_id="$from_chat_id"} \ - ${disable_notification:+-d disable_notification="$disable_notification"} \ - ${message_id:+-d message_id="$message_id"}) - - # Retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # status - return $? - } - - # Utilize essa função para enviar fotos. - ShellBot.sendPhoto() - { - # Variáveis locais - local chat_id photo caption disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:p:t:n:r:k:' \ - --longoptions 'chat_id:, - photo:, - caption:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -p|--photo) - CheckArgType file "$1" "$2" - photo="$2" - shift 2 - ;; - -t|--caption) - # Limite máximo de caracteres: 200 - caption="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $photo ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-p, --photo]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${photo:+-F photo="$photo"} \ - ${caption:+-F caption="$caption"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - # Utilize essa função para enviar arquivos de audio. - ShellBot.sendAudio() - { - # Variáveis locais - local chat_id audio caption duration performer title disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:a:t:d:e:i:n:r:k' \ - --longoptions 'chat_id:, - audio:, - caption:, - duration:, - performer:, - title:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -a|--audio) - CheckArgType file "$1" "$2" - audio="$2" - shift 2 - ;; - -t|--caption) - caption="$2" - shift 2 - ;; - -d|--duration) - # Tipo: inteiro - CheckArgType int "$1" "$2" - duration="$2" - shift 2 - ;; - -e|--performer) - performer="$2" - shift 2 - ;; - -i|--title) - title="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $audio ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-a, --audio]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${audio:+-F audio="$audio"} \ - ${caption:+-F caption="$caption"} \ - ${duration:+-F duration="$duration"} \ - ${performer:+-F performer="$performer"} \ - ${title:+-F title="$title"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - - } - - # Utilize essa função para enviar documentos. - ShellBot.sendDocument() - { - # Variáveis locais - local chat_id document caption disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:d:t:n:r:k:' \ - --longoptions 'chat_id:, - document:, - caption:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -d|--document) - CheckArgType file "$1" "$2" - document="$2" - shift 2 - ;; - -t|--caption) - caption="$2" - shift 2 - ;; - -n|--disable_notification) - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_MARKUP="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $document ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-d, --document]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${document:+-F document="$document"} \ - ${caption:+-F caption="$caption"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - - } - - # Utilize essa função para enviat stickers - ShellBot.sendSticker() - { - # Variáveis locais - local chat_id sticker disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:s:n:r:k:' \ - --longoptions 'chat_id:, - sticker:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -s|--sticker) - CheckArgType file "$1" "$2" - sticker="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $sticker ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --sticker]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${sticker:+-F sticker="$sticker"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.getStickerSet() - { - local name jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'n:' \ - --longoptions 'name:' \ - -- "$@") - - # parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -n|--name) - name="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $name ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-n, --name]" - - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${name:+-d name="$name"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.uploadStickerFile() - { - local user_id png_sticker jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'u:s:' \ - --longoptions 'user_id:, - png_sticker:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - -s|--png_sticker) - CheckArgType file "$1" "$2" - png_sticker="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-u, --user_id]" - [[ $png_sticker ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --png_sticker]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${user_id:+-F user_id="$user_id"} \ - ${png_sticker:+-F png_sticker="$png_sticker"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - - } - - ShellBot.setStickerPositionInSet() - { - local sticker position jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 's:p:' \ - --longoptions 'sticker:, - position:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -s|--sticker) - sticker="$2" - shift 2 - ;; - -p|--position) - CheckArgType int "$1" "$2" - position="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $sticker ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --sticker]" - [[ $position ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-p, --position]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${sticker:+-d sticker="$sticker"} \ - ${position:+-d position="$position"}) - - # Testa o retorno do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - - } - - ShellBot.deleteStickerFromSet() - { - local sticker jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 's:' \ - --longoptions 'sticker:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -s|--sticker) - sticker="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $sticker ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --sticker]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${sticker:+-d sticker="$sticker"}) - - # Testa o retorno do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - - } - - ShellBot.stickerMaskPosition() - { - - local point x_shift y_shift scale zoom - - local param=$(getopt --name "$FUNCNAME" \ - --options 'p:x:y:s:z:' \ - --longoptions 'point:, - x_shift:, - y_shift:, - scale:, - zoom:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -p|--point) - CheckArgType point "$1" "$2" - point="$2" - shift 2 - ;; - -x|--x_shift) - CheckArgType float "$1" "$2" - x_shift="$2" - shift 2 - ;; - -y|--y_shift) - CheckArgType float "$1" "$2" - y_shift="$2" - shift 2 - ;; - -s|--scale) - CheckArgType float "$1" "$2" - scale="$2" - shift 2 - ;; - -z|--zoom) - CheckArgType float "$1" "$2" - zoom="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $point ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-p, --point]" - [[ $x_shift ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-x, --x_shift]" - [[ $y_shift ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-y, --y_shift]" - [[ $scale ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --scale]" - [[ $zoom ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-z, --zoom]" - - cat << _EOF -{ "point": "$point", "x_shift": $x_shift, "y_shift": $y_shift, "scale": $scale, "zoom": $zoom } -_EOF - - return 0 - - } - - ShellBot.createNewStickerSet() - { - local user_id name title png_sticker emojis contains_masks mask_position jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'u:n:t:s:e:c:m:' \ - --longoptions 'user_id:, - name:, - title:, - png_sticker:, - emojis:, - contains_mask:, - mask_position:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - -n|--name) - name="$2" - shift 2 - ;; - -t|--title) - title="$2" - shift 2 - ;; - -s|--png_sticker) - CheckArgType file "$1" "$2" - png_sticker="$2" - shift 2 - ;; - -e|--emojis) - emojis="$2" - shift 2 - ;; - -c|--contains_masks) - CheckArgType bool "$1" "$2" - contains_masks="$2" - shift 2 - ;; - -m|--mask_position) - mask_position="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-u, --user_id]" - [[ $name ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-n, --name]" - [[ $title ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-t, --title]" - [[ $png_sticker ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --png_sticker]" - [[ $emojis ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-e, --emojis]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${user_id:+-F user_id="$user_id"} \ - ${name:+-F name="$name"} \ - ${title:+-F title="$title"} \ - ${png_sticker:+-F png_sticker="$png_sticker"} \ - ${emojis:+-F emojis="$emojis"} \ - ${contains_masks:+-F contains_masks="$contains_masks"} \ - ${mask_position:+-F mask_position="$mask_position"}) - - # Testa o retorno do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - - } - - ShellBot.addStickerToSet() - { - local user_id name png_sticker emojis mask_position jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'u:n:s:e:m:' \ - --longoptions 'user_id:, - name:, - png_sticker:, - emojis:, - mask_position:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - -n|--name) - name="$2" - shift 2 - ;; - -s|--png_sticker) - CheckArgType file "$1" "$2" - png_sticker="$2" - shift 2 - ;; - -e|--emojis) - emojis="$2" - shift 2 - ;; - -m|--mask_position) - mask_position="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-u, --user_id]" - [[ $name ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-n, --name]" - [[ $png_sticker ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --png_sticker]" - [[ $emojis ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-e, --emojis]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${user_id:+-F user_id="$user_id"} \ - ${name:+-F name="$name"} \ - ${png_sticker:+-F png_sticker="$png_sticker"} \ - ${emojis:+-F emojis="$emojis"} \ - ${mask_position:+-F mask_position="$mask_position"}) - - # Testa o retorno do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - - } - - # Função para enviar arquivos de vídeo. - ShellBot.sendVideo() - { - # Variáveis locais - local chat_id video duration width height caption disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:v:d:w:h:t:n:r:k:' \ - --longoptions 'chat_id:, - video:, - duration:, - width:, - height:, - caption:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -v|--video) - CheckArgType file "$1" "$2" - video="$2" - shift 2 - ;; - -d|--duration) - # Tipo: inteiro - CheckArgType int "$1" "$2" - duration="$2" - shift 2 - ;; - -w|--width) - # Tipo: inteiro - CheckArgType int "$1" "$2" - width="$2" - shift 2 - ;; - -h|--height) - # Tipo: inteiro - CheckArgType int "$1" "$2" - height="$2" - shift 2 - ;; - -t|--caption) - caption="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $video ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-v, --video]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${video:+-F video="$video"} \ - ${duration:+-F duration="$duration"} \ - ${width:+-F width="$width"} \ - ${height:+-F height="$height"} \ - ${caption:+-F caption="$caption"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - - } - - # Função para enviar audio. - ShellBot.sendVoice() - { - # Variáveis locais - local chat_id voice caption duration disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:v:t:d:n:r:k:' \ - --longoptions 'chat_id:, - voice:, - caption:, - duration:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -v|--voice) - CheckArgType file "$1" "$2" - voice="$2" - shift 2 - ;; - -t|--caption) - caption="$2" - shift 2 - ;; - -d|--duration) - # Tipo: inteiro - CheckArgType int "$1" "$2" - duration="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $voice ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-v, --voice]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${voice:+-F voice="$voice"} \ - ${caption:+-F caption="$caption"} \ - ${duration:+-F duration="$duration"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - - } - - # Função utilizada para enviar uma localidade utilizando coordenadas de latitude e longitude. - ShellBot.sendLocation() - { - # Variáveis locais - local chat_id latitude longitude live_period - local disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:l:g:p:n:r:k:' \ - --longoptions 'chat_id:, - latitude:, - longitude:, - live_period:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -l|--latitude) - # Tipo: float - CheckArgType float "$1" "$2" - latitude="$2" - shift 2 - ;; - -g|--longitude) - # Tipo: float - CheckArgType float "$1" "$2" - longitude="$2" - shift 2 - ;; - -p|--live_period) - CheckArgType int "$1" "$2" - live_period="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $latitude ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-l, --latitude]" - [[ $longitude ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-g, --longitude]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${latitude:+-F latitude="$latitude"} \ - ${longitude:+-F longitude="$longitude"} \ - ${live_period:+-F live_period="$live_period"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - - } - - # Função utlizada para enviar detalhes de um local. - ShellBot.sendVenue() - { - # Variáveis locais - local chat_id latitude longitude title address foursquare_id disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:l:g:i:a:f:n:r:k:' \ - --longoptions 'chat_id:, - latitude:, - longitude:, - title:, - address:, - foursquare_id:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -l|--latitude) - # Tipo: float - CheckArgType float "$1" "$2" - latitude="$2" - shift 2 - ;; - -g|--longitude) - # Tipo: float - CheckArgType float "$1" "$2" - longitude="$2" - shift 2 - ;; - -i|--title) - title="$2" - shift 2 - ;; - -a|--address) - address="$2" - shift 2 - ;; - -f|--foursquare_id) - foursquare_id="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $latitude ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-l, --latitude]" - [[ $longitude ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-g, --longitude]" - [[ $title ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-i, --title]" - [[ $address ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-a, --address]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${latitude:+-F latitude="$latitude"} \ - ${longitude:+-F longitude="$longitude"} \ - ${title:+-F title="$title"} \ - ${address:+-F address="$address"} \ - ${foursquare_id:+-F foursquare_id="$foursquare_id"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - # Utilize essa função para enviar um contato + numero - ShellBot.sendContact() - { - # Variáveis locais - local chat_id phone_number first_name last_name disable_notification reply_to_message_id reply_markup jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:p:f:l:n:r:k:' \ - --longoptions 'chat_id:, - phone_number:, - first_name:, - last_name:, - disable_notification:, - reply_to_message_id:, - reply_markup:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -p|--phone_number) - phone_number="$2" - shift 2 - ;; - -f|--first_name) - first_name="$2" - shift 2 - ;; - -l|--last_name) - last_name="$2" - shift 2 - ;; - -n|--disable_notification) - # Tipo: boolean - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - # Tipo: inteiro - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - -k|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $phone_number ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-p, --phone_number]" - [[ $first_name ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-f, --first_name]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${phone_number:+-F phone_number="$phone_number"} \ - ${first_name:+-F first_name="$first_name"} \ - ${last_name:+-F last_name="$last_name"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"} \ - ${reply_markup:+-F reply_markup="$reply_markup"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - # Envia uma ação para bot. - ShellBot.sendChatAction() - { - # Variáveis locais - local chat_id action jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:a:' \ - --longoptions 'chat_id:, - action:' \ - -- "$@") - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -a|--action) - [[ $2 =~ ^(typing|upload_photo|record_video|upload_video| - record_audio|upload_audio|upload_document| - find_location|record_video_note|upload_video_note)$ ]] || \ - # erro - MessageError API "$_ERR_ACTION_MODE_" "$1" "$2" - action="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $action ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-a, --action]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${action:+-d action="$action"}) - - # Testa o retorno do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - # Utilize essa função para obter as fotos de um determinado usuário. - ShellBot.getUserProfilePhotos() - { - # Variáveis locais - local user_id offset limit ind last index max item total jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'u:o:l:' \ - --longoptions 'user_id:, - offset:, - limit:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - -o|--offset) - CheckArgType int "$1" "$2" - offset="$2" - shift 2 - ;; - -l|--limit) - CheckArgType int "$1" "$2" - limit="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-u, --user_id]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${user_id:+-d user_id="$user_id"} \ - ${offset:+-d offset="$offset"} \ - ${limit:+-d limit="$limit"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - - total=$(Json '.result.total_count' $jq_obj) - - if [[ $total -gt 0 ]]; then - for index in $(seq 0 $((total-1))) - do - max=$(Json ".result.photos[$index]|length" $jq_obj) - for item in $(seq 0 $((max-1))) - do - Json ".result.photos[$index][$item]" $jq_obj | GetObjValue - done - done - fi - - } || MessageError TG $jq_obj - - # Status - return $? - } - - # Função para listar informações do arquivo especificado. - ShellBot.getFile() - { - # Variáveis locais - local file_id jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'f:' \ - --longoptions 'file_id:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -f|--file_id) - file_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parâmetros obrigatórios. - [[ $file_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-f, --file_id]" - - # Chama o método. - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${file_id:+-d file_id="$file_id"}) - - # Testa o retorno do método. - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - # Essa função kicka o usuário do chat ou canal. (somente administradores) - ShellBot.kickChatMember() - { - # Variáveis locais - local chat_id user_id until_date jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:u:d:' \ - --longoptions 'chat_id:, - user_id:, - until_date:' \ - -- "$@") - - # Define os parâmetros posicionais - eval set -- "$param" - - # Trata os parâmetros - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - -d|--until_date) - CheckArgType int "$1" "$2" - until_date="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - # Parametros obrigatórios. - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-u, --user_id]" - - # Chama o método - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${user_id:+-d user_id="$user_id"} \ - ${until_date:+-d until_date="$until_date"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - # Status - return $? - } - - # Utilize essa função para remove o bot do grupo ou canal. - ShellBot.leaveChat() - { - # Variáveis locais - local chat_id jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:' \ - --longoptions 'chat_id:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - return $? - - } - - ShellBot.unbanChatMember() - { - local chat_id user_id jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:u:' \ - --longoptions 'chat_id:, - user_id:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-u, --user_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${user_id:+-d user_id="$user_id"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - return $? - } - - ShellBot.getChat() - { - # Variáveis locais - local chat_id jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:' \ - --longoptions 'chat_id:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.getChatAdministrators() - { - local chat_id total key index jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:' \ - --longoptions 'chat_id:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - - # Total de administratores - declare -i total=$(Json '.result|length' $jq_obj) - - # Lê os administradores do grupo se houver. - if [ $total -gt 0 ]; then - for index in $(seq 0 $((total-1))) - do - Json ".result[$index]" $jq_obj | GetObjValue - done - fi - - } || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.getChatMembersCount() - { - local chat_id jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:' \ - --longoptions 'chat_id:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj - } || MessageError TG $jq_obj - - return $? - } - - ShellBot.getChatMember() - { - # Variáveis locais - local chat_id user_id jq_obj - - # Lê os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:u:' \ - --longoptions 'chat_id:, - user_id:' \ - -- "$@") - - - # Define os parâmetros posicionais - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -u|--user_id) - CheckArgType int "$1" "$2" - user_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $user_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-u, --user_id]" - - jq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${user_id:+-d user_id="$user_id"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - } - - ShellBot.editMessageText() - { - local chat_id message_id inline_message_id text parse_mode disable_web_page_preview reply_markup jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:m:i:t:p:w:r:' \ - --longoptions 'chat_id:, - message_id:, - inline_message_id:, - text:, - parse_mode:, - disable_web_page_preview:, - reply_markup:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -m|--message_id) - CheckArgType int "$1" "$2" - message_id="$2" - shift 2 - ;; - -i|--inline_message_id) - CheckArgType int "$1" "$2" - inline_message_id="$2" - shift 2 - ;; - -t|--text) - text="$2" - shift 2 - ;; - -p|--parse_mode) - CheckArgType parsemode "$1" "$2" - parse_mode="$2" - shift 2 - ;; - -w|--disable_web_page_preview) - CheckArgType bool "$1" "$2" - disable_web_page_preview="$2" - shift 2 - ;; - -r|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $text ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-t, --text]" - [[ $inline_message_id ]] && unset chat_id message_id || { - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $message_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --message_id]" - } - - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${message_id:+-d message_id="$message_id"} \ - ${inline_message_id:+-d inline_message_id="$inline_message_id"} \ - ${text:+-d text="$text"} \ - ${parse_mode:+-d parse_mode="$parse_mode"} \ - ${disable_web_page_preview:+-d disable_web_page_preview="$disable_web_page_preview"} \ - ${reply_markup:+-d reply_markup="$reply_markup"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - - } - - ShellBot.editMessageCaption() - { - local chat_id message_id inline_message_id caption reply_markup jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:m:i:t:r:' \ - --longoptions 'chat_id:, - message_id:, - inline_message_id:, - caption:, - reply_markup:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -m|--message_id) - CheckArgType int "$1" "$2" - message_id="$2" - shift 2 - ;; - -i|--inline_message_id) - CheckArgType int "$1" "$2" - inline_message_id="$2" - shift 2 - ;; - -t|--caption) - caption="$2" - shift 2 - ;; - -r|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $message_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --message_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${message_id:+-d message_id="$message_id"} \ - ${inline_message_id:+-d inline_message_id="$inline_message_id"} \ - ${caption:+-d caption="$caption"} \ - ${reply_markup:+-d reply_markup="$reply_markup"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - - } - - ShellBot.editMessageReplyMarkup() - { - local chat_id message_id inline_message_id reply_markup jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:m:i:r:' \ - --longoptions 'chat_id:, - message_id:, - inline_message_id:, - reply_markup:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -m|--message_id) - CheckArgType int "$1" "$2" - message_id="$2" - shift 2 - ;; - -i|--inline_message_id) - CheckArgType int "$1" "$2" - inline_message_id="$2" - shift 2 - ;; - -r|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $inline_message_id ]] && unset chat_id message_id || { - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $message_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --message_id]" - } - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${message_id:+-d message_id="$message_id"} \ - ${inline_message_id:+-d inline_message_id="$inline_message_id"} \ - ${reply_markup:+-d reply_markup="$reply_markup"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - - } - - ShellBot.deleteMessage() - { - local chat_id message_id jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:m:' \ - --longoptions 'chat_id:, - message_id:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -m|--message_id) - CheckArgType int "$1" "$2" - message_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $message_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --message_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${message_id:+-d message_id="$message_id"}) - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj || MessageError TG $jq_obj - - return $? - - } - - ShellBot.downloadFile() { - - local file_id file_info file_remote file_path filename dir opt ext - local uri="https://api.telegram.org/file/bot$_TOKEN_" - - local param=$(getopt --name "$FUNCNAME" \ - --options 'f:d:' \ - --longoptions 'file_id:, - dir:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -f|--file_id) - opt="$1" - file_id="$2" - shift 2 - ;; - -d|--dir) - [[ -d $2 ]] && { - [[ -w $2 ]] || MessageError API "$_ERR_DIR_WRITE_DENIED_" "$1" "$2" - } || MessageError API "$_ERR_DIR_NOT_FOUND_" "$1" "$2" - dir="${2%/}" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $file_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-f, --file_id]" - [[ $dir ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-d, --dir]" - - if file_info=$(ShellBot.getFile --file_id "$file_id" 2>/dev/null); then - - file_remote="$(echo $file_info | cut -d'|' -f3)" - file_info="$(echo $file_info | cut -d'|' -f-2)" - filename=${file_remote##*/} - ext="${filename##*.}" - - file_path="$(mktemp -u --tmpdir="$dir" "file$(date +%d%m%Y%H%M%S)-XXXXX${ext:+.$ext}")" - - if wget "$uri/$file_remote" -O "$file_path" &>/dev/null; then - echo "$file_info|$file_path" - else - MessageError API "$_ERR_FILE_DOWNLOAD_" "$opt" "$file_remote" - fi - else - MessageError API "$_ERR_FILE_INVALID_ID_" "$opt" "$file_id" - fi - - return $? - } - - ShellBot.editMessageLiveLocation() - { - local chat_id message_id inline_message_id - local latitude longitude reply_markup jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:m:i:l:g:r:' \ - --longoptions 'chat_id:, - message_id:, - inline_message_id:, - latitude:, - longitude:, - reply_markup:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -m|--message_id) - CheckArgType int "$1" "$2" - message_id="$2" - shift 2 - ;; - -i|--inline_message_id) - CheckArgType int "$1" "$2" - inline_message_id="$2" - shift 2 - ;; - -l|--latitude) - # Tipo: float - CheckArgType float "$1" "$2" - latitude="$2" - shift 2 - ;; - -g|--longitude) - # Tipo: float - CheckArgType float "$1" "$2" - longitude="$2" - shift 2 - ;; - -r|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $inline_message_id ]] && unset chat_id message_id || { - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $message_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --message_id]" - } - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${message_id:+-d message_id="$message_id"} \ - ${inline_message_id:+-d inline_message_id="$inline_message_id"} \ - ${latitude:+-d latitude="$latitude"} \ - ${longitude:+-d longitude="$longitude"} \ - ${reply_markup:+-d reply_markup="$reply_markup"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - } - - ShellBot.stopMessageLiveLocation() - { - local chat_id message_id inline_message_id reply_markup jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:m:i:r:' \ - --longoptions 'chat_id:, - message_id:, - inline_message_id:, - reply_markup:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -m|--message_id) - CheckArgType int "$1" "$2" - message_id="$2" - shift 2 - ;; - -i|--inline_message_id) - CheckArgType int "$1" "$2" - inline_message_id="$2" - shift 2 - ;; - -r|--reply_markup) - reply_markup="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $inline_message_id ]] && unset chat_id message_id || { - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $message_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --message_id]" - } - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${message_id:+-d message_id="$message_id"} \ - ${inline_message_id:+-d inline_message_id="$inline_message_id"} \ - ${reply_markup:+-d reply_markup="$reply_markup"}) - - # Testa o retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - return $? - } - - ShellBot.setChatStickerSet() - { - local chat_id sticker_set_name jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:s:' \ - --longoptions 'chat_id:, - sticker_set_name:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -s|--sticker_set_name) - sticker_set_name="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $sticker_set_name ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-s, --sticker_set_name]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"} \ - ${sticker_set_name:+-d sticker_set_name="$sticker_set_name"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - return $? - } - - ShellBot.deleteChatStickerSet() - { - local chat_id jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:' \ - --longoptions 'chat_id:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id="$chat_id"}) - - JsonStatus $jq_obj || MessageError TG $jq_obj - - return $? - } - - ShellBot.inputMediaPhoto() - { - local __media __caption __album __delm - - local __param=$(getopt --name "$FUNCNAME" \ - --options 'a:m:c:' \ - --longoptions 'album:, - media:, - caption:' \ - -- "$@") - - - eval set -- "$__param" - - while : - do - case $1 in - -a|--album) - CheckArgType var "$1" "$2" - __album="$2" - shift 2 - ;; - -m|--media) - CheckArgType file "$1" "$2" - __media="$2" - shift 2 - ;; - -c|--caption) - __caption="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $__album ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-a, --album]" - [[ $__media ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --media]" - - declare -n __album - - __album=${__album#[} - __album=${__album%]} - - [[ $__album ]] && __delm=',' - - __album+="$__delm{\"type\":\"photo\"," - __album+="\"media\":\"$__media\"" - __album+="${__caption:+,\"caption\":\"$__caption\"}}" - - __album=${__album/#/[} - __album=${__album/%/]} - - return 0 - } - - ShellBot.inputMediaVideo() - { - local __media __album __delm - local __width __height __duration __caption - - local __param=$(getopt --name "$FUNCNAME" \ - --options 'a:m:c:w:h:d:' \ - --longoptions 'album:, - media:, - caption:, - width:, - height:, - duration:' \ - -- "$@") - - - eval set -- "$__param" - - while : - do - case $1 in - -a|--album) - CheckArgType var "$1" "$2" - __album="$2" - shift 2 - ;; - -m|--media) - CheckArgType file "$1" "$2" - __media="$2" - shift 2 - ;; - -c|--caption) - __caption="$2" - shift 2 - ;; - -w|--width) - CheckArgType int "$1" "$2" - __width="$2" - shift 2 - ;; - -h|--height) - CheckArgType int "$1" "$2" - __height="$2" - shift 2 - ;; - -d|--duration) - CheckArgType int "$1" "$2" - __duration="$2" - shift 2 - ;; - --) - shift - break - ;; - esac - done - - [[ $__album ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-a, --album]" - [[ $__media ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --media]" - - declare -n __album - - __album=${__album#[} - __album=${__album%]} - - [[ $__album ]] && __delm=',' - - __album+="$__delm{\"type\":\"video\"," - __album+="\"media\":\"$__media\"" - __album+="${__caption:+,\"caption\":\"$__caption\"}" - __album+="${__width:+,\"width\":$__width}" - __album+="${__height:+,\"height\":$__height}" - __album+="${__duration:+,\"duration\":$__duration}}" - - __album=${__album/#/[} - __album=${__album/%/]} - - return 0 - } - - ShellBot.sendMediaGroup() - { - local chat_id media disable_notification reply_to_message_id jq_obj - - local param=$(getopt --name "$FUNCNAME" \ - --options 'c:m:n:r:' \ - --longoptions 'chat_id:, - media:, - disable_notification:, - reply_to_message_id:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -c|--chat_id) - chat_id="$2" - shift 2 - ;; - -m|--media) - media="$2" - shift 2 - ;; - -n|--disable_notification) - CheckArgType bool "$1" "$2" - disable_notification="$2" - shift 2 - ;; - -r|--reply_to_message_id) - CheckArgType int "$1" "$2" - reply_to_message_id="$2" - shift 2 - ;; - --) - shift - break - esac - done - - [[ $chat_id ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-c, --chat_id]" - [[ $media ]] || MessageError API "$_ERR_PARAM_REQUIRED_" "[-m, --media]" - - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-F chat_id="$chat_id"} \ - ${media:+-F media="$media"} \ - ${disable_notification:+-F disable_notification="$disable_notification"} \ - ${reply_to_message_id:+-F reply_to_message_id="$reply_to_message_id"}) - - # Retorno do método - JsonStatus $jq_obj && { - Json '.result' $jq_obj | GetObjValue - } || MessageError TG $jq_obj - - # Status - return $? - } - - ShellBot.getUpdates() - { - local total_keys offset limit timeout allowed_updates jq_obj - - # Define os parâmetros da função - local param=$(getopt --name "$FUNCNAME" \ - --options 'o:l:t:a:' \ - --longoptions 'offset:, - limit:, - timeout:, - allowed_updates:' \ - -- "$@") - - eval set -- "$param" - - while : - do - case $1 in - -o|--offset) - CheckArgType int "$1" "$2" - offset="$2" - shift 2 - ;; - -l|--limit) - CheckArgType int "$1" "$2" - limit="$2" - shift 2 - ;; - -t|--timeout) - CheckArgType int "$1" "$2" - timeout="$2" - shift 2 - ;; - -a|--allowed_updates) - allowed_updates="$2" - shift 2 - ;; - --) - # Se não houver mais parâmetros - shift - break - ;; - esac - done - - # Seta os parâmetros - jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${offset:+-d offset="$offset"} \ - ${limit:+-d limit="$limit"} \ - ${timeout:+-d timeout="$timeout"} \ - ${allowed_updates:+-d allowed_updates="$allowed_updates"}) - - # Limpa as variáveis inicializadas. - unset ${_var_init_list_[@]} - unset _var_init_list_ - - declare -ag _var_init_list_ - - # Verifica se ocorreu erros durante a chamada do método - JsonStatus $jq_obj && { - - # Se o modo flush estiver ativado, retorna uma coleção de objetos Json contendo as atualizações. - ((_FLUSH_OFFSET_)) && { echo "$jq_obj"; return 0; } - - local key key_list obj obj_cur obj_type var_name i - - # Total de atualizações - total_keys=$(Json '.result|length' $jq_obj) - - if [[ $total_keys -gt 0 ]]; then - - # Modo monitor - ((_BOT_MONITOR_)) && cat << _eof -=================== MONITOR =================== -Data: $(date '+%d/%m/%Y %T') -Script: $_BOT_SCRIPT_ -Bot (nome): $(ShellBot.first_name) -Bot (usuario): $(ShellBot.username) -Bot (id): $(ShellBot.id) -_eof - - # Salva e fecha o descritor de erro - exec 5<&2 - exec 2<&- - - for index in $(seq 0 $((total_keys-1))) - do - # Imprime a mensagem em fila - ((_BOT_MONITOR_)) && cat << _eof ------------------------------------------------ -Mensagem: $((index + 1)) ------------------------------------------------ -_eof - # Insere o primeiro elemento da consulta. - unset key_list - key_list[0]=".result[$index]" - - # Lê recursivamente todos os objetos. - while [[ ${key_list[@]} ]] - do - i=0 - - # Lista objetos. - for key in ${key_list[@]} - do - # Limpa o buffer - unset key_list - - # Lê as chaves do atual objeto - for obj in $(Json "$key|keys[]" $jq_obj) - do - # Se o tipo da chave for string, number ou boolean, imprime o valor armazenado. - # Se for object salva o nível atual em key_list. Caso contrário, lê o próximo - # elemento da lista. - obj_cur="$key.$obj" - obj_type=$(Json "$obj_cur|type" $jq_obj) - - if [[ $obj_type =~ (string|number|boolean) ]]; then - - # Define a nomenclatura válida para a variável que irá armazenar o valor da chave. - var_name=${obj_cur#.result\[$index\].} - var_name=${var_name//[]/} - var_name=${var_name//./_} - - # Cria um ponteiro para a variável armazenada em 'var_name'. - declare -g $var_name - declare -n byref=$var_name - - [[ ${byref[$index]} ]] || { - - # Atribui o valor de 'var_name', se a mesma não foi inicializada. - byref[$index]="$(Json "$obj_cur" $jq_obj)" - - # Exibe a inicialização das variáveis. - ((_BOT_MONITOR_)) && sed ':a;N;s/\n/ /;ta' <<< "$var_name = '${byref[$index]}'" - } - - # Remove ponteiro - declare +n byref - unset byref - - # Anexa a variável a lista caso não exista. - if ! grep -qw $var_name <<< ${_var_init_list_[@]}; then - _var_init_list_+=($var_name); fi - - elif [[ $obj_type = object ]]; then - key_list[$((i++))]=$obj_cur - elif [[ $obj_type = array ]]; then - key_list[$((i++))]=$obj_cur[] - fi - done - done - done - done - - # restaura o descritor de erro - exec 2<&5 - fi - - } || MessageError TG $jq_obj - - # Status - return $? - } - - # Bot métodos (somente leitura) - declare -rf ShellBot.token \ - ShellBot.id \ - ShellBot.username \ - ShellBot.first_name \ - ShellBot.regHandleFunction \ - ShellBot.watchHandle \ - ShellBot.ListUpdates \ - ShellBot.TotalUpdates \ - ShellBot.OffsetEnd \ - ShellBot.OffsetNext \ - ShellBot.getMe \ - ShellBot.getWebhookInfo \ - ShellBot.deleteWebhook \ - ShellBot.setWebhook \ - ShellBot.init \ - ShellBot.ReplyKeyboardMarkup \ - ShellBot.sendMessage \ - ShellBot.forwardMessage \ - ShellBot.sendPhoto \ - ShellBot.sendAudio \ - ShellBot.sendDocument \ - ShellBot.sendSticker \ - ShellBot.sendVideo \ - ShellBot.sendVideoNote \ - ShellBot.sendVoice \ - ShellBot.sendLocation \ - ShellBot.sendVenue \ - ShellBot.sendContact \ - ShellBot.sendChatAction \ - ShellBot.getUserProfilePhotos \ - ShellBot.getFile \ - ShellBot.kickChatMember \ - ShellBot.leaveChat \ - ShellBot.unbanChatMember \ - ShellBot.getChat \ - ShellBot.getChatAdministrators \ - ShellBot.getChatMembersCount \ - ShellBot.getChatMember \ - ShellBot.editMessageText \ - ShellBot.editMessageCaption \ - ShellBot.editMessageReplyMarkup \ - ShellBot.InlineKeyboardMarkup \ - ShellBot.InlineKeyboardButton \ - ShellBot.answerCallbackQuery \ - ShellBot.deleteMessage \ - ShellBot.exportChatInviteLink \ - ShellBot.setChatPhoto \ - ShellBot.deleteChatPhoto \ - ShellBot.setChatTitle \ - ShellBot.setChatDescription \ - ShellBot.pinChatMessage \ - ShellBot.unpinChatMessage \ - ShellBot.promoteChatMember \ - ShellBot.restrictChatMember \ - ShellBot.getStickerSet \ - ShellBot.uploadStickerFile \ - ShellBot.createNewStickerSet \ - ShellBot.addStickerToSet \ - ShellBot.setStickerPositionInSet \ - ShellBot.deleteStickerFromSet \ - ShellBot.stickerMaskPosition \ - ShellBot.downloadFile \ - ShellBot.editMessageLiveLocation \ - ShellBot.stopMessageLiveLocation \ - ShellBot.setChatStickerSet \ - ShellBot.deleteChatStickerSet \ - ShellBot.sendMediaGroup \ - ShellBot.inputMediaPhoto \ - ShellBot.inputMediaVideo \ - ShellBot.getUpdates - - # Retorna objetos - echo "$(ShellBot.id)|$(ShellBot.username)|$(ShellBot.first_name)|$(((_FLUSH_OFFSET_)) && FlushOffset)" - - # status - return 0 -} - -# Funções (somente leitura) -declare -rf MessageError \ - Json \ - JsonStatus \ - GetObjValue \ - FlushOffset \ - CreateUnitService \ - CheckArgType diff --git a/Otros/lista b/Otros/lista deleted file mode 100755 index def0ee7..0000000 --- a/Otros/lista +++ /dev/null @@ -1,17 +0,0 @@ -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/PDirect.py -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/PGet.py -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/POpen.py -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/PPriv.py -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/PPub.py -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/cabecalho -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/fai2ban -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/ferramentas -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/menu -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/menu_credito -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/menu_inst -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/payloads -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/shadowsocks.sh -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/ultrahost -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/usercodes -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/v-local.log -https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/http-server.py diff --git a/Otros/msg b/Otros/msg deleted file mode 100755 index 8064752..0000000 --- a/Otros/msg +++ /dev/null @@ -1,218 +0,0 @@ -#!/bin/bash - -# menu maker (opciones 1, 2, 3,.....) - -flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && cG='/c' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && _kl1='ghkey' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && kL10='tc' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && am1='/e' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•' nib="${am1}${kL10}" -cOpyRig='©' && mbar2=' •••••••••••••••••••••••' - -menu_func(){ - local options=${#@} - local array - for((num=1; num<=$options; num++)); do - echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") " - array=(${!num}) - case ${array[0]} in - "-vd")echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}";; - "-vm")echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}";; - "-fi")echo -e "${array[@]:2} ${array[1]}";; - -bar|-bar2|-bar3|-bar4)echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})";; - *)echo -e "\033[1;37m${array[@]}";; - esac - done - } - - -selection_fun () { -local selection="null" -local range -for((i=0; i<=$1; i++)); do range[$i]="$i "; done -while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do -echo -ne "\033[1;37m ► Opcion : " >&2 -read selection -tput cuu1 >&2 && tput dl1 >&2 -done -echo $selection -} - - -tittle () { -[[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh' - clear&&clear - msg -bar - echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]" - msg -bar -} -in_opcion(){ - unset opcion - if [[ -z $2 ]]; then - msg -nazu " $1: " >&2 - else - msg $1 " $2: " >&2 - fi - read opcion - echo "$opcion" -} -# centrado de texto -print_center(){ - if [[ -z $2 ]]; then - text="$1" - else - col="$1" - text="$2" - fi - - while read line; do - unset space - x=$(( ( 54 - ${#line}) / 2)) - for (( i = 0; i < $x; i++ )); do - space+=' ' - done - space+="$line" - if [[ -z $2 ]]; then - msg -azu "$space" - else - msg "$col" "$space" - fi - done <<< $(echo -e "$text") -} -# titulos y encabesados -title(){ - clear - msg -bar - if [[ -z $2 ]]; then - print_center -azu "$1" - else - print_center "$1" "$2" - fi - msg -bar - } - -# finalizacion de tareas - enter(){ - msg -bar - text="►► Presione enter para continuar ◄◄" - if [[ -z $1 ]]; then - print_center -ama "$text" - else - print_center "$1" "$text" - fi - read - } - -# opcion, regresar volver/atras -back(){ - msg -bar - echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER" - msg -bar - } - -msg () { -local colors="/etc/new-adm-color" -if [[ ! -e $colors ]]; then -COLOR[0]='\033[1;37m' #BRAN='\033[1;37m' -COLOR[1]='\e[31m' #VERMELHO='\e[31m' -COLOR[2]='\e[32m' #VERDE='\e[32m' -COLOR[3]='\e[33m' #AMARELO='\e[33m' -COLOR[4]='\e[34m' #AZUL='\e[34m' -COLOR[5]='\e[35m' #MAGENTA='\e[35m' -COLOR[6]='\033[1;97m' #MAG='\033[1;36m' -COLOR[7]='\033[1;49;95m' -COLOR[8]='\033[1;49;96m' -else -local COL=0 -for number in $(cat $colors); do -case $number in -1)COLOR[$COL]='\033[1;37m';; -2)COLOR[$COL]='\e[31m';; -3)COLOR[$COL]='\e[32m';; -4)COLOR[$COL]='\e[33m';; -5)COLOR[$COL]='\e[34m';; -6)COLOR[$COL]='\e[35m';; -7)COLOR[$COL]='\033[1;36m';; -8)COLOR[$COL]='\033[1;49;95m';; -9)COLOR[$COL]='\033[1;49;96m';; -esac -let COL++ -done -fi -NEGRITO='\e[1m' -SEMCOR='\e[0m' - case $1 in - -ne)cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; - -ama)cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -verm)cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";; - -verm2)cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -aqua)cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -azu)cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -verd)cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -bra)cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}";; - -nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; - -nverd)cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; - -nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; - -verm3)cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";; - -teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -teal2)cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}";; - -blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -blak2)cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}";; - -blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; - -blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}";; - #-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar1)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar2)ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar3)ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - -bar4)ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";; - esac -} - -fun_bar () { -comando[0]="$1" -comando[1]="$2" - ( -[[ -e $HOME/fim ]] && rm $HOME/fim -${comando[0]} -y > /dev/null 2>&1 -${comando[1]} -y > /dev/null 2>&1 -touch $HOME/fim - ) > /dev/null 2>&1 & -echo -ne "\033[1;33m [" -while true; do - for((i=0; i<18; i++)); do - echo -ne "\033[1;31m##" - sleep 0.1s - done - [[ -e $HOME/fim ]] && rm $HOME/fim && break - echo -e "\033[1;33m]" - sleep 1s - tput cuu1 - tput dl1 - echo -ne "\033[1;33m [" -done -echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m" -} - -del(){ - for (( i = 0; i < $1; i++ )); do - tput cuu1 && tput dl1 - done -} - - -[[ -d /bin/ejecutar ]] && { -#[[ ! -e /etc/cghkey ]] && rm -rf /etc/adm-lite -[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Otros/msg -} || mkdir /bin/ejecutar -cor[0]="\033[0m" -cor[1]="\033[1;34m" -cor[2]="\033[1;32m" -cor[3]="\033[1;37m" -cor[4]="\033[1;36m" -cor[5]="\033[1;33m" -cor[6]="\033[1;35m" -export -f msg -export -f fun_bar -export -f tittle -export -f enter -export -f back -export -f print_center -export -f in_opcion -export -f del \ No newline at end of file diff --git a/x.sh b/x.sh deleted file mode 100644 index f5b959d..0000000 --- a/x.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -ruta='/root/dpbt' - -for i in `ls $ruta`; do -dir="$ruta/$i" -for file in `ls $dir`; do -echo -e "[$file]=> $dir" -#sed -i 's;raw.githubusercontent.com\/NetVPS\/Generador-BOT\/main;\/darix.ooguy.com\/drowkid01\/dpbt\/raw\/branch\/main;g' $dir/$file -sed -i 's;\/\/\/;\/\/;g' $dir/$file -sed -i 's;@ChumoGH;@drowkid01;g' $dir/$file -sed -i 's;ChumoGH;drowkid01;g' $dir/$file -chmod +rwx $dir/$file -echo -ne " \e[1;32m [+]" -done -done