telebot.sh.sh 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. [[ -e /etc/adm-lite/ShellBot.sh ]] && rm /etc/adm-lite/ShellBot.sh
  3. [[ -e /etc/adm-lite/ultimatebot ]] && rm /etc/adm-lite/ultimatebot
  4. wget -q -O /etc/adm-lite/ShellBot.sh https://www.dropbox.com/s/mho5ulrxcr3rpcf/ShellBot.sh && chmod +x /etc/adm-lite/ShellBot.sh > /dev/null
  5. #wget -q -O /etc/adm-lite/ShellBot.sh https://raw.githubusercontent.com/ChumoGH/VPSbot/main/ShellBot.sh && chmod +x /etc/adm-lite/ShellBot.sh > /dev/null
  6. #wget -q -O /etc/adm-lite/ultimatebot https://www.dropbox.com/s/6hzvja2mhgknl02/ultimatebot && chmod +x /etc/adm-lite/ultimatebot > /dev/null
  7. wget -q -O /etc/adm-lite/ultimatebot https://www.dropbox.com/s/kqx37io7pdccvou/ultimatebot-ant.sh?dl=0 && chmod +x /etc/adm-lite/ultimatebot > /dev/null
  8. #wget -q -O /etc/adm-lite/bot_codes https://www.dropbox.com/s/wj53654gm0lhuja/bot_codes && chmod +x /etc/adm-lite/bot_codes > /dev/null
  9. wget -q -O /etc/adm-lite/bot_codes https://www.dropbox.com/s/23cjojjxaaun6f1/bot_codes-ant.sh?dl=0 && chmod +x /etc/adm-lite/bot_codes > /dev/null
  10. telegran_bot () {
  11. cd /etc/adm-lite
  12. if [[ "$(ps x | grep "ultimatebot" | grep -v "grep")" = "" ]]; then
  13. echo -e "${barra}"
  14. echo -e " INGRESA TUS CREDENCIALES DE ACCESO AL BOT"
  15. echo -e "${barra}"
  16. read -p " TELEGRAN BOT TOKEN: " tokenxx
  17. read -p " TELEGRAN BOT LOGUIN: " loguin
  18. read -p " TELEGRAN BOT PASS: " pass
  19. #read -p " IDIOMA DEL BOT [ES]: " lang
  20. [[ -z $lang ]] && lang="es"
  21. echo -e "${barra}"
  22. echo -e "${loguin}:${pass}" > ./bottokens
  23. screen -dmS telebotusr bash ./ultimatebot "$tokenxx" "$lang" > /dev/null 2>&1
  24. echo -e " INICIANDO CONFIGURACION DEL BOT, ESPERE"
  25. sleep 2s
  26. [[ $(ps x | grep "ultimatebot" | grep -v "grep" | awk '{print $1}') ]] && echo -e " RUNNING" || echo -e "BOT NO INICIADO"
  27. echo -e "${barra}"
  28. echo -e " COLOCA TUS CREDENCIALES EN EL BOT HACI :"
  29. echo -e " /access $loguin $pass"
  30. echo -e "${barra}"
  31. read -p " PRESIONA ENTER PARA CONTINUAR"
  32. else
  33. kill -9 $(ps x | grep "ultimatebot" | grep -v "grep" | awk '{print $1}') > /dev/null 2>&1
  34. kill $(ps x | grep "telebotusr" | grep -v "grep" | awk '{print $1}') > /dev/null 2>&1
  35. [[ -e ./bottokens ]] && rm ./bottokens
  36. echo -e "${barra}"
  37. echo -e " ESTAMOS DETENIENDO EL BOT"
  38. echo -e "${barra}"
  39. [[ -e /etc/adm-lite/ShellBot.sh ]] && rm /etc/adm-lite/ShellBot.sh
  40. [[ -e /etc/adm-lite/ultimatebot ]] && rm /etc/adm-lite/ultimatebot
  41. [[ -e /etc/adm-lite/bot_codes ]] && rm /etc/adm-lite/bot_codes
  42. fi
  43. cd $HOME
  44. exit
  45. }
  46. telegran_bot
  47. return