botssh


SUBMITTED BY: leandrodts

DATE: June 29, 2022, 9:34 p.m.

UPDATED: June 30, 2022, 1:35 a.m.

FORMAT: Text only

SIZE: 4.4 kB

HITS: 466

  1. #!/bin/bash
  2. clear
  3. #--------@RESURRECTION ssh-----------#
  4. source ShellBot.sh
  5. touch lista
  6. [[ -z $1 ]] && {
  7. clear && echo "INFORME O TOKEN DO BOT" && return 0
  8. }
  9. [[ ! -e RESET ]] && touch RESET
  10. api_bot=$1
  11. ShellBot.init --token "$api_bot" --monitor --flush
  12. ShellBot.username
  13. # - Funcao menu
  14. menu() {
  15. local msg
  16. ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \
  17. --text "πŸ€–" \
  18. msg="________________________________\n"
  19. msg+="<b>|πŸ§‘β€πŸ’» OLA SEJA BEM VINDO(a) πŸ§‘β€πŸ’»|</b>\n"
  20. msg+="—————————————————––\n|😁Gere seu teste agora mesmo!|\n| γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€βŸβŸβŸβŸγ…€βŸ|\n| Esse teste serΓ‘ de apenas 1 h   |\n| γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€γ…€βŸβŸβŸβŸβŸ|\n| Caso goste compre o acesso    |\n| premium que dura o mΓͺs todo. |\n| por apenas πŸ’Έ15,00πŸ˜‰ γ…€γ…€γ…€βŸβŸβŸβŸ|\n—————————————————––\n\nAproveite. πŸ˜‰ ass: @leandrodts"
  21. ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \
  22. --text "$(echo -e $msg)" \
  23. --reply_markup "$keyboard1" \
  24. --parse_mode html
  25. return 0
  26. }
  27. # - funcao criar ssh
  28. criarteste() {
  29. [[ $(grep -wc ${callback_query_from_id} lista) != '0' ]] && {
  30. ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \
  31. --text "😁️ VOCÊ JA CRIOU SEU TESTE HOJE 😁️"
  32. return 0
  33. }
  34. usuario=$(echo teste$(( RANDOM% + 99 )))
  35. senha=$((RANDOM% + 999999))
  36. limite='2'
  37. tempo='1'
  38. tuserdate=$(date '+%C%y/%m/%d' -d " +1 days")
  39. useradd -M -N -s /bin/false $usuario -e $tuserdate > /dev/null 2>&1
  40. (echo "$senha";echo "$senha") | passwd $usuario > /dev/null 2>&1
  41. echo "$senha" > /etc/SSHPlus/senha/$usuario
  42. echo "$usuario $limite" >> /root/usuarios.db
  43. echo "#!/bin/bash
  44. pkill -f "$usuario"
  45. userdel --force $usuario
  46. grep -v ^$usuario[[:space:]] /root/usuarios.db > /tmp/ph ; cat /tmp/ph > /root/usuarios.db
  47. rm /etc/SSHPlus/senha/$usuario > /dev/null 2>&1
  48. rm -rf /etc/SSHPlus/userteste/$usuario.sh" > /etc/SSHPlus/userteste/$usuario.sh
  49. chmod +x /etc/SSHPlus/userteste/$usuario.sh
  50. at -f /etc/SSHPlus/userteste/$usuario.sh now + $tempo hour > /dev/null 2>&1
  51. echo ${callback_query_from_id} > lista
  52. # - ENVIA O SSH
  53. ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \
  54. --text "$(echo -e "βœ… <b>Criado com sucesso</b> βœ…\n\n🌐SERVIDOR: BRASIL [01]\nπŸ‘€USUARIO: <code>$usuario</code>\nπŸ”‘SENHA: <code>$senha</code>\<n\n⏳ Expira em: $tempo Hora")" \
  55. --parse_mode html
  56. return 0
  57. }
  58. #enviar app
  59. enviarapp() {
  60. ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \
  61. --text "⬇️️ BAIXANDO APLICATIVO, AGUARDE..."
  62. ShellBot.sendDocument --chat_id ${callback_query_message_chat_id} \
  63. --document "@/root/resurrection2.apk" \
  64. return 0
  65. }
  66. #informacoes usuario
  67. infouser () {
  68. ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \
  69. --text "$(echo -e "Nome: ${message_from_first_name[$(ShellBot.ListUpdates)]}\nUser: @${message_from_username[$(ShellBot.ListUpdates)]:-null}")\nID: ${message_from_id[$(ShellBot.ListUpdates)]} " \
  70. --parse_mode html
  71. return 0
  72. }
  73. unset botao1
  74. botao1=''
  75. ShellBot.InlineKeyboardButton --button 'botao1' --line 1 --text '♻️ GERAR TESTE ♻️' --callback_data 'gerarssh'
  76. ShellBot.InlineKeyboardButton --button 'botao1' --line 3 --text 'πŸ”° BAIXAR APLICATIVO πŸ”°' --callback_data 'appenviar'
  77. ShellBot.InlineKeyboardButton --button 'botao1' --line 5 --text 'πŸ”° COMPRAR LOGIN πŸ”°οΈοΈ' --callback_data '3' --url 'https://t.me/leandrodts'
  78. ShellBot.InlineKeyboardButton --button 'botao1' --line 7 --text 'πŸ§‘β€πŸ’»SUPORTE WHATSAPPπŸ§‘β€πŸ’»οΈοΈ' --callback_data '3' --url 'https://wa.me/5527996192080'
  79. ShellBot.regHandleFunction --function criarteste --callback_data gerarssh
  80. ShellBot.regHandleFunction --function enviarapp --callback_data appenviar
  81. unset keyboard1
  82. keyboard1="$(ShellBot.InlineKeyboardMarkup -b 'botao1')"
  83. while :; do
  84. [[ "$(date +%d)" != "$(cat RESET)" ]] && {
  85. echo $(date +%d) > RESET
  86. echo ' ' > lista
  87. }
  88. ShellBot.getUpdates --limit 100 --offset $(ShellBot.OffsetNext) --timeout 24
  89. for id in $(ShellBot.ListUpdates); do
  90. (
  91. ShellBot.watchHandle --callback_data ${callback_query_data[$id]}
  92. comando=(${message_text[$id]})
  93. [[ "${comando[0]}" = "/menu" || "${comando[0]}" = "/start" ]] && menu
  94. [[ "${comando[0]}" = "/id" ]] && infouser
  95. ) &
  96. done
  97. done

comments powered by Disqus