[
  {
    "path": "Install/ShellBot.sh",
    "content": "#!/usr/bin/env bash\n\n#-----------------------------------------------------------------------------------------------------------\n#\tDATE:\t\t\t\tMarch 7, 2017\n#\tSCRIPT:\t\t\t\tShellBot.sh\n#\tVERSION:\t\t\t6.4.0\n#\tDEVELOPED BY:\t                Juliano Santos [SHAMAN]\n#\tPAGE:\t\t\t\thttp://www.shellscriptx.blogspot.com.br\n#\tFANPAGE:\t\t\thttps://www.facebook.com/shellscriptx\n#\tGITHUB:\t\t\t\thttps://github.com/shellscriptx\n# \tCONTACT:\t\t\tshellscriptx@gmail.com\n#\n#\tDESCRIPTION:\t\t\tShellBot is an unofficial API designed to facilitate the creation of\n# \t\t\t\t\tbots on the TELEGRAM platform. Consisting of a collection of methods\n# \t\t\t\t\tand functions that allow the developer to:\n#\n#\t\t\t\t\t\t* Manage groups, channels and members.\n# \t\t\t\t\t\t* Send messages, documents, music, contacts and etc.\n# \t\t\t\t\t\t* Upload keyboards (KeyboardMarkup and InlineKeyboard).\n# \t\t\t\t\t\t* Get information about members, files, groups and channels.\n# \t\t\t\t\t\t* For more information see the documentation:\n#\t\t\t\t\t\t\t  \n#\t\t\t\t\t\thttps://github.com/shellscriptx/ShellBot/wiki\n#\n#\t\t\t\t\tShellBot maintains the default naming of registered methods of the\n# \t\t\t\t\tOriginal API (Telegram), as well as its fields and values. the methods\n# \t\t\t\t\trequire parameters and arguments for calling and executing. Parameters\n# \t\t\t\t\tmandatory returns an error message if the argument is omitted.\n#\t\t\t\t\t\n#\tNOTE:\t\t\t\tDeveloped in Shell Script language, using the interpreter of\n# \t\t\t\t\tBASH commands and making the most of its built-in features,\n# \t\t\t\t\treducing the level of external package dependencies.\n#-----------------------------------------------------------------------------------------------------------\n\n[[ $_SHELLBOT_SH_ ]] && return 1\n\nif ! awk 'BEGIN { exit ARGV[1] < 4.3 }' ${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}; then\n\techo \"${BASH_SOURCE:-${0##*/}}: erro: requer o interpretador de comandos 'bash 4.3' ou superior.\" 1>&2\n\texit 1\nfi\n\n# Information\nreadonly -A _SHELLBOT_=(\n[name]='ShellBot'\n[keywords]='Shell Script Telegram API'\n[description]='Unofficial API for creating bots on the Telegram platform.'\n[version]='6.4.0'\n[language]='shellscript'\n[shell]=${SHELL}\n[shell_version]=${BASH_VERSION}\n[author]='Juliano Santos [SHAMAN]'\n[email]='shellscriptx@gmail.com'\n[wiki]='https://github.com/shellscriptx/shellbot/wiki'\n[github]='https://github.com/shellscriptx/shellbot'\n[packages]='curl 7.0, getopt 2.0, jq 1.5'\n)\n\n# Check dependencies.\nwhile read _pkg_ _ver_; do\n\tif command -v $_pkg_ &>/dev/null; then\n\t\tif [[ $($_pkg_ --version 2>&1) =~ [0-9]+\\.[0-9]+ ]]; then\n\t\t\tif ! awk 'BEGIN { exit ARGV[1] < ARGV[2] }' $BASH_REMATCH $_ver_; then\n\t\t\t\tprintf \"%s: erro: requer o pacote '%s %s' ou superior.\\n\" ${_SHELLBOT_[name]} $_pkg_ $_ver_ 1>&2\n\t\t\t\texit 1\n\t\t\tfi\n\t\telse\n\t\t\tprintf \"%s: erro: '%s' não foi possível obter a versão.\\n\" ${_SHELLBOT_[name]} $_pkg_ 1>&2\n\t\t\texit 1\n\t\tfi\n\telse\n\t\tprintf \"%s: erro: '%s' o pacote requerido está ausente.\\n\" ${_SHELLBOT_[name]} $_pkg_ 1>&2\n\t\texit 1\n\tfi\ndone <<< \"${_SHELLBOT_[packages]//,/$'\\n'}\"\n\n# bash (options).\nshopt -s\tcheckwinsize\t\t\t\\\n\t\t\tcmdhist\t\t\t\t\t\\\n\t\t\tcomplete_fullquote\t\t\\\n\t\t\texpand_aliases\t\t\t\\\n\t\t\textglob\t\t\t\t\t\\\n\t\t\textquote\t\t\t\t\\\n\t\t\tforce_fignore\t\t\t\\\n\t\t\thistappend\t\t\t\t\\\n\t\t\tinteractive_comments\t\\\n\t\t\tprogcomp\t\t\t\t\\\n\t\t\tpromptvars\t\t\t\t\\\n\t\t\tsourcepath\n\n# Desabilita a expansão de nomes de arquivos (globbing).\nset -f\n\nreadonly _SHELLBOT_SH_=1\t\t\t\t\t# Inicialização\nreadonly _BOT_SCRIPT_=${0##*/}\t\t\t\t# Script\nreadonly _CURL_OPT_='--silent --request'\t# CURL (opções)\n\n# Erros\nreadonly _ERR_TYPE_BOOL_='tipo incompatível: suporta somente \"true\" ou \"false\".'\nreadonly _ERR_TYPE_INT_='tipo incompatível: suporta somente inteiro.'\nreadonly _ERR_TYPE_FLOAT_='tipo incompatível: suporta somente float.'\nreadonly _ERR_PARAM_REQUIRED_='opção requerida: verique se o(s) parâmetro(s) ou argumento(s) obrigatório(s) estão presente(s).'\nreadonly _ERR_TOKEN_UNAUTHORIZED_='não autorizado: verifique se possui permissões para utilizar o token.'\nreadonly _ERR_TOKEN_INVALID_='token inválido: verique o número do token e tente novamente.'\nreadonly _ERR_BOT_ALREADY_INIT_='ação não permitida: o bot já foi inicializado.'\nreadonly _ERR_FILE_NOT_FOUND_='falha ao acessar: não foi possível ler o arquivo.'\nreadonly _ERR_DIR_WRITE_DENIED_='permissão negada: não é possível gravar no diretório.'\nreadonly _ERR_DIR_NOT_FOUND_='Não foi possível acessar: diretório não encontrado.'\nreadonly _ERR_FILE_INVALID_ID_='id inválido: arquivo não encontrado.'\nreadonly _ERR_UNKNOWN_='erro desconhecido: ocorreu uma falha inesperada. Reporte o problema ao desenvolvedor.'\nreadonly _ERR_SERVICE_NOT_ROOT_='acesso negado: requer privilégios de root.'\nreadonly _ERR_SERVICE_EXISTS_='erro ao criar o serviço: o nome do serviço já existe.'\nreadonly _ERR_SERVICE_SYSTEMD_NOT_FOUND_='erro ao ativar: o sistema não possui suporte ao gerenciamento de serviços \"systemd\".'\nreadonly _ERR_SERVICE_USER_NOT_FOUND_='usuário não encontrado: a conta de usuário informada é inválida.'\nreadonly _ERR_VAR_NAME_='variável não encontrada: o identificador é inválido ou não existe.'\nreadonly _ERR_FUNCTION_NOT_FOUND_='função não encontrada: o identificador especificado é inválido ou não existe.'\nreadonly _ERR_ARG_='argumento inválido: o argumento não é suportado pelo parâmetro especificado.'\nreadonly _ERR_RULE_ALREADY_EXISTS_='falha ao definir: o nome da regra já existe.'\nreadonly _ERR_HANDLE_EXISTS_='erro ao registar: já existe um handle vinculado ao callback'\nreadonly _ERR_CONNECTION_='falha de conexão: não foi possível estabelecer conexão com o Telegram.'\n\n# Maps\ndeclare -A _BOT_HANDLE_\ndeclare -A _BOT_RULES_\ndeclare -A return\n\ndeclare -i _BOT_RULES_INDEX_\ndeclare _VAR_INIT_\n\nJson() { local obj=$(jq -Mc \"$1\" <<< \"${*:2}\"); obj=${obj#\\\"}; echo \"${obj%\\\"}\"; }\n\nSetDelmValues(){ \n\tlocal obj=$(jq \"[..|select(type == \\\"string\\\" or type == \\\"number\\\" or type == \\\"boolean\\\")|tostring]|join(\\\"${_BOT_DELM_/\\\"/\\\\\\\"}\\\")\" <<< \"$1\")\n\tobj=${obj#\\\"}; echo \"${obj%\\\"}\"\n}\n\nGetAllValues(){\n\tjq '[..|select(type == \"string\" or type == \"number\" or type == \"boolean\")|tostring]|.[]' <<< \"$1\"\n}\n\nGetAllKeys(){\n\tjq -r 'path(..|select(type == \"string\" or type == \"number\" or type == \"boolean\"))|map(if type == \"number\" then .|tostring|\"[\"+.+\"]\" else . end)|join(\".\")|gsub(\"\\\\.\\\\[\";\"[\")' <<< \"$1\"\n}\n\nFlagConv()\n{\n\tlocal var str=$2\n\n\twhile [[ $str =~ \\$\\{([a-z_]+)\\} ]]; do\n\t\tif [[ ${BASH_REMATCH[1]} == @(${_VAR_INIT_// /|}) ]]; then\n\t\t\tvar=${BASH_REMATCH[1]}[$1]\n\t\t\tstr=${str//${BASH_REMATCH[0]}/${!var}}\n\t\telse\n\t\t\tstr=${str//${BASH_REMATCH[0]}}\n\t\tfi\n\tdone\n\n\techo \"$str\"\n}\n\nCreateLog()\n{\n\tlocal fid fbot fname fuser lcode cid ctype \n\tlocal ctitle mid mdate mtext etype\n\tlocal i fmt obj oid\n\n\tfor ((i=0; i < $1; i++)); do\n\t\t\n\t\tprintf -v fmt \"$_BOT_LOG_FORMAT_\" || MessageError API\n\t\t\n\t\t# Suprimir erros.\n\t\texec 5<&2\n\t\texec 2<&-\n\n\t\t# Objeto (tipo)\n\t\tif \t\t[[ ${message_contact_phone_number[$i]:-${edited_message_contact_phone_number[$i]}}\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_contact_phone_number[$i]:-${edited_channel_post_contact_phone_number[$i]}}\t\t]]; then obj=contact\n\t\telif\t[[ ${message_sticker_file_id[$i]:-${edited_message_sticker_file_id[$i]}}\t\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_sticker_file_id[$i]:-${edited_channel_post_sticker_file_id[$i]}}\t\t\t\t\t]]; then obj=sticker\n\t\telif\t[[ ${message_animation_file_id[$i]:-${edited_message_animation_file_id[$i]}}\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_animation_file_id[$i]:-${edited_channel_post_animation_file_id[$i]}}\t\t\t\t]]; then obj=animation\n\t\telif\t[[ ${message_photo_file_id[$i]:-${edited_message_photo_file_id[$i]}}\t\t\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_photo_file_id[$i]:-${edited_channel_post_photo_file_id[$i]}}\t\t\t\t\t\t]]; then obj=photo\n\t\telif\t[[ ${message_audio_file_id[$i]:-${edited_message_audio_file_id[$i]}}\t\t\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_audio_file_id[$i]:-${edited_channel_post_audio_file_id[$i]}}\t\t\t\t\t\t]]; then obj=audio\n\t\telif\t[[ ${message_video_file_id[$i]:-${edited_message_video_file_id[$i]}}\t\t\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_video_file_id[$i]:-${edited_channel_post_video_file_id[$i]}}\t\t\t\t\t\t]]; then obj=video\n\t\telif\t[[ ${message_voice_file_id[$i]:-${edited_message_voice_file_id[$i]}}\t\t\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_voice_file_id[$i]:-${edited_channel_post_voice_file_id[$i]}}\t\t\t\t\t\t]]; then obj=voice\n\t\telif\t[[ ${message_document_file_id[$i]:-${edited_message_document_file_id[$i]}}\t\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_document_file_id[$i]:-${edited_channel_post_document_file_id[$i]}}\t\t\t\t]]; then obj=document\n\t\telif\t[[ ${message_venue_location_latitude[$i]:-${edited_message_venue_location_latitude[$i]}}\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_venue_location_latitude[$i]-${edited_channel_post_venue_location_latitude[$i]}}\t]]; then obj=venue\n\t\telif\t[[ ${message_location_latitude[$i]:-${edited_message_location_latitude[$i]}}\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_location_latitude[$i]:-${edited_channel_post_location_latitude[$i]}}\t\t\t\t]]; then obj=location\n\t\telif\t[[ ${message_text[$i]:-${edited_message_text[$i]}}\t\t\t\t\t\t\t\t\t\t\t\t\t]] ||\n\t\t\t\t[[ ${channel_post_text[$i]:-${edited_channel_post_text[$i]}}\t\t\t\t\t\t\t\t\t\t]]; then obj=text\n\t\telif \t[[ ${callback_query_id[$i]}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]]; then obj=callback\n\t\telif \t[[ ${inline_query_id[$i]}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]]; then obj=inline\n\t\telif\t[[ ${chosen_inline_result_result_id[$i]}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]]; then obj=chosen\n\t\tfi\n\t\n\t\t# Objeto (id)\t\n\t\t[[ ${oid:=${message_contact_phone_number[$i]}} \t\t\t\t]] ||\n\t\t[[ ${oid:=${message_sticker_file_id[$i]}}\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${message_animation_file_id[$i]}}\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${message_photo_file_id[$i]}}\t\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${message_audio_file_id[$i]}}\t\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${message_video_file_id[$i]}}\t\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${message_voice_file_id[$i]}}\t\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${message_document_file_id[$i]}}\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${edited_message_contact_phone_number[$i]}} \t\t]] ||\n\t\t[[ ${oid:=${edited_message_sticker_file_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${edited_message_animation_file_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${edited_message_photo_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${edited_message_audio_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${edited_message_video_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${edited_message_voice_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${edited_message_document_file_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${channel_post_contact_phone_number[$i]}} \t\t]] ||\n\t\t[[ ${oid:=${channel_post_sticker_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${channel_post_animation_file_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${channel_post_photo_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${channel_post_audio_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${channel_post_video_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${channel_post_voice_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${channel_post_document_file_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${oid:=${edited_channel_post_contact_phone_number[$i]}} \t]] ||\n\t\t[[ ${oid:=${edited_channel_post_sticker_file_id[$i]}}\t\t]] ||\n\t\t[[ ${oid:=${edited_channel_post_animation_file_id[$i]}}\t\t]] ||\n\t\t[[ ${oid:=${edited_channel_post_photo_file_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${edited_channel_post_audio_file_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${edited_channel_post_video_file_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${edited_channel_post_voice_file_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${edited_channel_post_document_file_id[$i]}}\t\t]] ||\n\t\t[[ ${oid:=${message_message_id[$i]}}\t\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${edited_message_message_id[$i]}}\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${channel_post_message_id[$i]}}\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${edited_channel_post_message_id[$i]}}\t\t\t]] ||\n\t\t[[ ${oid:=${callback_query_id[$i]}}\t\t\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${inline_query_id[$i]}} \t\t\t\t\t\t\t]] ||\n\t\t[[ ${oid:=${chosen_inline_result_result_id[$i]}}\t\t\t]]\n\n\t\t# Remetente (id)\n\t\t[[ ${fid:=${message_from_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${fid:=${edited_message_from_id[$i]}} \t\t]] ||\n\t\t[[ ${fid:=${callback_query_from_id[$i]}} \t\t]] ||\n\t\t[[ ${fid:=${inline_query_from_id[$i]}} \t\t\t]] ||\n\t\t[[ ${fid:=${chosen_inline_result_from_id[$i]}} \t]]\n\n\t\t# Bot\n\t\t[[ ${fbot:=${message_from_is_bot[$i]}} \t\t\t\t]] ||\n\t\t[[ ${fbot:=${edited_message_from_is_bot[$i]}} \t\t]] ||\n\t\t[[ ${fbot:=${callback_query_from_is_bot[$i]}} \t\t]] ||\n\t\t[[ ${fbot:=${inline_query_from_is_bot[$i]}} \t\t]] ||\n\t\t[[ ${fbot:=${chosen_inline_result_from_is_bot[$i]}} ]]\n\n\t\t# Usuário (nome)\n\t\t[[ ${fname:=${message_from_first_name[$i]}} \t\t\t\t]] ||\n\t\t[[ ${fname:=${edited_message_from_first_name[$i]}}\t\t\t]] ||\n\t\t[[ ${fname:=${callback_query_from_first_name[$i]}} \t\t\t]] ||\n\t\t[[ ${fname:=${inline_query_from_first_name[$i]}}\t\t\t]] ||\n\t\t[[ ${fname:=${chosen_inline_result_from_first_name[$i]}}\t]] ||\n\t\t[[ ${fname:=${channel_post_author_signature[$i]}}\t\t\t]] ||\n\t\t[[ ${fname:=${edited_channel_post_author_signature[$i]}}\t]]\n\n\t\t# Usuário (conta)\n\t\t[[ ${fuser:=${message_from_username[$i]}}\t\t\t\t]] ||\n\t\t[[ ${fuser:=${edited_message_from_username[$i]}} \t\t]] ||\n\t\t[[ ${fuser:=${callback_query_from_username[$i]}} \t\t]] ||\n\t\t[[ ${fuser:=${inline_query_from_username[$i]}} \t\t\t]] ||\n\t\t[[ ${fuser:=${chosen_inline_result_from_username[$i]}} \t]]\n\n\t\t# Idioma\n\t\t[[ ${lcode:=${message_from_language_code[$i]}} \t\t\t\t]] ||\n\t\t[[ ${lcode:=${edited_message_from_language_code[$i]}} \t\t]] ||\n\t\t[[ ${lcode:=${callback_query_from_language_code[$i]}} \t\t]] ||\n\t\t[[ ${lcode:=${inline_query_from_language_code[$i]}} \t\t]] ||\n\t\t[[ ${lcode:=${chosen_inline_result_from_language_code[$i]}}\t]]\n\n\t\t# Bate-papo (id)\n\t\t[[ ${cid:=${message_chat_id[$i]}}\t\t\t\t\t]] ||\n\t\t[[ ${cid:=${edited_message_chat_id[$i]}}\t\t\t]] ||\n\t\t[[ ${cid:=${callback_query_message_chat_id[$i]}} \t]] ||\n\t\t[[ ${cid:=${channel_post_chat_id[$i]}}\t\t\t\t]] ||\n\t\t[[ ${cid:=${edited_channel_post_chat_id[$i]}}\t\t]]\n\n\t\t# Bate-papo (tipo)\n\t\t[[ ${ctype:=${message_chat_type[$i]}} \t\t\t\t\t]] ||\n\t\t[[ ${ctype:=${edited_message_chat_type[$i]}} \t\t\t]] ||\n\t\t[[ ${ctype:=${callback_query_message_chat_type[$i]}} \t]] ||\n\t\t[[ ${ctype:=${channel_post_chat_type[$i]}}\t\t\t\t]] ||\n\t\t[[ ${ctype:=${edited_channel_post_chat_type[$i]}}\t\t]]\n\n\t\t# Bate-papo (título)\n\t\t[[ ${ctitle:=${message_chat_title[$i]}}\t\t\t\t\t]] ||\n\t\t[[ ${ctitle:=${edited_message_chat_title[$i]}} \t\t\t]] ||\n\t\t[[ ${ctitle:=${callback_query_message_chat_title[$i]}} \t]] ||\n\t\t[[ ${ctitle:=${channel_post_chat_title[$i]}}\t\t\t]] ||\n\t\t[[ ${ctitle:=${edited_channel_post_chat_title[$i]}}\t\t]]\n\n\t\t# Mensagem (id)\n\t\t[[ ${mid:=${message_message_id[$i]}} \t\t\t\t]] ||\n\t\t[[ ${mid:=${edited_message_message_id[$i]}} \t\t]] ||\n\t\t[[ ${mid:=${callback_query_id[$i]}} \t\t\t\t]] ||\n\t\t[[ ${mid:=${inline_query_id[$i]}} \t\t\t\t\t]] ||\n\t\t[[ ${mid:=${chosen_inline_result_result_id[$i]}}\t]] ||\n\t\t[[ ${mid:=${channel_post_message_id[$i]}}\t\t\t]] ||\n\t\t[[ ${mid:=${edited_channel_post_message_id[$i]}}\t]]\n\n\t\t# Mensagem (data)\n\t\t[[ ${mdate:=${message_date[$i]}}\t\t\t\t]] ||\n\t\t[[ ${mdate:=${edited_message_date[$i]}} \t\t]] ||\n\t\t[[ ${mdate:=${callback_query_message_date[$i]}}\t]] ||\n\t\t[[ ${mdate:=${channel_post_date[$i]}}\t\t\t]] ||\n\t\t[[ ${mdate:=${edited_channel_post_date[$i]}}\t]]\n\n\t\t# Mensagem (texto)\n\t\t[[ ${mtext:=${message_text[$i]}} \t\t\t\t]] ||\n\t\t[[ ${mtext:=${edited_message_text[$i]}} \t\t]] ||\n\t\t[[ ${mtext:=${callback_query_message_text[$i]}} ]] ||\n\t\t[[ ${mtext:=${inline_query_query[$i]}} \t\t\t]] ||\n\t\t[[ ${mtext:=${chosen_inline_result_query[$i]}}\t]] ||\n\t\t[[ ${mtext:=${channel_post_text[$i]}}\t\t\t]] ||\n\t\t[[ ${mtext:=${edited_channel_post_text[$i]}}\t]]\n\n\t\t# Mensagem (tipo)\n\t\t[[ ${etype:=${message_entities_type[$i]}} \t\t\t\t\t]] ||\n\t\t[[ ${etype:=${edited_message_entities_type[$i]}} \t\t\t]] ||\n\t\t[[ ${etype:=${callback_query_message_entities_type[$i]}}\t]] ||\n\t\t[[ ${etype:=${channel_post_entities_type[$i]}}\t\t\t\t]] ||\n\t\t[[ ${etype:=${edited_channel_post_entities_type[$i]}}\t\t]]\n\n\t\t# Flags\n\t\tfmt=${fmt//\\{BOT_TOKEN\\}/${_BOT_INFO_[0]:--}}\n\t\tfmt=${fmt//\\{BOT_ID\\}/${_BOT_INFO_[1]:--}}\n\t\tfmt=${fmt//\\{BOT_FIRST_NAME\\}/${_BOT_INFO_[2]:--}}\n\t\tfmt=${fmt//\\{BOT_USERNAME\\}/${_BOT_INFO_[3]:--}}\n\t\tfmt=${fmt//\\{BASENAME\\}/${_BOT_SCRIPT_:--}}\n\t\tfmt=${fmt//\\{OK\\}/${return[ok]:-${ok:--}}}\n\t\tfmt=${fmt//\\{UPDATE_ID\\}/${update_id[$i]:--}}\n\t\tfmt=${fmt//\\{OBJECT_TYPE\\}/${obj:--}}\n\t\tfmt=${fmt//\\{OBJECT_ID\\}/${oid:--}}\n\t\tfmt=${fmt//\\{FROM_ID\\}/${fid:--}}\n\t\tfmt=${fmt//\\{FROM_IS_BOT\\}/${fbot:--}}\n\t\tfmt=${fmt//\\{FROM_FIRST_NAME\\}/${fname:--}}\n\t\tfmt=${fmt//\\{FROM_USERNAME\\}/${fuser:--}}\n\t\tfmt=${fmt//\\{FROM_LANGUAGE_CODE\\}/${lcode:--}}\n\t\tfmt=${fmt//\\{CHAT_ID\\}/${cid:--}}\n\t\tfmt=${fmt//\\{CHAT_TYPE\\}/${ctype:--}}\n\t\tfmt=${fmt//\\{CHAT_TITLE\\}/${ctitle:--}}\n\t\tfmt=${fmt//\\{MESSAGE_ID\\}/${mid:--}}\n\t\tfmt=${fmt//\\{MESSAGE_DATE\\}/${mdate:--}}\n\t\tfmt=${fmt//\\{MESSAGE_TEXT\\}/${mtext:--}}\n\t\tfmt=${fmt//\\{ENTITIES_TYPE\\}/${etype:--}}\n\t\tfmt=${fmt//\\{METHOD\\}/${FUNCNAME[2]/main/ShellBot.getUpdates}}\n\t\tfmt=${fmt//\\{RETURN\\}/$(SetDelmValues \"$2\")}\n\n\t\texec 2<&5\n\n\t\t# log\n\t\t[[ $fmt ]] && { echo \"$fmt\" >> \"$_BOT_LOG_FILE_\" || MessageError API; }\n\n\t\t# Limpa objetos\n\t\tfid= fbot= fname= fuser= lcode= cid= ctype= \n\t\tctitle= mid= mdate= mtext= etype= obj= oid=\n\tdone\n\n\treturn $?\n}\n\nMethodReturn()\n{\n\t# Retorno\n\tcase $_BOT_TYPE_RETURN_ in\n\t\tjson) echo \"$1\";;\n\t\tvalue) SetDelmValues \"$1\";;\n\t\tmap)\n\t\t\tlocal key val vars vals i obj\n\t\t\treturn=()\n\n\t\t\tmapfile -t vars <<< $(GetAllKeys \"$1\")\n\t\t\tmapfile -t vals <<< $(GetAllValues \"$1\")\n\n\t\t\tfor i in ${!vars[@]}; do\n\t\t\t\tkey=${vars[$i]//[0-9\\[\\]]/}\n\t\t\t\tkey=${key#result.}\n\t\t\t\tkey=${key//./_}\n\n\t\t\t\tval=${vals[$i]}\n\t\t\t\tval=${val#\\\"}\n\t\t\t\tval=${val%\\\"}\n\t\t\t\t\n\t\t\t\t[[ ${return[$key]} ]] && return[$key]+=${_BOT_DELM_}${val} || return[$key]=$val\n\t\t\t\t[[ $_BOT_MONITOR_ ]] && printf \"[%s]: return[%s] = '%s'\\n\" \"${FUNCNAME[1]}\" \"$key\" \"$val\"\n\t\t\tdone\n\t\t\t;;\n\tesac\n\t\n\t[[ $(jq -r '.ok' <<< \"$1\") == true ]]\n\n\treturn $?\n}\n\nMessageError()\n{\n\t# Variáveis locais\n\tlocal err_message err_param assert i\n\t\n\t# A variável 'BASH_LINENO' é dinâmica e armazena o número da linha onde foi expandida.\n\t# Quando chamada dentro de um subshell, passa ser instanciada como um array, armazenando diversos\n\t# valores onde cada índice refere-se a um shell/subshell. As mesmas caracteristicas se aplicam a variável\n\t# 'FUNCNAME', onde é armazenado o nome da função onde foi chamada.\n\t\n\t# Obtem o índice da função na hierarquia de chamada.\n\t[[ ${FUNCNAME[1]} == CheckArgType ]] && i=2 || i=1\n\t\n\t# Lê o tipo de ocorrência.\n\t# TG - Erro externo retornado pelo core do telegram.\n\t# API - Erro interno gerado pela API do ShellBot.\n\tcase $1 in\n\t\tTG)\n\t\t\terr_param=\"$(Json '.error_code' \"$2\")\"\n\t\t\terr_message=\"$(Json '.description' \"$2\")\"\n\t\t\t;;\n\t\tAPI)\n\t\t\terr_param=\"${3:--}: ${4:--}\"\n\t\t\terr_message=\"$2\"\n\t\t\tassert=true\n\t\t\t;;\n\tesac\n\n\t# Imprime erro\n\tprintf \"%s: erro: linha %s: %s: %s: %s\\n\"\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${_BOT_SCRIPT_}\"\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${BASH_LINENO[$i]:--}\" \t\t\t\\\n\t\t\t\t\t\t\t\"${FUNCNAME[$i]:--}\" \t\t\t\t\\\n\t\t\t\t\t\t\t\"${err_param:--}\" \t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${err_message:-$_ERR_UNKNOWN_}\" \t1>&2 \n\n\t# Finaliza script/thread em caso de erro interno, caso contrário retorna 1\n\t${assert:-false} && exit 1 || return 1\n}\n\nCheckArgType()\n{\n\t# CheckArgType recebe os dados da função chamadora e verifica\n\t# o dado recebido com o tipo suportado pelo parâmetro.\n\t# É retornado '0' para sucesso, caso contrário uma mensagem\n\t# de erro é retornada e o script/thread é finalizado com status '1'.\n\tcase $1 in\n\t\tuser)\t\tid \"$3\" &>/dev/null\t\t\t\t\t\t|| MessageError API \"$_ERR_SERVICE_USER_NOT_FOUND_\" \"$2\" \"$3\";;\n\t\tfunc)\t\t[[ $(type -t \"$3\") == function\t\t\t]] \t|| MessageError API \"$_ERR_FUNCTION_NOT_FOUND_\" \"$2\" \"$3\";;\n\t\tvar)\t\t[[ -v $3 \t\t\t\t\t\t\t\t]] \t|| MessageError API \"$_ERR_VAR_NAME_\" \"$2\" \"$3\";;\n\t\tint)\t\t[[ $3 =~ ^-?[0-9]+$ \t\t\t\t\t]] \t|| MessageError API \"$_ERR_TYPE_INT_\" \"$2\" \"$3\";;\n\t\tfloat)\t\t[[ $3 =~ ^-?[0-9]+\\.[0-9]+$ \t\t\t]] \t|| MessageError API \"$_ERR_TYPE_FLOAT_\" \"$2\" \"$3\";;\n\t\tbool)\t\t[[ $3 =~ ^(true|false)$ \t\t\t\t]] \t|| MessageError API \"$_ERR_TYPE_BOOL_\" \"$2\" \"$3\";;\n\t\ttoken)\t\t[[ $3 =~ ^[0-9]+:[a-zA-Z0-9_-]+$\t\t]] \t|| MessageError API \"$_ERR_TOKEN_INVALID_\" \"$2\" \"$3\";;\n\t\tfile)\t\t[[ $3 =~ ^@ && ! -f ${3#@} \t\t\t\t]] \t&& MessageError API \"$_ERR_FILE_NOT_FOUND_\" \"$2\" \"$3\";;\n\t\treturn)\t\t[[ $3 == @(json|map|value) \t\t\t\t]] \t|| MessageError API \"$_ERR_ARG_\" \"$2\" \"$3\";;\n\t\tcmd)\t\t[[ $3 =~ ^/[a-zA-Z0-9_]+$ \t\t\t\t]] \t|| MessageError API \"$_ERR_ARG_\" \"$2\" \"$3\";;\n\t\tflag)\t\t[[ $3 =~ ^[a-zA-Z0-9_]+$ \t\t\t\t]] \t|| MessageError API \"$_ERR_ARG_\" \"$2\" \"$3\";;\n\tesac\n\n\treturn $?\n}\n\nFlushOffset()\n{    \n\tlocal sid eid jq_obj\n\n\twhile :; do\n\t\tjq_obj=$(ShellBot.getUpdates --limit 100 --offset $(ShellBot.OffsetNext))\n\t\tIFS=' ' read -a update_id <<< $(jq -r '.result|.[]|.update_id' <<< $jq_obj)\n\t\t[[ $update_id ]] || break\n\t\tsid=${sid:-${update_id[0]}}\n\t\teid=${update_id[-1]}\n\tdone\n\t\n\techo \"${sid:-0}|${eid:-0}\"\n\n\treturn $?\n}\n\nCreateUnitService()\n{\n\tlocal service=${1%.*}.service\n\tlocal ok='\\033[0;32m[OK]\\033[0;m'\n\tlocal fail='\\033[0;31m[FALHA]\\033[0;m'\n\t\n\t((UID == 0)) || MessageError API \"$_ERR_SERVICE_NOT_ROOT_\"\n\n\t# O modo 'service' requer que o sistema de gerenciamento de processos 'systemd'\n\t# esteja presente para que o Unit target seja linkado ao serviço.\n\tif ! which systemctl &>/dev/null; then\n\t\tMessageError API \"$_ERR_SERVICE_SYSTEMD_NOT_FOUND_\"; fi\n\n\n\t# Se o serviço existe.\n\ttest -e /lib/systemd/system/$service && \\\n\tMessageError API \"$_ERR_SERVICE_EXISTS_\" \"$service\"\n\n\t# Gerando as configurações do target.\n\tcat > /lib/systemd/system/$service << _eof\n[Unit]\nDescription=$1 - (SHELLBOT)\nAfter=network-online.target\n\n[Service]\nUser=$2\nWorkingDirectory=$PWD\nExecStart=/bin/bash $1\nExecReload=/bin/kill -HUP \\$MAINPID\nExecStop=/bin/kill -KILL \\$MAINPID\nKillMode=process\nRestart=on-failure\nRestartPreventExitStatus=255\nType=simple\n\n[Install]\nWantedBy=multi-user.target\n_eof\n\n\t[[ $? -eq 0 ]] && {\t\n\t\t\n\t\tprintf '%s foi criado com sucesso !!\\n' $service\t\n\t\techo -n \"Habilitando...\"\n \t\tsystemctl enable $service &>/dev/null && echo -e $ok || \\\n\t\t{ echo -e $fail; MessageError API; }\n\n\t\tsed -i -r '/^\\s*ShellBot.init\\s/s/\\s--?(s(ervice)?|u(ser)?\\s+\\w+)\\b//g' \"$1\"\n\t\tsystemctl daemon-reload\n\n\t\techo -n \"Iniciando...\"\n\t\tsystemctl start $service &>/dev/null && {\n\t\t\n\t\t\techo -e $ok\n\t\t\tsystemctl status $service\n\t\t\techo -e \"\\nUso: sudo systemctl {start|stop|restart|reload|status} $service\"\n\t\t\n\t\t} || echo -e $fail\n\t\n\t} || MessageError API\n\n\texit 0\n}\n\n# Inicializa o bot, definindo sua API e _TOKEN_.\nShellBot.init()\n{\n\tlocal method_return delm ret logfmt jq_obj offset\n\tlocal token monitor flush service user logfile logfmt\n\t\n\t# Verifica se o bot já foi inicializado.\n\t[[ $_SHELLBOT_INIT_ ]] && MessageError API \"$_ERR_BOT_ALREADY_INIT_\"\n\n\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t --options 't:mfsu:l:o:r:d:' \\\n\t\t\t\t\t\t --longoptions 'token:,\n\t\t\t\t\t\t\t\t\t\tmonitor,\n\t\t\t\t\t\t\t\t\t\tflush,\n\t\t\t\t\t\t\t\t\t\tservice,\n\t\t\t\t\t\t\t\t\t\tuser:,\n\t\t\t\t\t\t\t\t\t\tlog_file:,\n\t\t\t\t\t\t\t\t\t\tlog_format:,\n\t\t\t\t\t\t\t\t\t\treturn:,\n\t\t\t\t\t\t\t\t\t\tdelimiter:' \\\n    \t\t\t\t\t -- \"$@\")\n    \n\t# Define os parâmetros posicionais\n\teval set -- \"$param\"\n\t\n\twhile :\n    \tdo\n\t\t\tcase $1 in\n\t\t\t\t-t|--token)\n\t    \t\t\tCheckArgType token \"$1\" \"$2\"\n\t\t\t\t\ttoken=$2\n\t    \t\t\tshift 2\n\t   \t\t\t\t;;\n\t   \t\t\t-m|--monitor)\n\t\t\t\t\t# Ativa modo monitor\n\t\t\t\t\tmonitor=true\n\t   \t\t\t\tshift\n\t   \t\t\t\t;;\n\t\t\t\t-f|--flush)\n\t\t\t\t\t# Define a FLAG flush para o método 'ShellBot.getUpdates'. Se ativada, faz com que\n\t\t\t\t\t# o método obtenha somente as atualizações disponíveis, ignorando a extração dos\n\t\t\t\t\t# objetos JSON e a inicialização das variáveis.\n\t\t\t\t\tflush=true\n\t\t\t\t\tshift\n\t\t\t\t\t;;\n\t\t\t\t-s|--service)\n\t\t\t\t\tservice=true\n\t\t\t\t\tshift\n\t\t\t\t\t;;\n\t\t\t\t-u|--user)\n\t\t\t\t\tCheckArgType user \"$1\" \"$2\"\n\t\t\t\t\tuser=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-l|--log_file)\n\t\t\t\t\tlogfile=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-o|--log_format)\n\t\t\t\t\tlogfmt=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-r|--return)\n\t\t\t\t\tCheckArgType return \"$1\" \"$2\"\n\t\t\t\t\tret=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-d|--delimiter)\n\t\t\t\t\tdelm=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t   \t\t\t--)\n\t   \t\t\t\tshift\n\t   \t\t\t\tbreak\n\t   \t\t\t\t;;\n\t   \t\tesac\n\t   \tdone\n  \n\t# Parâmetro obrigatório.\t\n\t[[ $token \t\t\t\t\t]]\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --token]\"\n\t[[ $user && ! $service \t\t]] \t&& MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --service]\" \n\t[[ $service \t\t\t\t]]\t&& CreateUnitService \"$_BOT_SCRIPT_\" \"${user:-$USER}\"\n\t\t   \n\tdeclare -gr _TOKEN_=$token\t\t\t\t\t\t\t\t\t\t\t# TOKEN\n\tdeclare -gr _API_TELEGRAM_=\"https://api.telegram.org/bot$_TOKEN_\"\t# API\n\n\t# Testa conexão.\n\tcurl -s \"$_API_TELEGRAM_\" &>- || MessageError API \"$_ERR_CONNECTION_\"\n\n    # Um método simples para testar o token de autenticação do seu bot. \n    # Não requer parâmetros. Retorna informações básicas sobre o bot em forma de um objeto Usuário.\n    ShellBot.getMe()\n    {\n    \t# Chama o método getMe passando o endereço da API, seguido do nome do método.\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.})\n\n\t\t# Verifica o status de retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n    }\n\n\tShellBot.getMe &>- || MessageError API \"$_ERR_TOKEN_UNAUTHORIZED_\" '[-t, --token]'\n\t\n\t# Salva as informações do bot.\n\tdeclare -gr _BOT_INFO_=(\n\t\t[0]=$_TOKEN_\n\t\t[1]=$(Json '.result.id' $jq_obj)\n\t\t[2]=$(Json '.result.first_name' $jq_obj)\n\t\t[3]=$(Json '.result.username' $jq_obj)\n\t)\n\n\t# Configurações.\n\tdeclare -gr _BOT_FLUSH_=$flush\n\tdeclare -gr _BOT_MONITOR_=$monitor\n\tdeclare -gr _BOT_SERVICE_=$service\n\tdeclare -gr _BOT_USER_SERVICE_=$user\n\tdeclare -gr _BOT_TYPE_RETURN_=${ret:-value}\n\tdeclare -gr _BOT_DELM_=${delm:-|}\n\tdeclare -gr _BOT_LOG_FILE_=${logfile}\n\tdeclare -gr _BOT_LOG_FORMAT_=${logfmt:-%(%d/%m/%Y %H:%M:%S)T: \\{BASENAME\\}: \\{BOT_USERNAME\\}: \\{UPDATE_ID\\}: \\{METHOD\\}: \\{CHAT_TYPE\\}: \\{FROM_USERNAME\\}: \\{OBJECT_TYPE\\}: \\{OBJECT_ID\\}: \\{MESSAGE_TEXT\\}}\n\tdeclare -gr _SHELLBOT_INIT_=1\n\n    # SHELLBOT (FUNÇÕES)\n\t# Inicializa as funções para chamadas aos métodos da API do telegram.\n\tShellBot.ListUpdates(){ echo ${!update_id[@]}; }\n\tShellBot.TotalUpdates(){ echo ${#update_id[@]}; }\n\tShellBot.OffsetEnd(){ local -i offset=${update_id[@]: -1}; echo $offset; }\n\tShellBot.OffsetNext(){ echo $((${update_id[@]: -1}+1)); }\n   \t\n\tShellBot.token() { echo \"${_BOT_INFO_[0]}\"; }\n\tShellBot.id() { echo \"${_BOT_INFO_[1]}\"; }\n\tShellBot.first_name() { echo \"${_BOT_INFO_[2]}\"; }\n\tShellBot.username() { echo \"${_BOT_INFO_[3]}\"; }\n  \n\tShellBot.getConfig()\n\t{\n\t\tlocal jq_obj\n\n\t\tprintf -v jq_obj '{\"monitor\":%s,\"flush\":%s,\"service\":%s,\"return\":\"%s\",\"delimiter\":\"%s\",\"user\":\"%s\",\"log_file\":\"%s\",\"log_format\":\"%s\"}'\t\\\n\t\t\t\t\t\t\t\"${_BOT_MONITOR_:-false}\"   \\\n\t\t\t\t\t\t\t\"${_BOT_FLUSH_:-false}\"  \t\\\n\t\t\t\t\t\t\t\"${_BOT_SERVICE_:-false}\"   \\\n\t\t\t\t\t\t\t\"${_BOT_TYPE_RETURN_}\"      \\\n\t\t\t\t\t\t\t\"${_BOT_DELM_}\"\t\t\t\t\\\n\t\t\t\t\t\t\t\"${_BOT_USER_SERVICE_}\"     \\\n\t\t\t\t\t\t\t\"${_BOT_LOG_FILE_}\"         \\\n\t\t\t\t\t\t\t\"${_BOT_LOG_FORMAT_}\"\n\n\t\tMethodReturn \"$jq_obj\"\n\n\t\treturn $?\t\n\t}\n\n    ShellBot.regHandleFunction()\n    {\n    \tlocal function data handle args\n    \n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'f:a:d:' \\\n\t\t\t\t\t\t\t\t--longoptions\t'function:,\n\t\t\t\t\t\t\t\t\t\t\t\targs:,\n\t\t\t\t\t\t\t\t\t\t\t\tcallback_data:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n    \n\t\teval set -- \"$param\"\n    \t\t\n\t\twhile :\n\t\tdo\n   \t\t\tcase $1 in\n   \t\t\t\t-f|--function)\n\t\t\t\t\tCheckArgType func \"$1\" \"$2\"\n   \t\t\t\t\tfunction=$2\n   \t\t\t\t\tshift 2\n   \t\t\t\t\t;;\n    \t\t\t-a|--args)\n   \t\t\t\t\targs=$2\n   \t\t\t\t\tshift 2\n   \t\t\t\t\t;;\n   \t\t\t\t-d|--callback_data)\n   \t\t\t\t\tdata=$2\n   \t\t\t\t\tshift 2\n   \t\t\t\t\t;;\n   \t\t\t\t--)\n   \t\t\t\t\tshift\n   \t\t\t\t\tbreak\n   \t\t\t\t\t;;\n   \t\t\tesac\n   \t\tdone\n\n\t\t[[ $function ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-f, --function]\"\n   \t\t[[ $data ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-d, --callback_data]\"\n\n   \t\t[[ ${_BOT_HANDLE_[$data]} ]] && MessageError API \"$_ERR_HANDLE_EXISTS_\" '[-d, --callback_data]'\n\n   \t\t_BOT_HANDLE_[$data]=func:$function' '$args\n\n   \t\treturn 0\n    }\n    \n\tShellBot.regHandleExec()\n    {\n    \tlocal cmd data\n    \n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:d:' \\\n\t\t\t\t\t\t\t\t--longoptions\t'command:,\n\t\t\t\t\t\t\t\t\t\t\t\tcallback_data:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n    \n\t\teval set -- \"$param\"\n    \t\t\n\t\twhile :\n\t\tdo\n   \t\t\tcase $1 in\n   \t\t\t\t-c|--command)\n   \t\t\t\t\tcmd=$2\n   \t\t\t\t\tshift 2\n   \t\t\t\t\t;;\n   \t\t\t\t-d|--callback_data)\n   \t\t\t\t\tdata=$2\n   \t\t\t\t\tshift 2\n   \t\t\t\t\t;;\n   \t\t\t\t--)\n   \t\t\t\t\tshift\n   \t\t\t\t\tbreak\n   \t\t\t\t\t;;\n   \t\t\tesac\n   \t\tdone\n\n\t\t[[ $cmd ]]\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --command]\"\n   \t\t[[ $data ]]\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-d, --callback_data]\"\n\n   \t\t[[ ${_BOT_HANDLE_[$data]} ]] && MessageError API \"$_ERR_HANDLE_EXISTS_\" \"[-d, --callback_data]\"\n\n   \t\t_BOT_HANDLE_[$data]=exec:$cmd\n\n   \t\treturn 0\n    }\n    \n    ShellBot.watchHandle()\n    {\n    \tlocal data flag cmd\n\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t--options 'd' \\\n\t\t\t\t\t\t\t--longoptions 'callback_data' \\\n\t\t\t\t\t\t\t-- \"$@\")\n    \n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-d|--callback_data)\n    \t\t\t\tshift 2\n    \t\t\t\tdata=$1\n    \t\t\t\t;;\n    \t\t\t*)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n\t\t# Handles (somente-leitura)\n\t\treadonly _BOT_HANDLE_\n\n    \t[[ $data ]] || return 1 # vazio\n   \t\n\t\tIFS=':' read -r flag cmd <<< \"${_BOT_HANDLE_[$data]}\"\n\n\t\tcase $flag in\n\t\t\tfunc) $cmd;;\n\t\t\texec) eval \"$cmd\";;\n\t\tesac\n    \n    \t# retorno\n    \treturn 0\n    }\n    \n    ShellBot.getWebhookInfo()\n    {\n    \t# Variável local\n    \tlocal jq_obj\n\t\n    \t# Chama o método getMe passando o endereço da API, seguido do nome do método.\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.})\n    \t\n    \t# Verifica o status de retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \treturn $?\n    }\n    \n    ShellBot.deleteWebhook()\n    {\n    \t# Variável local\n    \tlocal jq_obj\n\t\n    \t# Chama o método getMe passando o endereço da API, seguido do nome do método.\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.})\n    \t\n    \t# Verifica o status de retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \treturn $?\n    }\n    \n    ShellBot.setWebhook()\n    {\n    \tlocal url certificate max_connections allowed_updates jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'u:c:m:a:' \\\n\t\t\t\t\t\t\t --longoptions 'url:, \n    \t\t\t\t\t\t\t\t\t\tcertificate:,\n    \t\t\t\t\t\t\t\t\t\tmax_connections:,\n    \t\t\t\t\t\t\t\t\t\tallowed_updates:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-u|--url)\n    \t\t\t\turl=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-c|--certificate)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\tcertificate=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-m|--max_connections)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tmax_connections=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-a|--allowed_updates)\n    \t\t\t\tallowed_updates=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift \n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $url ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --url]\"\n    \n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${url:+-d url=\"$url\"} \\\n\t\t\t\t\t\t\t\t\t${certificate:+-d certificate=\"$certificate\"} \\\n\t\t\t\t\t\t\t\t\t${max_connections:+-d max_connections=\"$max_connections\"} \\\n\t\t\t\t\t\t\t\t\t${allowed_updates:+-d allowed_updates=\"$allowed_updates\"})\n    \n    \t# Testa o retorno do método.\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \t# Status\n    \treturn $?\n    }\t\n    \n    ShellBot.setChatPhoto()\n    {\n    \tlocal chat_id photo jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:p:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:,photo:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-p|--photo)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\tphoto=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $photo ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-p, --photo]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n \t\t\t\t\t\t\t\t\t${photo:+-F photo=\"$photo\"})\n    \n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\t\n    \t# Status\n    \treturn $?\n    }\n    \n    ShellBot.deleteChatPhoto()\n    {\n    \tlocal chat_id jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id=\"$chat_id\"})\n    \n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n\t\t# Status\n    \treturn $?\n    \n    }\n    \n    ShellBot.setChatTitle()\n    {\n    \t\n    \tlocal chat_id title jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:t:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:,title:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--title)\n    \t\t\t\ttitle=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $title ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --title]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n \t\t\t\t\t\t\t\t\t${title:+-d title=\"$title\"})\n    \n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n\t\t# Status\n    \treturn $?\n    }\n    \n    \n    ShellBot.setChatDescription()\n    {\n    \t\n    \tlocal chat_id description jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:d:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:,description:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-d|--description)\n    \t\t\t\tdescription=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $description ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-d, --description]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n \t\t\t\t\t\t\t\t\t${description:+-d description=\"$description\"})\n    \n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\t\n    \t# Status\n    \treturn $?\n    }\n    \n    ShellBot.pinChatMessage()\n    {\n    \t\n    \tlocal chat_id message_id disable_notification jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:m:n:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\tmessage_id:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-m|--message_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tmessage_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\t\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $message_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --message_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n \t\t\t\t\t\t\t\t\t${message_id:+-d message_id=\"$message_id\"} \\\n \t\t\t\t\t\t\t\t\t${disable_notification:+-d disable_notification=\"$disable_notification\"})\n    \n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\t\n    \t# Status\n    \treturn $?\n    }\n    \n    ShellBot.unpinChatMessage()\n    {\n    \tlocal chat_id jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id=\"$chat_id\"})\n    \n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\t\n    \t# Status\n    \treturn $?\n    }\n    \n    ShellBot.restrictChatMember()\n    {\n    \tlocal chat_id user_id until_date permissions jq_obj\n    \n    \tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:u:d:p:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tuser_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tuntil_date:,\n\t\t\t\t\t\t\t\t\t\t\t\tpermissions:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-u|--user_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tuser_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-d|--until_date)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tuntil_date=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n\t\t\t\t-p|--permissions)\n\t\t\t\t\tpermissions=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $user_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n    \t[[ $permissions ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-p, --permissions]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${user_id:+-d user_id=\"$user_id\"} \\\n\t\t\t\t\t\t\t\t\t${until_date:+-d until_date=\"$until_date\"} \\\n\t\t\t\t\t\t\t\t\t${permissions:+-d permissions=\"$permissions\"})\n    \n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\t\n    \t# Status\n    \treturn $?\n    \t\n    }\n    \n    \n    ShellBot.promoteChatMember()\n    {\n    \tlocal\tchat_id user_id can_change_info can_post_messages \\\n    \t\t\tcan_edit_messages can_delete_messages can_invite_users \\\n    \t\t\tcan_restrict_members can_pin_messages can_promote_members \\\n\t\t\t\tjq_obj\n    \n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:u:i:p:e:d:v:r:f:m:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tuser_id:,\n    \t\t\t\t\t\t\t\t\t\tcan_change_info:,\n    \t\t\t\t\t\t\t\t\t\tcan_post_messages:,\n    \t\t\t\t\t\t\t\t\t\tcan_edit_messages:,\n    \t\t\t\t\t\t\t\t\t\tcan_delete_messages:,\n    \t\t\t\t\t\t\t\t\t\tcan_invite_users:,\n    \t\t\t\t\t\t\t\t\t\tcan_restrict_members:,\n    \t\t\t\t\t\t\t\t\t\tcan_pin_messages:,\n    \t\t\t\t\t\t\t\t\t\tcan_promote_members:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-u|--user_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tuser_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-i|--can_change_info)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tcan_change_info=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-p|--can_post_messages)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tcan_post_messages=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-e|--can_edit_messages)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tcan_edit_messages=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-d|--can_delete_messages)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tcan_delete_messages=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-v|--can_invite_users)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tcan_invite_users=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--can_restrict_members)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tcan_restrict_members=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-f|--can_pin_messages)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tcan_pin_messages=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\t\n    \t\t\t-m|--can_promote_members)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tcan_promote_members=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $user_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --user_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${user_id:+-d user_id=\"$user_id\"} \\\n\t\t\t\t\t\t\t\t\t${can_change_info:+-d can_change_info=\"$can_change_info\"} \\\n\t\t\t\t\t\t\t\t\t${can_post_messages:+-d can_post_messages=\"$can_post_messages\"} \\\n\t\t\t\t\t\t\t\t\t${can_edit_messages:+-d can_edit_messages=\"$can_edit_messages\"} \\\n\t\t\t\t\t\t\t\t\t${can_delete_messages:+-d can_delete_messages=\"$can_delete_messages\"} \\\n\t\t\t\t\t\t\t\t\t${can_invite_users:+-d can_invite_users=\"$can_invite_users\"} \\\n\t\t\t\t\t\t\t\t\t${can_restrict_members:+-d can_restrict_members=\"$can_restrict_members\"} \\\n\t\t\t\t\t\t\t\t\t${can_pin_messages:+-d can_pin_messages=\"$can_pin_messages\"} \\\n\t\t\t\t\t\t\t\t\t${can_promote_members:+-d can_promote_members=\"$can_promote_members\"})\n    \n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\t\n    \t# Status\n    \treturn $?\n    }\n    \n    ShellBot.exportChatInviteLink()\n    {\n    \tlocal chat_id jq_obj\n    \n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id=\"$chat_id\"})\n    \t\n    \t# Testa o retorno do método.\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\t\n    \t# Status\n    \treturn $?\n    }\n    \n    ShellBot.sendVideoNote()\n    {\n    \tlocal chat_id video_note duration length disable_notification \\\n    \t\t\treply_to_message_id reply_markup jq_obj\n    \n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:v:t:l:n:r:k:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tvideo_note:,\n    \t\t\t\t\t\t\t\t\t\tduration:,\n    \t\t\t\t\t\t\t\t\t\tlength:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-v|--video_note)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\tvideo_note=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--duration)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tduration=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-l|--length)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tlength=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]]\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $video_note ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-v, --video_note]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${video_note:+-F video_note=\"$video_note\"} \\\n\t\t\t\t\t\t\t\t\t${duration:+-F duration=\"$duration\"} \\\n\t\t\t\t\t\t\t\t\t${length:+-F length=\"$length\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n\t\t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \n    \t# Testa o retorno do método.\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \t# Status\n    \treturn $?\n    }\n    \n    \n    ShellBot.InlineKeyboardButton()\n    {\n        local \t__button __line __text __url __callback_data \\\n                __switch_inline_query __switch_inline_query_current_chat\n    \n        local __param=$(getopt \t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t \t--options 'b:l:t:u:c:q:s:' \\\n\t\t\t\t\t\t\t \t--longoptions 'button:,\n\t\t\t\t\t\t\t\t\t\t\t\tline:,\n\t\t\t\t\t\t\t\t\t\t\t\ttext:,\n\t\t\t\t\t\t\t\t\t\t\t\turl:,\n\t\t\t\t\t\t\t\t\t\t\t\tcallback_data:,\n\t\t\t\t\t\t\t\t\t\t\t\tswitch_inline_query:,\n\t\t\t\t\t\t\t\t\t\t\t\tswitch_inline_query_chat:' \\\n\t\t\t\t\t\t\t \t-- \"$@\")\n    \n    \teval set -- \"$__param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-b|--button)\n    \t\t\t\t# Ponteiro que recebe o endereço de \"button\" com as definições\n    \t\t\t\t# da configuração do botão inserido.\n\t\t\t\t\tCheckArgType var \"$1\" \"$2\"\n    \t\t\t\t__button=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-l|--line)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\t__line=$(($2-1))\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--text)\n\t\t\t\t\t__text=$(echo -e \"$2\")\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-u|--url)\n    \t\t\t\t__url=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-c|--callback_data)\n    \t\t\t\t__callback_data=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-q|--switch_inline_query)\n    \t\t\t\t__switch_inline_query=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-s|--switch_inline_query_current_chat)\n    \t\t\t\t__switch_inline_query_current_chat=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \n    \t[[ $__button ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-b, --button]\"\n    \t[[ $__text ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --text]\"\n    \t[[ $__callback_data ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --callback_data]\"\n    \t[[ $__line ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-l, --line]\"\n    \t\n\t\t__button=$__button[$__line]\n\n\t\tprintf -v $__button '%s' \"${!__button#[}\"\n\t\tprintf -v $__button '%s' \"${!__button%]}\"\n\t\t\n\t\tprintf -v $__button '%s {\"text\": \"%s\", \"callback_data\": \"%s\", \"url\": \"%s\", \"switch_inline_query\": \"%s\", \"switch_inline_query_current_chat\": \"%s\"}' \t\\\n\t\t\t\t\t\t\t\"${!__button:+${!__button},}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__text}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__callback_data}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__url}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__switch_inline_query}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__switch_inline_query_current_chat}\"\n\n\t\tprintf -v $__button '%s' \"[${!__button}]\"\n\n    \treturn $?\n    }\n    \n    ShellBot.InlineKeyboardMarkup()\n    {\n    \tlocal __button __keyboard\n\n        local __param=$(getopt \t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t \t--options 'b:' \\\n\t\t\t\t\t\t\t \t--longoptions 'button:' \\\n\t\t\t\t\t\t\t \t-- \"$@\")\n    \n    \teval set -- \"$__param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-b|--button)\n    \t\t\t\t# Ponteiro que recebe o endereço da variável \"teclado\" com as definições\n    \t\t\t\t# de configuração do botão inserido.\n\t\t\t\t\tCheckArgType var \"$1\" \"$2\"\n    \t\t\t\t__button=\"$2\"\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $__button ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-b, --button]\"\n    \n\t\t__button=$__button[@]\n\n\t\tprintf -v __keyboard '%s,' \"${!__button}\"\n\t\tprintf -v __keyboard '%s' \"${__keyboard%,}\"\n\n    \t# Constroi a estrutura dos objetos + array keyboard, define os valores e salva as configurações.\n    \t# Por padrão todos os valores são 'false' até que seja definido.\n\t\tprintf '{\"inline_keyboard\": [%s]}' \"${__keyboard}\"\n    \n\t\treturn $?\n    }\n    \n    ShellBot.answerCallbackQuery()\n    {\n    \tlocal callback_query_id text show_alert url cache_time jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:t:s:u:e:' \\\n    \t\t\t\t\t\t --longoptions 'callback_query_id:,\n    \t\t\t\t\t\t\t\t\t\ttext:,\n    \t\t\t\t\t\t\t\t\t\tshow_alert:,\n    \t\t\t\t\t\t\t\t\t\turl:,\n    \t\t\t\t\t\t\t\t\t\tcache_time:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--callback_query_id)\n    \t\t\t\tcallback_query_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--text)\n\t\t\t\t\ttext=$(echo -e \"$2\")\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-s|--show_alert)\n    \t\t\t\t# boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tshow_alert=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-u|--url)\n    \t\t\t\turl=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-e|--cache_time)\n    \t\t\t\t# inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tcache_time=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $callback_query_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --callback_query_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${callback_query_id:+-d callback_query_id=\"$callback_query_id\"} \\\n\t\t\t\t\t\t\t\t\t${text:+-d text=\"$text\"} \\\n\t\t\t\t\t\t\t\t\t${show_alert:+-d show_alert=\"$show_alert\"} \\\n\t\t\t\t\t\t\t\t\t${url:+-d url=\"$url\"} \\\n\t\t\t\t\t\t\t\t\t${cache_time:+-d cache_time=\"$cache_time\"})\n    \n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n    }\n    \n    # Cria objeto que representa um teclado personalizado com opções de resposta\n    ShellBot.ReplyKeyboardMarkup()\n    {\n    \t# Variáveis locais\n    \tlocal __button __resize_keyboard __on_time_keyboard __selective __keyboard\n    \t\n    \t# Lê os parâmetros da função.\n    \tlocal __param=$(getopt \t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t \t--options 'b:r:t:s:' \\\n    \t\t\t\t\t\t \t--longoptions 'button:,\n    \t\t\t\t\t\t\t\t\t\tresize_keyboard:,\n    \t\t\t\t\t\t\t\t\t\tone_time_keyboard:,\n    \t\t\t\t\t\t\t\t\t\tselective:' \\\n    \t\t\t\t\t\t \t-- \"$@\")\n    \t\n    \t# Transforma os parâmetros da função em parâmetros posicionais\n    \t#\n    \t# Exemplo:\n    \t#\t--param1 arg1 --param2 arg2 --param3 arg3 ...\n    \t# \t\t$1\t\t\t  $2\t\t\t$3\n    \teval set -- \"$__param\"\n    \t\n    \t# Aguarda leitura dos parâmetros\n    \twhile :\n    \tdo\n    \t\t# Lê o parâmetro da primeira posição \"$1\"; Se for um parâmetro válido,\n    \t\t# salva o valor do argumento na posição '$2' e desloca duas posições a esquerda (shift 2); Repete o processo\n    \t\t# até que o valor de '$1' seja igual '--' e finaliza o loop.\n    \t\tcase $1 in\n    \t\t\t-b|--button)\n\t\t\t\t\tCheckArgType var \"$1\" \"$2\"\n    \t\t\t\t__button=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--resize_keyboard)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\t__resize_keyboard=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--one_time_keyboard)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\t__on_time_keyboard=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-s|--selective)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\t__selective=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Imprime mensagem de erro se o parâmetro obrigatório for omitido.\n    \t[[ $__button ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-b, --button]\"\n\t\t\n\t\t__button=$__button[@]\n\n\t\tprintf -v __keyboard '%s,' \"${!__button}\"\n\t\tprintf -v __keyboard '%s' \"${__keyboard%,}\"\n\n    \t# Constroi a estrutura dos objetos + array keyboard, define os valores e salva as configurações.\n    \t# Por padrão todos os valores são 'false' até que seja definido.\n\t\tprintf '{\"keyboard\": [%s], \"resize_keyboard\": %s, \"one_time_keyboard\": %s, \"selective\": %s}'\t\\\n\t\t\t\t\"${__keyboard}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\"${__resize_keyboard:-false}\" \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\"${__on_time_keyboard:-false}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\"${__selective:-false}\"\n\n    \t# status\n    \treturn $?\n    }\n\n\tShellBot.KeyboardButton()\n\t{\n\t\tlocal __text __contact __location __button __line __request_poll\n\n\t\tlocal __param=$(getopt\t--name \"$FUNCNAME\"\t\\\n\t\t\t\t\t\t\t\t--options 'b:l:t:c:o:r:'\t\\\n\t\t\t\t\t\t\t\t--longoptions 'button:,\n\t\t\t\t\t\t\t\t\t\t\t\tline:,\n\t\t\t\t\t\t\t\t\t\t\t\ttext:,\n\t\t\t\t\t\t\t\t\t\t\t\trequest_contact:,\n\t\t\t\t\t\t\t\t\t\t\t\trequest_location:,\n\t\t\t\t\t\t\t\t\t\t\t\trequest_poll:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\n\t\teval set -- \"$__param\"\n\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-b|--button)\n\t\t\t\t\tCheckArgType var \"$1\" \"$2\"\n\t\t\t\t\t__button=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-l|--line)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\t__line=$(($2-1))\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-t|--text)\n\t\t\t\t\t__text=$(echo -e \"$2\")\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-c|--request_contact)\n\t\t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\t__contact=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-o|--request_location)\n\t\t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\t__location=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-r|--request_poll)\n\t\t\t\t\t__request_poll=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n    \t[[ $__button ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-b, --button]\"\n    \t[[ $__text ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --text]\"\n    \t[[ $__line ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-l, --line]\"\n    \n\t\t__button=$__button[$__line]\n\n\t\tprintf -v $__button '%s' \"${!__button#[}\"\n\t\tprintf -v $__button '%s' \"${!__button%]}\"\n\t\t\n\t\tprintf -v $__button '%s {\"text\": \"%s\", \"request_contact\": %s, \"request_location\": %s, \"request_poll\": %s}' \t\\\n\t\t\t\t\t\t\t\"${!__button:+${!__button},}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__text}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__contact:-false}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__location:-false}\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"${__request_poll:-\\\"\\\"}\"\n\n\t\tprintf -v $__button '%s' \"[${!__button}]\"\n\n    \treturn $?\n\t}\n\t\n\tShellBot.ForceReply()\n\t{\n\t\tlocal selective\n\n\t\tlocal param=$(getopt \t--name \"$FUNCNAME\" \t\t\t\\\n\t\t\t\t\t\t\t\t--options 's:' \t\t\t\t\\\n\t\t\t\t\t\t\t\t--longoptions 'selective:' \t\\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-s|--selective)\n\t\t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\tselective=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\tprintf '{\"force_reply\": true, \"selective\": %s}' ${selective:-false}\n\n\t\treturn $?\n\t}\n\n\tShellBot.ReplyKeyboardRemove()\n\t{\n\t\tlocal selective\n\n\t\tlocal param=$(getopt \t--name \"$FUNCNAME\" \t\t\t\\\n\t\t\t\t\t\t\t\t--options 's:' \t\t\t\t\\\n\t\t\t\t\t\t\t\t--longoptions 'selective:' \t\\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-s|--selective)\n\t\t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\tselective=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\tprintf '{\"remove_keyboard\": true, \"selective\": %s}' ${selective:-false}\n\n\t\treturn $?\n\t}\n\n    # Envia mensagens \n    ShellBot.sendMessage()\n    {\n    \t# Variáveis locais \n    \tlocal chat_id text parse_mode disable_web_page_preview\n\t\tlocal disable_notification reply_to_message_id reply_markup jq_obj\n    \t\n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:t:p:w:n:r:k:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\ttext:,\n    \t\t\t\t\t\t\t\t\t\tparse_mode:,\n    \t\t\t\t\t\t\t\t\t\tdisable_web_page_preview:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--text)\n\t\t\t\t\ttext=$(echo -e \"$2\")\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-p|--parse_mode)\n    \t\t\t\t# Tipo: \"markdown\" ou \"html\"\n    \t\t\t\tparse_mode=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-w|--disable_web_page_preview)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_web_page_preview=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \n    \t# Parâmetros obrigatórios.\n    \t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $text ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --text]\"\n    \n    \t# Chama o método da API, utilizando o comando request especificado; Os parâmetros \n    \t# e valores são passados no form e lidos pelo método. O retorno do método é redirecionado para o arquivo 'update.Json'.\n    \t# Variáveis com valores nulos são ignoradas e consequentemente os respectivos parâmetros omitidos.\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${text:+-d text=\"$text\"} \\\n\t\t\t\t\t\t\t\t\t${parse_mode:+-d parse_mode=\"$parse_mode\"} \\\n\t\t\t\t\t\t\t\t\t${disable_web_page_preview:+-d disable_web_page_preview=\"$disable_web_page_preview\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-d disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-d reply_to_message_id=\"$reply_to_message_id\"} \\\n\t\t\t\t\t\t\t\t\t${reply_markup:+-d reply_markup=\"$reply_markup\"})\n   \n    \t# Testa o retorno do método.\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \t# Status\n    \treturn $?\n    }\n    \n    # Função para reencaminhar mensagens de qualquer tipo.\n    ShellBot.forwardMessage()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id form_chat_id disable_notification message_id jq_obj\n    \t\n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:f:n:m:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tfrom_chat_id:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\tmessage_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=\"$2\"\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-f|--from_chat_id)\n    \t\t\t\tfrom_chat_id=\"$2\"\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=\"$2\"\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-m|--message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tmessage_id=\"$2\"\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios.\n    \t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $from_chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-f, --from_chat_id]\"\n    \t[[ $message_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --message_id]\"\n    \n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${from_chat_id:+-d from_chat_id=\"$from_chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-d disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${message_id:+-d message_id=\"$message_id\"})\n    \t\n    \t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# status\n    \treturn $?\n    }\n    \n    # Utilize essa função para enviar fotos.\n    ShellBot.sendPhoto()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id photo caption disable_notification \n\t\tlocal parse_mode reply_to_message_id reply_markup jq_obj\n\n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:p:t:m:n:r:k:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:, \n    \t\t\t\t\t\t\t\t\t\tphoto:,\n    \t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-p|--photo)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\tphoto=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--caption)\n    \t\t\t\t# Limite máximo de caracteres: 200\n\t\t\t\t\tcaption=$(echo -e \"$2\")\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n\t\t\t\t-m|--parse_mode)\n\t\t\t\t\tparse_mode=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios\n    \t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $photo ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-p, --photo]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${photo:+-F photo=\"$photo\"} \\\n\t\t\t\t\t\t\t\t\t${caption:+-F caption=\"$caption\"} \\\n\t\t\t\t\t\t\t\t\t${parse_mode:+-F parse_mode=\"$parse_mode\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n\t\t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \t\n    \t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    }\n    \n    # Utilize essa função para enviar arquivos de audio.\n    ShellBot.sendAudio()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id audio caption duration performer title \n\t\tlocal parse_mode disable_notification reply_to_message_id reply_markup jq_obj\n    \t\n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:a:t:m:d:e:i:n:r:k' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\taudio:,\n    \t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n    \t\t\t\t\t\t\t\t\t\tduration:,\n    \t\t\t\t\t\t\t\t\t\tperformer:,\n    \t\t\t\t\t\t\t\t\t\ttitle:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\t\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-a|--audio)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\taudio=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--caption)\n\t\t\t\t\tcaption=$(echo -e \"$2\")\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n\t\t\t\t-m|--parse_mode)\n\t\t\t\t\tparse_mode=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-d|--duration)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tduration=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-e|--performer)\n    \t\t\t\tperformer=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-i|--title)\n    \t\t\t\ttitle=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios\n    \t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $audio ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-a, --audio]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${audio:+-F audio=\"$audio\"} \\\n\t\t\t\t\t\t\t\t\t${caption:+-F caption=\"$caption\"} \\\n\t\t\t\t\t\t\t\t\t${parse_mode:+-F parse_mode=\"$parse_mode\"} \\\n\t\t\t\t\t\t\t\t\t${duration:+-F duration=\"$duration\"} \\\n\t\t\t\t\t\t\t\t\t${performer:+-F performer=\"$performer\"} \\\n\t\t\t\t\t\t\t\t\t${title:+-F title=\"$title\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n\t\t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \n    \t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    \t\t\n    }\n    \n    # Utilize essa função para enviar documentos.\n    ShellBot.sendDocument()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id document caption disable_notification \n\t\tlocal parse_mode reply_to_message_id reply_markup jq_obj\n    \t\n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:d:t:m:n:r:k:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\tdocument:,\n    \t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-d|--document)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\tdocument=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--caption)\n\t\t\t\t\tcaption=$(echo -e \"$2\")\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n\t\t\t\t-m|--parse_mode)\n\t\t\t\t\tparse_mode=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $document ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-d, --document]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${document:+-F document=\"$document\"} \\\n\t\t\t\t\t\t\t\t\t${caption:+-F caption=\"$caption\"} \\\n\t\t\t\t\t\t\t\t\t${parse_mode:+-F parse_mode=\"$parse_mode\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n\t\t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \n    \t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    \t\n    }\n    \n    # Utilize essa função para enviat stickers\n    ShellBot.sendSticker()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id sticker disable_notification reply_to_message_id reply_markup jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:s:n:r:k:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tsticker:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-s|--sticker)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\tsticker=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $sticker ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --sticker]\"\n    \n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${sticker:+-F sticker=\"$sticker\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n\t\t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    }\n   \n\tShellBot.getStickerSet()\n\t{\n\t\tlocal name jq_obj\n\t\t\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'n:' \\\n\t\t\t\t\t\t\t --longoptions 'name:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n\t\t\n\t\t# parâmetros posicionais\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-n|--name)\n\t\t\t\t\tname=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n    \t\n\t\t[[ $name ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-n, --name]\"\n    \t\n\t\tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${name:+-d name=\"$name\"})\n    \n\t\t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t} \n\t\n\tShellBot.uploadStickerFile()\n\t{\n\t\tlocal user_id png_sticker jq_obj\n\t\t\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'u:s:' \\\n\t\t\t\t\t\t\t --longoptions 'user_id:,\n\t\t\t\t\t\t\t\t\t\t\tpng_sticker:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-u|--user_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tuser_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-s|--png_sticker)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n\t\t\t\t\tpng_sticker=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\tesac\n\t\tdone\n\n\t\t[[ $user_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n\t\t[[ $png_sticker ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --png_sticker]\"\n    \t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${user_id:+-F user_id=\"$user_id\"} \\\n\t\t\t\t\t\t\t\t\t${png_sticker:+-F png_sticker=\"$png_sticker\"})\n    \t\n\t\t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t\t\t\t\t\n\t}\n\n\tShellBot.setStickerPositionInSet()\n\t{\n\t\tlocal sticker position jq_obj\n\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 's:p:' \\\n\t\t\t\t\t\t\t --longoptions 'sticker:,\n\t\t\t\t\t\t\t\t\t\t\tposition:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-s|--sticker)\n\t\t\t\t\tsticker=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-p|--position)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tposition=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t\t\n\t\t[[ $sticker ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --sticker]\"\n\t\t[[ $position ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-p, --position]\"\n    \t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${sticker:+-d sticker=\"$sticker\"} \\\n\t\t\t\t\t\t\t\t\t${position:+-d position=\"$position\"})\n    \t\n\t\t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n\t\t# Status\n    \treturn $?\n\t\t\t\t\n\t}\n\t\n\tShellBot.deleteStickerFromSet()\n\t{\n\t\tlocal sticker jq_obj\n\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 's:' \\\n\t\t\t\t\t\t\t --longoptions 'sticker:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-s|--sticker)\n\t\t\t\t\tsticker=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t\t\n\t\t[[ $sticker ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --sticker]\"\n    \t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${sticker:+-d sticker=\"$sticker\"})\n    \t\n\t\t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n\t\t# Status\n    \treturn $?\n\t\t\t\t\n\t}\n\t\n\tShellBot.stickerMaskPosition()\n\t{\n\n\t\tlocal point x_shift y_shift scale zoom\n\t\t\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'p:x:y:s:z:' \\\n\t\t\t\t\t\t\t --longoptions 'point:,\n\t\t\t\t\t\t\t\t\t\t\tx_shift:,\n\t\t\t\t\t\t\t\t\t\t\ty_shift:,\n\t\t\t\t\t\t\t\t\t\t\tscale:,\n\t\t\t\t\t\t\t\t\t\t\tzoom:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-p|--point)\n\t\t\t\t\tpoint=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-x|--x_shift)\n\t\t\t\t\tCheckArgType float \"$1\" \"$2\"\n\t\t\t\t\tx_shift=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-y|--y_shift)\n\t\t\t\t\tCheckArgType float \"$1\" \"$2\"\n\t\t\t\t\ty_shift=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-s|--scale)\n\t\t\t\t\tCheckArgType float \"$1\" \"$2\"\n\t\t\t\t\tscale=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-z|--zoom)\n\t\t\t\t\tCheckArgType float \"$1\" \"$2\"\n\t\t\t\t\tzoom=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t\t\n\t\t[[ $point ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-p, --point]\"\n\t\t[[ $x_shift ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-x, --x_shift]\"\n\t\t[[ $y_shift ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-y, --y_shift]\"\n\t\t[[ $scale ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --scale]\"\n\t\t[[ $zoom ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-z, --zoom]\"\n\t\t\n\t\tcat << _EOF\n{ \"point\": \"$point\", \"x_shift\": $x_shift, \"y_shift\": $y_shift, \"scale\": $scale, \"zoom\": $zoom }\n_EOF\n\n\treturn 0\n\n\t}\n\n\tShellBot.createNewStickerSet()\n\t{\n\t\tlocal user_id name title png_sticker emojis contains_masks mask_position jq_obj\n\t\t\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'u:n:t:s:e:c:m:' \\\n\t\t\t\t\t\t\t --longoptions 'user_id:,\n\t\t\t\t\t\t\t\t\t\t\tname:,\n\t\t\t\t\t\t\t\t\t\t\ttitle:,\n\t\t\t\t\t\t\t\t\t\t\tpng_sticker:,\n\t\t\t\t\t\t\t\t\t\t\temojis:,\n\t\t\t\t\t\t\t\t\t\t\tcontains_mask:,\n\t\t\t\t\t\t\t\t\t\t\tmask_position:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-u|--user_id)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tuser_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-n|--name)\n\t\t\t\t\tname=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-t|--title)\n\t\t\t\t\ttitle=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-s|--png_sticker)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n\t\t\t\t\tpng_sticker=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-e|--emojis)\n\t\t\t\t\temojis=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-c|--contains_masks)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\tcontains_masks=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-m|--mask_position)\n\t\t\t\t\tmask_position=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t\t\n\t\t[[ $user_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n\t\t[[ $name ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-n, --name]\"\n\t\t[[ $title ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --title]\"\n\t\t[[ $png_sticker ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --png_sticker]\"\n\t\t[[ $emojis ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-e, --emojis]\"\n\t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${user_id:+-F user_id=\"$user_id\"} \\\n\t\t\t\t\t\t\t\t\t${name:+-F name=\"$name\"} \\\n\t\t\t\t\t\t\t\t\t${title:+-F title=\"$title\"} \\\n\t\t\t\t\t\t\t\t\t${png_sticker:+-F png_sticker=\"$png_sticker\"} \\\n\t\t\t\t\t\t\t\t\t${emojis:+-F emojis=\"$emojis\"} \\\n\t\t\t\t\t\t\t\t\t${contains_masks:+-F contains_masks=\"$contains_masks\"} \\\n\t\t\t\t\t\t\t\t\t${mask_position:+-F mask_position=\"$mask_position\"})\n    \t\n\t\t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n\t\t# Status\n    \treturn $?\n\t\t\t\n\t}\n\t\n\tShellBot.addStickerToSet()\n\t{\n\t\tlocal user_id name png_sticker emojis mask_position jq_obj\n\t\t\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'u:n:s:e:m:' \\\n\t\t\t\t\t\t\t --longoptions 'user_id:,\n\t\t\t\t\t\t\t\t\t\t\tname:,\n\t\t\t\t\t\t\t\t\t\t\tpng_sticker:,\n\t\t\t\t\t\t\t\t\t\t\temojis:,\n\t\t\t\t\t\t\t\t\t\t\tmask_position:' \\\n\t\t\t\t\t\t\t -- \"$@\")\n\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-u|--user_id)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tuser_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-n|--name)\n\t\t\t\t\tname=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-s|--png_sticker)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n\t\t\t\t\tpng_sticker=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-e|--emojis)\n\t\t\t\t\temojis=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-m|--mask_position)\n\t\t\t\t\tmask_position=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t\t\n\t\t[[ $user_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n\t\t[[ $name ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-n, --name]\"\n\t\t[[ $png_sticker ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --png_sticker]\"\n\t\t[[ $emojis ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-e, --emojis]\"\n\t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${user_id:+-F user_id=\"$user_id\"} \\\n\t\t\t\t\t\t\t\t\t${name:+-F name=\"$name\"} \\\n\t\t\t\t\t\t\t\t\t${png_sticker:+-F png_sticker=\"$png_sticker\"} \\\n\t\t\t\t\t\t\t\t\t${emojis:+-F emojis=\"$emojis\"} \\\n\t\t\t\t\t\t\t\t\t${mask_position:+-F mask_position=\"$mask_position\"})\n    \t\n\t\t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n\t\t# Status\n    \treturn $?\n\t\t\t\n\t}\n\n    # Função para enviar arquivos de vídeo.\n    ShellBot.sendVideo()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id video duration width height caption disable_notification\n\t\tlocal parse_mode reply_to_message_id reply_markup jq_obj supports_streaming\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:v:d:w:h:t:m:n:r:k:s:' \\\n\t\t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tvideo:,\n    \t\t\t\t\t\t\t\t\t\tduration:,\n    \t\t\t\t\t\t\t\t\t\twidth:,\n    \t\t\t\t\t\t\t\t\t\theight:,\n    \t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:,\n\t\t\t\t\t\t\t\t\t\t\tsupports_streaming:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-v|--video)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\tvideo=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-d|--duration)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tduration=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-w|--width)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\twidth=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-h|--height)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\theight=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--caption)\n\t\t\t\t\tcaption=$(echo -e \"$2\")\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n\t\t\t\t-m|--parse_mode)\n\t\t\t\t\tparse_mode=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n\t\t\t\t-s|--supports_streaming)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\tsupports_streaming=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios.\n    \t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $video ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-v, --video]\"\n    \n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${video:+-F video=\"$video\"} \\\n\t\t\t\t\t\t\t\t\t${duration:+-F duration=\"$duration\"} \\\n\t\t\t\t\t\t\t\t\t${width:+-F width=\"$width\"} \\\n\t\t\t\t\t\t\t\t\t${height:+-F height=\"$height\"} \\\n\t\t\t\t\t\t\t\t\t${caption:+-F caption=\"$caption\"} \\\n\t\t\t\t\t\t\t\t\t${parse_mode:+-F parse_mode=\"$parse_mode\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n    \t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"} \\\n\t\t\t\t\t\t\t\t\t${supports_streaming:+-F supports_streaming=\"$supports_streaming\"})\n    \n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    \t\n    }\n    \n    # Função para enviar audio.\n    ShellBot.sendVoice()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id voice caption duration disable_notification \n\t\tlocal parse_mode reply_to_message_id reply_markup jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:v:t:m:d:n:r:k:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tvoice:,\n    \t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n    \t\t\t\t\t\t\t\t\t\tduration:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-v|--voice)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n    \t\t\t\tvoice=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--caption)\n\t\t\t\t\tcaption=$(echo -e \"$2\")\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n\t\t\t\t-m|--parse_mode)\n\t\t\t\t\tparse_mode=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-d|--duration)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tduration=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n\t\t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios.\n    \t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $voice ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-v, --voice]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${voice:+-F voice=\"$voice\"} \\\n    \t\t\t\t\t\t\t\t${caption:+-F caption=\"$caption\"} \\\n\t\t\t\t\t\t\t\t\t${parse_mode:+-F parse_mode=\"$parse_mode\"} \\\n    \t\t\t\t\t\t\t\t${duration:+-F duration=\"$duration\"} \\\n    \t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n    \t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    \t\n    }\n    \n    # Função utilizada para enviar uma localidade utilizando coordenadas de latitude e longitude.\n    ShellBot.sendLocation()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id latitude longitude live_period\n\t\tlocal disable_notification reply_to_message_id reply_markup jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:l:g:p:n:r:k:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tlatitude:,\n    \t\t\t\t\t\t\t\t\t\tlongitude:,\n\t\t\t\t\t\t\t\t\t\t\tlive_period:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-l|--latitude)\n    \t\t\t\t# Tipo: float\n    \t\t\t\tCheckArgType float \"$1\" \"$2\"\n    \t\t\t\tlatitude=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-g|--longitude)\n    \t\t\t\t# Tipo: float\n    \t\t\t\tCheckArgType float \"$1\" \"$2\"\n    \t\t\t\tlongitude=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n\t\t\t\t-p|--live_period)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tlive_period=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n\t\t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios\n    \t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $latitude ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-l, --latitude]\"\n    \t[[ $longitude ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-g, --longitude]\"\n    \t\t\t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${latitude:+-F latitude=\"$latitude\"} \\\n    \t\t\t\t\t\t\t\t${longitude:+-F longitude=\"$longitude\"} \\\n\t\t\t\t\t\t\t\t\t${live_period:+-F live_period=\"$live_period\"} \\\n    \t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n    \t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n    \t\n    }\n    \n    # Função utlizada para enviar detalhes de um local.\n    ShellBot.sendVenue()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id latitude longitude title address foursquare_id disable_notification reply_to_message_id reply_markup jq_obj\n    \t\n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:l:g:i:a:f:n:r:k:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tlatitude:,\n    \t\t\t\t\t\t\t\t\t\tlongitude:,\n    \t\t\t\t\t\t\t\t\t\ttitle:,\n    \t\t\t\t\t\t\t\t\t\taddress:,\n    \t\t\t\t\t\t\t\t\t\tfoursquare_id:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-l|--latitude)\n    \t\t\t\t# Tipo: float\n    \t\t\t\tCheckArgType float \"$1\" \"$2\"\n    \t\t\t\tlatitude=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-g|--longitude)\n    \t\t\t\t# Tipo: float\n    \t\t\t\tCheckArgType float \"$1\" \"$2\"\n    \t\t\t\tlongitude=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-i|--title)\n    \t\t\t\ttitle=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-a|--address)\n    \t\t\t\taddress=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-f|--foursquare_id)\n    \t\t\t\tfoursquare_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n\t\t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\t\t\n    \t# Parâmetros obrigatórios.\n    \t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $latitude ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-l, --latitude]\"\n    \t[[ $longitude ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-g, --longitude]\"\n    \t[[ $title ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-i, --title]\"\n    \t[[ $address ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-a, --address]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${latitude:+-F latitude=\"$latitude\"} \\\n    \t\t\t\t\t\t\t\t${longitude:+-F longitude=\"$longitude\"} \\\n    \t\t\t\t\t\t\t\t${title:+-F title=\"$title\"} \\\n    \t\t\t\t\t\t\t\t${address:+-F address=\"$address\"} \\\n    \t\t\t\t\t\t\t\t${foursquare_id:+-F foursquare_id=\"$foursquare_id\"} \\\n    \t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n    \t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    }\n    \n    # Utilize essa função para enviar um contato + numero\n    ShellBot.sendContact()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id phone_number first_name last_name disable_notification reply_to_message_id reply_markup jq_obj\n    \t\n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:p:f:l:n:r:k:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tphone_number:,\n    \t\t\t\t\t\t\t\t\t\tfirst_name:,\n    \t\t\t\t\t\t\t\t\t\tlast_name:,\n    \t\t\t\t\t\t\t\t\t\tdisable_notification:,\n    \t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-p|--phone_number)\n    \t\t\t\tphone_number=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-f|--first_name)\n    \t\t\t\tfirst_name=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-l|--last_name)\n    \t\t\t\tlast_name=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-n|--disable_notification)\n    \t\t\t\t# Tipo: boolean\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\tdisable_notification=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_to_message_id)\n    \t\t\t\t# Tipo: inteiro\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-k|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n\t\t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios.\t\n    \t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $phone_number ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-p, --phone_number]\"\n    \t[[ $first_name ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-f, --first_name]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${phone_number:+-F phone_number=\"$phone_number\"} \\\n    \t\t\t\t\t\t\t\t${first_name:+-F first_name=\"$first_name\"} \\\n    \t\t\t\t\t\t\t\t${last_name:+-F last_name=\"$last_name\"} \\\n    \t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n    \t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})\n    \n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    }\n    \n    # Envia uma ação para bot.\n    ShellBot.sendChatAction()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id action jq_obj\n    \t\n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:a:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\taction:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-a|--action)\n    \t\t\t\taction=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n\t\t\t\t\t;;\n    \t\tesac\n    \tdone\n    \n    \t# Parâmetros obrigatórios.\t\t\n    \t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $action ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-a, --action]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${action:+-d action=\"$action\"})\n    \t\n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    }\n    \n    # Utilize essa função para obter as fotos de um determinado usuário.\n    ShellBot.getUserProfilePhotos()\n    {\n    \t# Variáveis locais \n    \tlocal user_id offset limit ind last index max item total jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'u:o:l:' \\\n    \t\t\t\t\t\t --longoptions 'user_id:,\n    \t\t\t\t\t\t\t\t\t\toffset:,\n    \t\t\t\t\t\t\t\t\t\tlimit:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \t\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-u|--user_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tuser_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-o|--offset)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\toffset=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-l|--limit)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tlimit=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios.\n    \t[[ $user_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${user_id:+-d user_id=\"$user_id\"} \\\n\t\t\t\t\t\t\t\t\t${offset:+-d offset=\"$offset\"} \\\n\t\t\t\t\t\t\t\t\t${limit:+-d limit=\"$limit\"})\n  \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \t# Status\n    \treturn $?\n    }\n    \n    # Função para listar informações do arquivo especificado.\n    ShellBot.getFile()\n    {\n    \t# Variáveis locais\n    \tlocal file_id jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'f:' \\\n    \t\t\t\t\t\t --longoptions 'file_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-f|--file_id)\n    \t\t\t\tfile_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parâmetros obrigatórios.\n    \t[[ $file_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-f, --file_id]\"\n    \t\n    \t# Chama o método.\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${file_id:+-d file_id=\"$file_id\"})\n    \n    \t# Testa o retorno do método.\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    }\t\t\n    \n    # Essa função kicka o usuário do chat ou canal. (somente administradores)\n    ShellBot.kickChatMember()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id user_id until_date jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:u:d:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tuser_id:,\n    \t\t\t\t\t\t\t\t\t\tuntil_date:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \t# Trata os parâmetros\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-u|--user_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tuser_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-d|--until_date)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tuntil_date=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t# Parametros obrigatórios.\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $user_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n    \t\n    \t# Chama o método\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${user_id:+-d user_id=\"$user_id\"} \\\n    \t\t\t\t\t\t\t\t${until_date:+-d until_date=\"$until_date\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n    }\n    \n    # Utilize essa função para remove o bot do grupo ou canal.\n    ShellBot.leaveChat()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id=\"$chat_id\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n    \t\n    }\n    \n    ShellBot.unbanChatMember()\n    {\n    \tlocal chat_id user_id jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:u:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tuser_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-u|--user_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tuser_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $user_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${user_id:+-d user_id=\"$user_id\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n    }\n    \n    ShellBot.getChat()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id=\"$chat_id\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \t# Status\n    \treturn $?\n    }\n    \n    ShellBot.getChatAdministrators()\n    {\n    \tlocal chat_id total key index jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id=\"$chat_id\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\t\n    \treturn $?\n    }\n    \n    ShellBot.getChatMembersCount()\n    {\n    \tlocal chat_id jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id=\"$chat_id\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n    }\n    \n    ShellBot.getChatMember()\n    {\n    \t# Variáveis locais\n    \tlocal chat_id user_id jq_obj\n    \n    \t# Lê os parâmetros da função\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:u:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t \t\t\t\tuser_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \n    \t\n    \t# Define os parâmetros posicionais\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-c|--chat_id)\n    \t\t\t\tchat_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-u|--user_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tuser_id=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $user_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ GET $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${user_id:+-d user_id=\"$user_id\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n    }\n    \n    ShellBot.editMessageText()\n    {\n    \tlocal chat_id message_id inline_message_id text parse_mode disable_web_page_preview reply_markup jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:m:i:t:p:w:r:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tmessage_id:,\n    \t\t\t\t\t\t\t\t\t\tinline_message_id:,\n    \t\t\t\t\t\t\t\t\t\ttext:,\n    \t\t\t\t\t\t\t\t\t\tparse_mode:,\n    \t\t\t\t\t\t\t\t\t\tdisable_web_page_preview:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\t\tcase $1 in\n    \t\t\t\t-c|--chat_id)\n    \t\t\t\t\tchat_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-m|--message_id)\n    \t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\t\tmessage_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-i|--inline_message_id)\n    \t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\t\tinline_message_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-t|--text)\n\t\t\t\t\t\ttext=$(echo -e \"$2\")\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-p|--parse_mode)\n    \t\t\t\t\tparse_mode=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-w|--disable_web_page_preview)\n    \t\t\t\t\tCheckArgType bool \"$1\" \"$2\"\n    \t\t\t\t\tdisable_web_page_preview=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-r|--reply_markup)\n    \t\t\t\t\treply_markup=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t--)\n    \t\t\t\t\tshift\n    \t\t\t\t\tbreak\n\t\t\t\t\t\t;;\n    \t\t\tesac\n    \tdone\n    \t\n    \t[[ $text ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --text]\"\n\t\t[[ $inline_message_id ]] && unset chat_id message_id || {\n\t\t\t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t\t[[ $message_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --message_id]\"\n\t\t}\n    \t\n    \n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${message_id:+-d message_id=\"$message_id\"} \\\n    \t\t\t\t\t\t\t\t${inline_message_id:+-d inline_message_id=\"$inline_message_id\"} \\\n    \t\t\t\t\t\t\t\t${text:+-d text=\"$text\"} \\\n    \t\t\t\t\t\t\t\t${parse_mode:+-d parse_mode=\"$parse_mode\"} \\\n    \t\t\t\t\t\t\t\t${disable_web_page_preview:+-d disable_web_page_preview=\"$disable_web_page_preview\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-d reply_markup=\"$reply_markup\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \treturn $?\n    \t\n    }\n    \n    ShellBot.editMessageCaption()\n    {\n    \tlocal chat_id message_id inline_message_id \n\t\tlocal parse_mode caption reply_markup jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:m:i:t:p:r:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tmessage_id:,\n    \t\t\t\t\t\t\t\t\t\tinline_message_id:,\n    \t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\t\tcase $1 in\n    \t\t\t\t-c|--chat_id)\n    \t\t\t\t\tchat_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-m|--message_id)\n    \t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\t\tmessage_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-i|--inline_message_id)\n    \t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\t\tinline_message_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-t|--caption)\n\t\t\t\t\t\tcaption=$(echo -e \"$2\")\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n\t\t\t\t\t-p|--parse_mode)\n\t\t\t\t\t\tparse_mode=$2\n\t\t\t\t\t\tshift 2\n\t\t\t\t\t\t;;\n    \t\t\t\t-r|--reply_markup)\n    \t\t\t\t\treply_markup=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t--)\n    \t\t\t\t\tshift\n    \t\t\t\t\tbreak\n\t\t\t\t\t\t;;\n    \t\t\tesac\n    \tdone\n    \t\t\t\t\n    \t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $message_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --message_id]\"\n    \t\n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${message_id:+-d message_id=\"$message_id\"} \\\n    \t\t\t\t\t\t\t\t${inline_message_id:+-d inline_message_id=\"$inline_message_id\"} \\\n    \t\t\t\t\t\t\t\t${caption:+-d caption=\"$caption\"} \\\n\t\t\t\t\t\t\t\t\t${parse_mode:+-d parse_mode=\"$parse_mode\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-d reply_markup=\"$reply_markup\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \treturn $?\n    \t\n    }\n    \n    ShellBot.editMessageReplyMarkup()\n    {\n    \tlocal chat_id message_id inline_message_id reply_markup jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:m:i:r:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tmessage_id:,\n    \t\t\t\t\t\t\t\t\t\tinline_message_id:,\n    \t\t\t\t\t\t\t\t\t\treply_markup:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\t\tcase $1 in\n    \t\t\t\t-c|--chat_id)\n    \t\t\t\t\tchat_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-m|--message_id)\n    \t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\t\tmessage_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-i|--inline_message_id)\n    \t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\t\tinline_message_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-r|--reply_markup)\n    \t\t\t\t\treply_markup=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t--)\n    \t\t\t\t\tshift\n    \t\t\t\t\tbreak\n\t\t\t\t\t\t;;\n    \t\t\tesac\n    \tdone\n\t\t\n\t\t[[ $inline_message_id ]] && unset chat_id message_id || {\n\t\t\t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t\t[[ $message_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --message_id]\"\n\t\t}\n    \n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${message_id:+-d message_id=\"$message_id\"} \\\n     \t\t\t\t\t\t\t\t${inline_message_id:+-d inline_message_id=\"$inline_message_id\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-d reply_markup=\"$reply_markup\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \treturn $?\n    \t\n    }\n    \n    ShellBot.deleteMessage()\n    {\n    \tlocal chat_id message_id jq_obj\n    \t\n    \tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t --options 'c:m:' \\\n    \t\t\t\t\t\t --longoptions 'chat_id:,\n    \t\t\t\t\t\t\t\t\t\tmessage_id:' \\\n    \t\t\t\t\t\t -- \"$@\")\n    \t\n    \teval set -- \"$param\"\n    \n    \twhile :\n    \tdo\n    \t\t\tcase $1 in\n    \t\t\t\t-c|--chat_id)\n    \t\t\t\t\tchat_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t-m|--message_id)\n    \t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\t\tmessage_id=$2\n    \t\t\t\t\tshift 2\n    \t\t\t\t\t;;\n    \t\t\t\t--)\n    \t\t\t\t\tshift\n    \t\t\t\t\tbreak\n\t\t\t\t\t\t;;\n    \t\t\tesac\n    \tdone\n    \t\n    \t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n    \t[[ $message_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --message_id]\"\n    \n    \tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${message_id:+-d message_id=\"$message_id\"})\n    \n    \t# Verifica se ocorreu erros durante a chamada do método\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \treturn $?\n    \n    }\n   \n\tShellBot.downloadFile()\n\t{\n\t\tlocal file_path dir ext file jq_obj\n\t\tlocal uri=\"https://api.telegram.org/file/bot$_TOKEN_\"\n\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'f:d:' \\\n\t\t\t\t\t\t\t\t--longoptions 'file_path:,\n\t\t\t\t\t\t\t\t\t\t\t\tdir:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-f|--file_path)\n\t\t\t\t\t[[ $2 =~ \\.[^.]+$ ]]\n\t\t\t\t\text=$BASH_REMATCH\n\t\t\t\t\tfile_path=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-d|--dir)\n\t\t\t\t\t[[ -d $2 ]] || MessageError API \"$_ERR_DIR_NOT_FOUND_\" \"$1\" \"$2\"\n\t\t\t\t\t[[ -w $2 ]] || MessageError API \"$_ERR_DIR_WRITE_DENIED_\" \"$1\" \"$2\"\n\t\t\t\t\tdir=${2%/}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\t[[ $file_path ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-f, --file_path]\"\n\t\t[[ $dir ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-d, --dir]\"\n\n\t\t# Gera o nome do arquivo anexando o horário de criação.\n\t\tfile=file$(date +%d%m%Y%H%M%S%N)${ext:-.dat}\n\n\t\t# Executa o download da uri especificada e retorna um objeto json\n\t\t# com as informações do processo. Se tiver sucesso o diretório de\n\t\t# destino é retornado, caso contrário uma mensagem de erro é apresentada.\n\t\tif wget -qO \"$dir/$file\" \"$uri/$file_path\"; then\n\t\t\t# Sucesso\n\t\t\tprintf -v jq_obj '{\"ok\":true,\"result\":{\"file_path\":\"%s\"}}' \"$dir/$file\"\n\t\telse\n\t\t\t# Falha\n\t\t\tprintf -v jq_obj '{\"ok\":false,\"error_code\":404,\"description\":\"Bad Request: file not found\"}'\n\t\t\trm -f \"$dir/$file\" 2>/dev/null # Remove arquivo inválido.\n\t\tfi\n\n\t\tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n\n\t\treturn $?\n\t}\n\n\tShellBot.editMessageLiveLocation()\n\t{\n\t\tlocal chat_id message_id inline_message_id\n\t\tlocal latitude longitude reply_markup jq_obj\n\t\t\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:m:i:l:g:r:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tmessage_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tinline_message_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tlatitude:,\n\t\t\t\t\t\t\t\t\t\t\t\tlongitude:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_markup:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id)\n\t\t\t\t\tchat_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-m|--message_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tmessage_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-i|--inline_message_id)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tinline_message_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-l|--latitude)\n    \t\t\t\t# Tipo: float\n    \t\t\t\tCheckArgType float \"$1\" \"$2\"\n    \t\t\t\tlatitude=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-g|--longitude)\n    \t\t\t\t# Tipo: float\n    \t\t\t\tCheckArgType float \"$1\" \"$2\"\n    \t\t\t\tlongitude=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-r|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t\n\t\t[[ $inline_message_id ]] && unset chat_id message_id || {\n\t\t\t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t\t[[ $message_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --message_id]\"\n\t\t}\n    \t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${message_id:+-d message_id=\"$message_id\"} \\\n\t\t\t\t\t\t\t\t\t${inline_message_id:+-d inline_message_id=\"$inline_message_id\"} \\\n    \t\t\t\t\t\t\t\t${latitude:+-d latitude=\"$latitude\"} \\\n    \t\t\t\t\t\t\t\t${longitude:+-d longitude=\"$longitude\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-d reply_markup=\"$reply_markup\"})\n    \n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n\t}\t\n\n\tShellBot.stopMessageLiveLocation()\n\t{\n\t\tlocal chat_id message_id inline_message_id reply_markup jq_obj\n\t\t\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:m:i:r:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tmessage_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tinline_message_id:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_markup:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id)\n\t\t\t\t\tchat_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-m|--message_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tmessage_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-i|--inline_message_id)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tinline_message_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n    \t\t\t-r|--reply_markup)\n    \t\t\t\treply_markup=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\tshift\n    \t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t\n\t\t[[ $inline_message_id ]] && unset chat_id message_id || {\n\t\t\t[[ $chat_id ]] \t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t\t[[ $message_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --message_id]\"\n\t\t}\n    \t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${message_id:+-d message_id=\"$message_id\"} \\\n\t\t\t\t\t\t\t\t\t${inline_message_id:+-d inline_message_id=\"$inline_message_id\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-d reply_markup=\"$reply_markup\"})\n    \n    \t# Testa o retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \treturn $?\n\t}\n\n\tShellBot.setChatStickerSet()\n\t{\n\t\tlocal chat_id sticker_set_name jq_obj\n\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:s:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tsticker_set_name:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id)\n\t\t\t\t\tchat_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-s|--sticker_set_name)\n\t\t\t\t\tsticker_set_name=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\t[[ $chat_id ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t[[ $sticker_set_name ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --sticker_set_name]\"\n\t\t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${sticker_set_name:+-d sticker_set_name=\"$sticker_set_name\"})\n\t\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n\t\treturn $?\n\t}\n\n\tShellBot.deleteChatStickerSet()\n\t{\n\t\tlocal chat_id jq_obj\n\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id)\n\t\t\t\t\tchat_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${chat_id:+-d chat_id=\"$chat_id\"})\n\t\t\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \t\n    \treturn $?\n\t}\n\t\n\tShellBot.inputMedia()\n\t{\n\t\tlocal __type __input __media __caption __parse_mode __thumb __width \n\t\tlocal __height __duration __supports_streaming __performer __title\n\n\t\tlocal __param=$(getopt --name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 't:i:m:c:p:b:w:h:d:s:f:e:' \\\n\t\t\t\t\t\t\t\t--longoptions 'type:,\n\t\t\t\t\t\t\t\t\t\t\t\tinput:,\n\t\t\t\t\t\t\t\t\t\t\t\tmedia:,\n\t\t\t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n\t\t\t\t\t\t\t\t\t\t\t\tthumb:,\n\t\t\t\t\t\t\t\t\t\t\t\twitdh:,\n\t\t\t\t\t\t\t\t\t\t\t\theight:,\n\t\t\t\t\t\t\t\t\t\t\t\tduration:,\n\t\t\t\t\t\t\t\t\t\t\t\tsupports_streaming:,\n\t\t\t\t\t\t\t\t\t\t\t\tperformer:,\n\t\t\t\t\t\t\t\t\t\t\t\ttitle:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\n\t\n\t\teval set -- \"$__param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-t|--type)\n\t\t\t\t\t__type=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-i|--input)\n\t\t\t\t\tCheckArgType var \"$1\" \"$2\"\n\t\t\t\t\t__input=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-m|--media)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n\t\t\t\t\t__media=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-c|--caption)\n\t\t\t\t\t__caption=$(echo -e \"$2\")\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-p|--parse_mode)\n\t\t\t\t\t__parse_mode=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-b|--thumb)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n\t\t\t\t\t__thumb=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-w|--width)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\t__width=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-h|--height)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\t__height=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-d|--duration)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\t__duration=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-s|--supports_streaming)\n\t\t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\t__supports_streaming=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-f|--performer)\n\t\t\t\t\t__performer=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-e|--title)\n\t\t\t\t\t__title=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\t[[ $__type ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --type]\"\n\t\t[[ $__input ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-i, --input]\"\n\t\t[[ $__media ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --media]\"\n\n\t\tlocal -n __input=$__input\n\t\t\n    \t__input=${__input:+$__input,}{\\\"type\\\":\\\"$__type\\\",\n\t\t__input+=\\\"media\\\":\\\"$__media\\\"\n\t\t__input+=${__caption:+,\\\"caption\\\":\\\"$__caption\\\"}\n\t\t__input+=${__parse_mode:+,\\\"parse_mode\\\":\\\"$__parse_mode\\\"}\n\t\t__input+=${__thumb:+,\\\"thumb\\\":\\\"$__thumb\\\"}\n\t\t__input+=${__width:+,\\\"width\\\":$__width}\n\t\t__input+=${__height:+,\\\"height\\\":$__height}\n\t\t__input+=${__duration:+,\\\"duration\\\":$__duration}\n\t\t__input+=${__supports_streaming:+,\\\"supports_streaming\\\":$__supports_streaming}\n\t\t__input+=${__performer:+,\\\"performer\\\":\\\"$__performer\\\"}\n\t\t__input+=${__title:+,\\\"title\\\":\\\"$__title\\\"}}\n\n\t\treturn $?\n\t}\n\n\tShellBot.sendMediaGroup()\n\t{\n\t\tlocal chat_id media disable_notification reply_to_message_id jq_obj\n\t\t\n\t\tlocal param=$(getopt \t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:m:n:r:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tmedia:,\n\t\t\t\t\t\t\t\t\t\t\t\tdisable_notification:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_to_message_id:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id)\n\t\t\t\t\tchat_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-m|--media)\n\t\t\t\t\tmedia=[$2]\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-n|--disable_notification)\n    \t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\tdisable_notification=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-r|--reply_to_message_id)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\treply_to_message_id=$2\n    \t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\t[[ $chat_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t[[ $media ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --media]\"\n\t\t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n    \t\t\t\t\t\t\t\t${media:+-F media=\"$media\"} \\\n    \t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n    \t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"})\n    \n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t}\n\n\tShellBot.editMessageMedia()\n\t{\n\t\tlocal chat_id message_id inline_message_id media reply_markup jq_obj\n\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:i:n:m:k:' \\\n\t\t\t\t\t\t\t\t--longoptions\t'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tmessage_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tinline_message_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tmedia:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_markup:'\t\\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id)\n\t\t\t\t\tchat_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-i|--message_id)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tmessage_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-n|--inline_message_id)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tinline_message_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-m|--media)\n\t\t\t\t\tmedia=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-k|--reply_markup)\n\t\t\t\t\treply_markup=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\t[[ $inline_message_id ]] || {\n\t\t\t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t\t[[ $message_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-i, --message_id]\"\n\t\t}\n\t\t\n\t\t[[ $media ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-m, --media]\"\n\t\t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${message_id:+-F message_id=\"$message_id\"} \\\n\t\t\t\t\t\t\t\t\t${inline_message_id:+-F inline_message_id=\"$inline_message_id\"} \\\n    \t\t\t\t\t\t\t\t${media:+-F media=\"$media\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})   \n\t\t \n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t}\n\n\tShellBot.sendAnimation()\n\t{\n\t\tlocal chat_id animation duration width height \n\t\tlocal thumb caption parse_mode disable_notification \n\t\tlocal reply_to_message_id reply_markup jq_obj\n\t\t\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:a:d:w:h:b:o:p:n:r:k:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tanimation:,\n\t\t\t\t\t\t\t\t\t\t\t\tduration:,\n\t\t\t\t\t\t\t\t\t\t\t\twidth:,\n\t\t\t\t\t\t\t\t\t\t\t\theight:,\n\t\t\t\t\t\t\t\t\t\t\t\tthumb:,\n\t\t\t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n\t\t\t\t\t\t\t\t\t\t\t\tdisable_notification:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_markup:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id)\n\t\t\t\t\tchat_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-a|--animation)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n\t\t\t\t\tanimation=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-d|--duration)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tduartion=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-w|--width)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\twidth=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-h|--height)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\theight=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-b|--thumb)\n\t\t\t\t\tCheckArgType file \"$1\" \"$2\"\n\t\t\t\t\tthumb=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-o|--caption)\n\t\t\t\t\tcaption=$(echo -e \"$2\")\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-p|--parse_mode)\n\t\t\t\t\tparse_mode=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-n|--disable_notification)\n\t\t\t\t\tCheckArgType bool \"$1\" \"$2\"\n\t\t\t\t\tdisable_notification=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-r|--reply_to_message_id)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\treply_to_message_id=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-k|--reply_markup)\n\t\t\t\t\treply_markup=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\n\t\t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t[[ $animation ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-a, --animation]\"\n\t\t\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-F chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${animation:+-F animation=\"$animation\"} \\\n\t\t\t\t\t\t\t\t\t${duration:+-F duration=\"$duration\"} \\\n\t\t\t\t\t\t\t\t\t${width:+-F width=\"$width\"} \\\n\t\t\t\t\t\t\t\t\t${height:+-F height=\"$height\"} \\\n\t\t\t\t\t\t\t\t\t${thumb:+-F thumb=\"$thumb\"} \\\n\t\t\t\t\t\t\t\t\t${caption:+-F caption=\"$caption\"} \\\n\t\t\t\t\t\t\t\t\t${parse_mode:+-F parse_mode=\"$parse_mode\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-F disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-F reply_to_message_id=\"$reply_to_message_id\"} \\\n    \t\t\t\t\t\t\t\t${reply_markup:+-F reply_markup=\"$reply_markup\"})   \n\t\t \n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t}\n\t\n\tShellBot.answerInlineQuery()\n\t{\n\t\tlocal inline_query_id results cache_time is_personal\n\t\tlocal next_offset switch_pm_text switch_pm_parameter\n\t\tlocal jq_obj\n\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'i:r:c:p:o:s:m:' \\\n\t\t\t\t\t\t\t\t--longoptions 'inline_query_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tresults:,\n\t\t\t\t\t\t\t\t\t\t\t\tcache_time:,\n\t\t\t\t\t\t\t\t\t\t\t\tis_personal:,\n\t\t\t\t\t\t\t\t\t\t\t\tnext_offset:,\n\t\t\t\t\t\t\t\t\t\t\t\tswitch_pm_text:,\n\t\t\t\t\t\t\t\t\t\t\t\tswitch_pm_parameter:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-i|--inline_query_id)\t\tinline_query_id=$2;\t\tshift 2;;\n\t\t\t\t-r|--results)\t\t\t\tresults=[$2];\t\t\tshift 2;;\n\t\t\t\t-c|--cache_time)\t\t\tcache_time=$2;\t\t\tshift 2;;\n\t\t\t\t-p|--is_personal)\t\t\tcache_time=$2;\t\t\tshift 2;;\n\t\t\t\t-o|--next_offset)\t\t\tnext_offset=$2;\t\t\tshift 2;;\n\t\t\t\t-s|--switch_pm_text)\t\tswitch_pm_text=$2;\t\tshift 2;;\n\t\t\t\t-m|--switch_pm_parameter)\tswitch_pm_parameter=$2;\tshift 2;;\n\t\t\t\t--)\t\t\t\t\t\t\t\t\t\t\t\t\tshift; break;;\n\t\t\tesac\n\t\tdone\n\t\t\n\t\t[[ $inline_query_id ]] \t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-i, --inline_query_id]\"\n\t\t[[ $results ]] \t\t\t|| MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-r, --results]\"\n\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${inline_query_id:+-F inline_query_id=\"$inline_query_id\"} \\\n\t\t\t\t\t\t\t\t\t${results:+-F results=\"$results\"} \\\n\t\t\t\t\t\t\t\t\t${cache_time:+-F cache_time=\"$cache_time\"} \\\n\t\t\t\t\t\t\t\t\t${is_personal:+-F is_personal=\"$is_personal\"} \\\n\t\t\t\t\t\t\t\t\t${next_offset:+-F next_offset=\"$next_offset\"} \\\n\t\t\t\t\t\t\t\t\t${switch_pm_text:+-F switch_pm_text=\"$switch_pm_text\"} \\\n\t\t\t\t\t\t\t\t\t${switch_pm_parameter:+-F switch_pm_parameter=\"$switch_pm_parameter\"})\n\t\t\n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t\t\n\t}\n\t\n\tShellBot.InlineQueryResult()\n\t{\n\t\tlocal __input __type __title __caption __reply_markup __parse_mode\n\t\tlocal __description __input_message_content __address __audio_duration\n\t   \tlocal __audio_file_id __audio_url __document_file_id __document_url\n\t\tlocal __first_name __foursquare_id __foursquare_type __gif_duration\n\t\tlocal __gif_file_id __gif_height __gif_url __gif_width __hide_url\n\t\tlocal __last_name __latitude __live_period __longitude __mime_type\n\t\tlocal __mpeg4_duration __mpeg4_file_id __mpeg4_height __mpeg4_url\n\t\tlocal __mpeg4_width __performer __photo_file_id __photo_height \n\t\tlocal __photo_url __photo_width __sticker_file_id __vcard __phone_number\n\t\tlocal __thumb_height __thumb_url __thumb_width __url __id\n\t\tlocal __video_duration __video_file_id __video_height __video_url\n\t\tlocal __video_width __voice_duration __voice_file_id __voice_url\n\n\t\tlocal __param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'i:t:l:c:k:p:r:d:m:b:s:x:w:v:z:y:q:a:f:u:g:o:n:h:j:e:\n\t\t\t\t\t\t\t\t\t\t\tN:R:D:A:X:G:C:Q:L:Y:E:V:H:Z:T:F:U:M:S:O:I:K:B:P:J:W:' \\\n\t\t\t\t\t\t\t\t--longoptions 'input:,\n\t\t\t\t\t\t\t\t\t\t\t\ttype:,\n\t\t\t\t\t\t\t\t\t\t\t\ttitle:,\n\t\t\t\t\t\t\t\t\t\t\t\tcaption:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_markup:,\n\t\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n\t\t\t\t\t\t\t\t\t\t\t\tid:,\n\t\t\t\t\t\t\t\t\t\t\t\tdescription:,\n\t\t\t\t\t\t\t\t\t\t\t\tinput_message_content:,\n\t\t\t\t\t\t\t\t\t\t\t\taddress:,\n\t\t\t\t\t\t\t\t\t\t\t\taudio_duration:,\n\t\t\t\t\t\t\t\t\t\t\t\taudio_file_id:,\n\t\t\t\t\t\t\t\t\t\t\t\taudio_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tdocument_file_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tdocument_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tfirst_name:,\n\t\t\t\t\t\t\t\t\t\t\t\tfoursquare_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tfoursquare_type:,\n\t\t\t\t\t\t\t\t\t\t\t\tgif_duration:,\n\t\t\t\t\t\t\t\t\t\t\t\tgif_file_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tgif_height:,\n\t\t\t\t\t\t\t\t\t\t\t\tgif_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tgif_width:,\n\t\t\t\t\t\t\t\t\t\t\t\thide_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tlast_name:,\n\t\t\t\t\t\t\t\t\t\t\t\tlatitude:,\n\t\t\t\t\t\t\t\t\t\t\t\tlive_period:,\n\t\t\t\t\t\t\t\t\t\t\t\tlongitude:,\n\t\t\t\t\t\t\t\t\t\t\t\tmime_type:,\n\t\t\t\t\t\t\t\t\t\t\t\tmpeg4_duration:,\n\t\t\t\t\t\t\t\t\t\t\t\tmpeg4_file_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tmpeg4_height:,\n\t\t\t\t\t\t\t\t\t\t\t\tmpeg4_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tmpeg4_width:,\n\t\t\t\t\t\t\t\t\t\t\t\tperformer:,\n\t\t\t\t\t\t\t\t\t\t\t\tphoto_file_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tphoto_height:,\n\t\t\t\t\t\t\t\t\t\t\t\tphoto_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tphoto_width:,\n\t\t\t\t\t\t\t\t\t\t\t\tsticker_file_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tthumb_height:,\n\t\t\t\t\t\t\t\t\t\t\t\tthumb_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tthumb_width:,\n\t\t\t\t\t\t\t\t\t\t\t\turl:,\n\t\t\t\t\t\t\t\t\t\t\t\tvcard:,\n\t\t\t\t\t\t\t\t\t\t\t\tvideo_duration:,\n\t\t\t\t\t\t\t\t\t\t\t\tvideo_file_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tvideo_height:,\n\t\t\t\t\t\t\t\t\t\t\t\tvideo_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tvideo_width:,\n\t\t\t\t\t\t\t\t\t\t\t\tvoice_duration:,\n\t\t\t\t\t\t\t\t\t\t\t\tvoice_file_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tvoice_url:,\n\t\t\t\t\t\t\t\t\t\t\t\tphone_number:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$__param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-i|--input) \t\t\t\tCheckArgType var \"$1\" \"$2\"\n\t\t\t\t\t   \t\t\t\t\t\t__input=$2; \t\t\t\tshift 2;;\n\t\t\t\t-t|--type)\t\t\t\t\t__type=$2; \t\t\t\t\tshift 2;;\n\t\t\t\t-l|--title)\t\t\t\t\t__title=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-c|--caption)\t\t\t\t__caption=$2;\t\t\t\tshift 2;;\n\t\t\t\t-k|--reply_markup)\t\t\t__reply_markup=$2;\t\t\tshift 2;;\n\t\t\t\t-p|--parse_mode)\t\t\t__parse_mode=$2;\t\t\tshift 2;;\n\t\t\t\t-r|--id)\t\t\t\t\t__id=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-d|--description)\t\t\t__description=$2;\t\t\tshift 2;;\n\t\t\t\t-m|--input_message_content)\t__input_message_content=$2;\tshift 2;;\n\t\t\t\t-b|--address)\t\t\t\t__address=$2;\t\t\t\tshift 2;;\n\t\t\t\t-s|--audio_duration)\t\t__audio_duration=$2;\t\tshift 2;;\n\t\t\t\t-x|--audio_file_id)\t\t\t__audio_file_id=$2;\t\t\tshift 2;;\n\t\t\t\t-w|--audio_url)\t\t\t\t__audio_url=$2;\t\t\t\tshift 2;;\n\t\t\t\t-v|--document_file_id)\t\t__document_file_id=$2;\t\tshift 2;;\n\t\t\t\t-z|--document_url)\t\t\t__document_url=$2;\t\t\tshift 2;;\n\t\t\t\t-y|--first_name)\t\t\t__first_name=$2;\t\t\tshift 2;;\n\t\t\t\t-q|--foursquare_id)\t\t\t__foursquare_id=$2;\t\t\tshift 2;;\n\t\t\t\t-a|--foursquare_type)\t\t__foursquare_type=$2;\t\tshift 2;;\n\t\t\t\t-f|--gif_duration)\t\t\t__gif_duration=$2;\t\t\tshift 2;;\n\t\t\t\t-u|--gif_file_id)\t\t\t__gif_file_id=$2\t\t\tshift 2;;\n\t\t\t\t-g|--gif_height)\t\t\t__gif_height=$2;\t\t\tshift 2;;\n\t\t\t\t-o|--gif_url)\t\t\t\t__gif_url=$2;\t\t\t\tshift 2;;\n\t\t\t\t-n|--gif_width)\t\t\t\t__gif_width=$2;\t\t\t\tshift 2;;\n\t\t\t\t-h|--hide_url)\t\t\t\t__hide_url=$2;\t\t\t\tshift 2;;\n\t\t\t\t-j|--last_name)\t\t\t\t__last_name=$2;\t\t\t\tshift 2;;\n\t\t\t\t-e|--latitude)\t\t\t\t__latitude=$2;\t\t\t\tshift 2;;\n\t\t\t\t-N|--live_period)\t\t\t__live_period=$2;\t\t\tshift 2;;\n\t\t\t\t-R|--longitude)\t\t\t\t__longitude=$2;\t\t\t\tshift 2;;\n\t\t\t\t-D|--mime_type)\t\t\t\t__mime_type=$2;\t\t\t\tshift 2;;\n\t\t\t\t-A|--mpeg4_duration)\t\t__mpeg4_duration=$2;\t\tshift 2;;\n\t\t\t\t-X|--mpeg4_file_id)\t\t\t__mpeg4_file_id=$2;\t\t\tshift 2;;\n\t\t\t\t-G|--mpeg4_height)\t\t\t__mpeg4_height=$2;\t\t\tshift 2;;\n\t\t\t\t-C|--mpeg4_url)\t\t\t\t__mpeg4_url=$2;\t\t\t\tshift 2;;\n\t\t\t\t-Q|--mpeg4_width)\t\t\t__mpeg4_width=$2;\t\t\tshift 2;;\n\t\t\t\t-L|--performer)\t\t\t\t__performer=$2;\t\t\t\tshift 2;;\n\t\t\t\t-Y|--photo_file_id)\t\t\t__photo_file_id=$2;\t\t\tshift 2;;\n\t\t\t\t-E|--photo_height)\t\t\t__photo_height=$2;\t\t\tshift 2;;\n\t\t\t\t-V|--photo_url)\t\t\t\t__photo_url=$2;\t\t\t\tshift 2;;\n\t\t\t\t-H|--photo_width)\t\t\t__photo_width=$2;\t\t\tshift 2;;\n\t\t\t\t-Z|--sticker_file_id)\t\t__sticker_file_id=$2;\t\tshift 2;;\n\t\t\t\t-T|--thumb_height)\t\t\t__thumb_height=$2;\t\t\tshift 2;;\n\t\t\t\t-F|--thumb_url)\t\t\t\t__thumb_url=$2;\t\t\t\tshift 2;;\n\t\t\t\t-U|--thumb_width)\t\t\t__thumb_width=$2;\t\t\tshift 2;;\n\t\t\t\t-M|--url)\t\t\t\t\t__url=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-S|--vcard)\t\t\t\t\t__vcard=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-O|--video_duration)\t\t__video_duration=$2;\t\tshift 2;;\n\t\t\t\t-I|--video_file_id)\t\t\t__video_file_id=$2;\t\t\tshift 2;;\n\t\t\t\t-K|--video_height)\t\t\t__video_height=$2;\t\t\tshift 2;;\n\t\t\t\t-B|--video_url)\t\t\t\t__video_url=$2;\t\t\t\tshift 2;;\n\t\t\t\t-P|--video_width)\t\t\t__video_width=$2;\t\t\tshift 2;;\n\t\t\t\t-J|--voice_duration)\t\t__voice_duration=$2;\t\tshift 2;;\n\t\t\t\t-W|--voice_file_id)\t\t\t__voice_file_id=$2;\t\t\tshift 2;;\n\t\t\t\t--phone_number)\t\t\t\t__phone_number=$2;\t\t\tshift 2;;\n\t\t\t\t--voice_url)\t\t\t\t__voice_url=$2;\t\t\t\tshift 2;;\n\t\t\t\t--)\t\t\t\t\t\t\t\t\t\t\t\t\t\tshift; break;;\n\t\t\tesac\n\t\tdone\n\n\t\t[[ $__input ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-i, --input]\"\n\n\t\tlocal -n __input=$__input\n\n    \t__input=${__input:+$__input,}{\\\"type\\\":\\\"$__type\\\"\n\t\t__input+=${__title:+,\\\"title\\\":\\\"$__title\\\"}\n\t\t__input+=${__caption:+,\\\"caption\\\":\\\"$__caption\\\"}\n\t\t__input+=${__reply_markup:+,\\\"reply_markup\\\":\\\"$__reply_markup\\\"}\n\t\t__input+=${__parse_mode:+,\\\"parse_mode\\\":\\\"$__parse_mode\\\"}\n\t\t__input+=${__id:+,\\\"id\\\":\\\"$__id\\\"}\n\t\t__input+=${__description:+,\\\"description\\\":\\\"$__description\\\"}\n\t\t__input+=${__input_message_content:+,\\\"input_message_content\\\":$__input_message_content}\n\t\t__input+=${__address:+,\\\"address\\\":\\\"$__address\\\"}\n\t\t__input+=${__audio_duration:+,\\\"audio_duration\\\":$__audio_duration}\n\t\t__input+=${__audio_file_id:+,\\\"audio_file_id\\\":\\\"$__audio_file_id\\\"}\n\t\t__input+=${__audio_url:+,\\\"audio_url\\\":\\\"$__audio_url\\\"}\n\t\t__input+=${__document_file_id:+,\\\"document_file_id\\\":\\\"$__document_file_id\\\"}\n\t\t__input+=${__document_url:+,\\\"document_url\\\":\\\"$__document_url\\\"}\n\t\t__input+=${__first_name:+,\\\"first_name\\\":\\\"$__first_name\\\"}\n\t\t__input+=${__foursquare_id:+,\\\"foursquare_id\\\":\\\"$__foursquare_id\\\"}\n\t\t__input+=${__foursquare_type:+,\\\"foursquare_type\\\":\\\"$__foursquare_type\\\"}\n\t\t__input+=${__gif_duration:+,\\\"gif_duration\\\":$__gif_duration}\n\t\t__input+=${__gif_file_id:+,\\\"gif_file_id\\\":\\\"$__gif_file_id\\\"}\n\t\t__input+=${__gif_height:+,\\\"gif_height\\\":$__gif_height}\n\t\t__input+=${__gif_url:+,\\\"gif_url\\\":\\\"$__gif_url\\\"}\n\t\t__input+=${__gif_width:+,\\\"gif_width\\\":$__gif_width}\n\t\t__input+=${__hide_url:+,\\\"hide_url\\\":\\\"$__hide_url\\\"}\n\t\t__input+=${__last_name:+,\\\"last_name\\\":\\\"$__last_name\\\"}\n\t\t__input+=${__latitude:+,\\\"latitude\\\":$__latitude}\n\t\t__input+=${__live_period:+,\\\"live_period\\\":$__live_period}\n\t\t__input+=${__longitude:+,\\\"longitude\\\":$__longitude}\n\t\t__input+=${__mime_type:+,\\\"mime_type\\\":\\\"$__mime_type\\\"}\n\t\t__input+=${__mpeg4_duration:+,\\\"mpeg4_duration\\\":$__mpeg4_duration}\n\t\t__input+=${__mpeg4_file_id:+,\\\"mpeg4_file_id\\\":\\\"$__mpeg4_file_id\\\"}\n\t\t__input+=${__mpeg4_height:+,\\\"mpeg4_height\\\":$__mpeg4_height}\n\t\t__input+=${__mpeg4_url:+,\\\"mpeg4_url\\\":\\\"$__mpeg4_url\\\"}\n\t\t__input+=${__mpeg4_width:+,\\\"mpeg4_width\\\":$__mpeg4_width}\n\t\t__input+=${__performer:+,\\\"performer\\\":\\\"$__performer\\\"}\n\t\t__input+=${__photo_file_id:+,\\\"photo_file_id\\\":\\\"$__photo_file_id\\\"}\n\t\t__input+=${__photo_height:+,\\\"photo_height\\\":$__photo_height}\n\t\t__input+=${__photo_url:+,\\\"photo_url\\\":\\\"$__photo_url\\\"}\n\t\t__input+=${__photo_width:+,\\\"photo_width\\\":$__photo_width}\n\t\t__input+=${__sticker_file_id:+,\\\"sticker_file_id\\\":\\\"$__sticker_file_id\\\"}\n\t\t__input+=${__thumb_height:+,\\\"thumb_height\\\":$__thumb_height}\n\t\t__input+=${__thumb_url:+,\\\"thumb_url\\\":\\\"$__thumb_url\\\"}\n\t\t__input+=${__thumb_width:+,\\\"thumb_width\\\":$__thumb_width}\n\t\t__input+=${__url:+,\\\"url\\\":\\\"$__url\\\"}\n\t\t__input+=${__vcard:+,\\\"vcard\\\":\\\"$__vcard\\\"}\n\t\t__input+=${__video_duration:+,\\\"video_duration\\\":$__video_duration}\n\t\t__input+=${__video_file_id:+,\\\"video_file_id\\\":\\\"$__video_file_id\\\"}\n\t\t__input+=${__video_height:+,\\\"video_height\\\":$__video_height}\n\t\t__input+=${__video_url:+,\\\"video_url\\\":\\\"$__video_url\\\"}\n\t\t__input+=${__video_width:+,\\\"video_width\\\":$__video_width}\n\t\t__input+=${__voice_duration:+,\\\"voice_duration\\\":$__voice_duration}\n\t\t__input+=${__voice_file_id:+,\\\"voice_file_id\\\":\\\"$__voice_file_id\\\"}\n\t\t__input+=${__voice_url:+,\\\"voice_url\\\":\\\"$__voice_url\\\"}\n\t\t__input+=${__phone_number:+,\\\"phone_number\\\":\\\"$__phone_number\\\"}}\n\n\t\treturn $?\n\t}\n\n\tShellBot.InputMessageContent()\n\t{\n\t\tlocal message_text parse_mode disable_web_page_preview json\n\t\tlocal latitude longitude live_period title address foursquare_id\n\t\tlocal foursquare_type phone_number first_name last_name vcard\n\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 't:p:w:l:v:e:a:f:q:n:m:s:d:' \\\n\t\t\t\t\t\t\t\t--longoptions 'message_text:,\n\t\t\t\t\t\t\t\t\t\t\t\tparse_mode:,\n\t\t\t\t\t\t\t\t\t\t\t\tdisable_web_page_preview:,\n\t\t\t\t\t\t\t\t\t\t\t\tlatitude:,\n\t\t\t\t\t\t\t\t\t\t\t\tlongitude:,\n\t\t\t\t\t\t\t\t\t\t\t\tlive_period:,\n\t\t\t\t\t\t\t\t\t\t\t\ttitle:,\n\t\t\t\t\t\t\t\t\t\t\t\taddress:,\n\t\t\t\t\t\t\t\t\t\t\t\tfoursquare_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tfoursquare_type:,\n\t\t\t\t\t\t\t\t\t\t\t\tphone_number:,\n\t\t\t\t\t\t\t\t\t\t\t\tfirst_name:,\n\t\t\t\t\t\t\t\t\t\t\t\tlast_name:,\n\t\t\t\t\t\t\t\t\t\t\t\tvcard:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-t|--message_text) \t\t\t\tmessage_text=$(echo -e \"$2\");\tshift 2;;\n\t\t\t\t-p|--parse_mode)\t\t\t\tparse_mode=$2; \t\t\t\t\tshift 2;;\n\t\t\t\t-w|--disable_web_page_preview)\tdisable_web_page_preview=$2; \tshift 2;;\n\t\t\t\t-l|--latitude)\t\t\t\t\tlatitude=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-g|--longitude)\t\t\t\t\tlongitude=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-v|--live_period)\t\t\t\tlive_period=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-e|--title)\t\t\t\t\t\ttitle=$2;\t\t\t\t\t\tshift 2;;\n\t\t\t\t-a|--address)\t\t\t\t\taddress=$2;\t\t\t\t\t\tshift 2;;\n\t\t\t\t-f|--foursquare_id)\t\t\t\tfoursquare_id=$2;\t\t\t\tshift 2;;\n\t\t\t\t-q|--foursquare_type)\t\t\tfoursquare_type=$2;\t\t\t\tshift 2;;\n\t\t\t\t-n|--phone_number)\t\t\t\tphone_number=$2;\t\t\t\tshift 2;;\n\t\t\t\t-m|--first_name)\t\t\t\tfirst_name=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-s|--last_name)\t\t\t\t\tlast_name=$2;\t\t\t\t\tshift 2;;\n\t\t\t\t-d|--vcard)\t\t\t\t\t\tvcard=$2;\t\t\t\t\t\tshift 2;;\n\t\t\t\t--) \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshift; break;;\n\t\t\tesac\n\t\tdone\n\t\t\n\t\tjson=${message_text:+\\\"message_text\\\":\\\"$message_text\\\"}\n\t\tjson+=${parse_mode:+,\\\"parse_mode\\\":\\\"$parse_mode\\\"}\n\t\tjson+=${disable_web_page_preview:+,\\\"disable_web_page_preview\\\":$disable_web_page_preview}\n\t\tjson+=${latitude:+,\\\"latitude\\\":$latitude}\n\t\tjson+=${longitude:+,\\\"longtitude\\\":$longitude}\n\t\tjson+=${live_period:+,\\\"live_period\\\":$live_period}\n\t\tjson+=${title:+,\\\"title\\\":\\\"$title\\\"}\n\t\tjson+=${address:+,\\\"address\\\":\\\"$address\\\"}\n\t\tjson+=${foursquare_id:+,\\\"foursquare_id\\\":\\\"$foursquare_id\\\"}\n\t\tjson+=${foursquare_type:+,\\\"foursquare_type\\\":\\\"$foursquare_type\\\"}\n\t\tjson+=${phone_number:+,\\\"phone_number\\\":\\\"$phone_number\\\"}\n\t\tjson+=${first_name:+,\\\"first_name\\\":\\\"$first_name\\\"}\n\t\tjson+=${last_name:+,\\\"last_name\\\":\\\"$last_name\\\"}\n\t\tjson+=${vcard:+,\\\"vcard\\\":\\\"$vcard\\\"}\n\t\t\n\t\techo \"{${json#,}}\"\n\n\t\treturn $?\n\t}\n\n\tShellBot.ChatPermissions()\n\t{\n\t\tlocal can_send_messages can_send_media_messages can_send_polls\n\t\tlocal can_send_other_messages can_add_web_page_previews json\n\t\tlocal can_change_info can_invite_users can_pin_messages\n\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'm:d:l:o:w:c:i:p:' \\\n\t\t\t\t\t\t\t\t--longoptions 'can_send_messages:,\n\t\t\t\t\t\t\t\t\t\t\t\tcan_send_media_messages:,\n\t\t\t\t\t\t\t\t\t\t\t\tcan_send_polls:,\n\t\t\t\t\t\t\t\t\t\t\t\tcan_send_other_messages:,\n\t\t\t\t\t\t\t\t\t\t\t\tcan_add_web_page_previews:,\n\t\t\t\t\t\t\t\t\t\t\t\tcan_change_info:,\n\t\t\t\t\t\t\t\t\t\t\t\tcan_invite_users:,\n\t\t\t\t\t\t\t\t\t\t\t\tcan_pin_messages:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-m|--can_send_messages) \t\tcan_send_messages=$2;;\n\t\t\t\t-d|--can_send_media_messages) \tcan_send_media_messages=$2;;\n\t\t\t\t-l|--can_send_polls)\t\t\tcan_send_polls=$2;;\n\t\t\t\t-o|--can_send_other_messages)\tcan_send_other_messages=$2;;\n\t\t\t\t-w|--can_add_web_page_previews) can_add_web_page_previews=$2;;\n\t\t\t\t-c|--can_change_info)\t\t\tcan_change_info=$2;;\n\t\t\t\t-i|--can_invite_users)\t\t\tcan_invite_users=$2;;\n\t\t\t\t-p|--can_pin_messages)\t\t\tcan_pin_messages=$2;;\n\t\t\t\t--) shift; break;;\n\t\t\tesac\n\t\t\tshift 2\n\t\tdone\n\t\t\n\t\tjson=${can_send_messages:+\\\"can_send_messages\\\":$can_send_messages,}\n\t\tjson+=${can_send_media_messages:+\\\"can_send_media_messages\\\":$can_send_media_messages,}\n\t\tjson+=${can_send_polls:+\\\"can_send_polls\\\":$can_send_polls,}\n\t\tjson+=${can_send_other_messages:+\\\"can_send_other_messages\\\":$can_send_other_messages,}\n\t\tjson+=${can_add_web_page_previews:+\\\"can_add_web_page_previews\\\":$can_add_web_page_previews,}\n\t\tjson+=${can_change_info:+\\\"can_change_info\\\":$can_change_info,}\n\t\tjson+=${can_invite_users:+\\\"can_invite_users\\\":$can_invite_users,}\n\t\tjson+=${can_pin_messages:+\\\"can_pin_messages\\\":$can_pin_messages,}\n\t\n\t\t# Retorna o objeto de permissões.\n\t\techo \"{${json%,}}\"\n\n    \t# Status\n    \treturn $?\n\t}\n\n\tShellBot.setChatPermissions()\n\t{\n\t\tlocal chat_id permissions jq_obj\n\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:p:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,permissions:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id) \t\tchat_id=$2;;\n\t\t\t\t-p|--permissions)\tpermissions=$2;;\n\t\t\t\t--) shift; break;;\n\t\t\tesac\n\t\t\tshift 2\n\t\tdone\n\t\t\n\t\t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t[[ $permissions ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-p, --permissions]\"\n\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${permissions:+-d permissions=\"$permissions\"})\n\t\t\n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\n\t}\n\t\n\tShellBot.setChatAdministratorCustomTitle()\n\t{\n\t\tlocal chat_id user_id custom_title jq_obj\n\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:u:t:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tuser_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tcustom_title:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id) \t\tchat_id=$2;;\n\t\t\t\t-u|--user_id) \t\tuser_id=$2;;\n\t\t\t\t-t|--custom_title) \tcustom_title=$2;;\n\t\t\t\t--) shift; break;;\n\t\t\tesac\n\t\t\tshift 2\n\t\tdone\n\t\t\n\t\t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t[[ $user_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --user_id]\"\n\t\t[[ $custom_title ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --custom_title]\"\n\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${user_id:+-d user_id=\"$user_id\"} \\\n\t\t\t\t\t\t\t\t\t${custom_tilte:+-d custom_title=\"$custom_title\"})\n\t\t\n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t}\n\n\tShellBot.sendPoll()\n\t{\n\t\tlocal chat_id question options is_anonymous reply_markup\n\t\tlocal type allows_multiple_answers correct_option_id jq_obj\n\t\tlocal is_closed disable_notification reply_to_message_id\n\t\tlocal explanation explanation_parse_mode open_period close_date\n\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:q:o:a:k:t:m:i:x:z:p:d:l:n:r:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tquestion:,\n\t\t\t\t\t\t\t\t\t\t\t\toptions:,\n\t\t\t\t\t\t\t\t\t\t\t\tis_anonymous:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_markup:,\n\t\t\t\t\t\t\t\t\t\t\t\ttype:,\n\t\t\t\t\t\t\t\t\t\t\t\tallows_multiple_answers:,\n\t\t\t\t\t\t\t\t\t\t\t\tcorrect_option_id:,\n\t\t\t\t\t\t\t\t\t\t\t\texplanation:,\n\t\t\t\t\t\t\t\t\t\t\t\texplanation_parse_mode:,\n\t\t\t\t\t\t\t\t\t\t\t\topen_period:,\n\t\t\t\t\t\t\t\t\t\t\t\tclose_date:,\n\t\t\t\t\t\t\t\t\t\t\t\tis_closed:,\n\t\t\t\t\t\t\t\t\t\t\t\tdisable_notification:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_to_message_id:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id) chat_id=$2;;\n\t\t\t\t-q|--question) question=$(echo -e \"$2\");;\n\t\t\t\t-o|--options) options=$(echo -e \"$2\");;\n\t\t\t\t-a|--is_anonymous) is_anonymous=$2;;\n\t\t\t\t-k|--reply_markup) reply_markup=$2;;\n\t\t\t\t-t|--type) type=$2;;\n\t\t\t\t-m|--allows_multiple_answers) allows_multiple_answers=$2;;\n\t\t\t\t-i|--correct_option_id) correct_option_id=$2;;\n\t\t\t\t-x|--explanation) explanation=$2;;\n\t\t\t\t-z|--explanation_parse_mode) explanation_parse_mode=$2;;\n\t\t\t\t-p|--open_period) open_period=$2;;\n\t\t\t\t-d|--close_date) close_date=$2;;\n\t\t\t\t-l|--is_closed) is_closed=$2;;\n\t\t\t\t-n|--disable_notification) disable_notification=$2;;\n\t\t\t\t-r|--reply_to_message_id) reply_to_message_id=$2;;\n\t\t\t\t--) shift; break;;\n\t\t\tesac\n\t\t\tshift 2\n\t\tdone\n\t\t\n\t\t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\t\t[[ $question ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-q, --question]\"\n\t\t[[ $options ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-o, --options]\"\n\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${question:+-d question=\"$question\"} \\\n\t\t\t\t\t\t\t\t\t${options:+-d options=\"$options\"} \\\n\t\t\t\t\t\t\t\t\t${is_anonymous:+-d is_anonymous=\"$is_anonymous\"} \\\n\t\t\t\t\t\t\t\t\t${reply_markup:+-d reply_markup=\"$reply_markup\"} \\\n\t\t\t\t\t\t\t\t\t${type:+-d type=\"$type\"} \\\n\t\t\t\t\t\t\t\t\t${allows_multiple_answers:+-d allows_multiple_answers=\"$allows_multiple_answers\"} \\\n\t\t\t\t\t\t\t\t\t${correct_option_id:+-d correct_option_id=\"$correct_option_id\"} \\\n\t\t\t\t\t\t\t\t\t${explanation:+-d explanation=\"$explanation\"} \\\n\t\t\t\t\t\t\t\t\t${explanation_parse_mode:+-d explanation_parse_mode=\"$explanation_parse_mode\"} \\\n\t\t\t\t\t\t\t\t\t${open_period:+-d open_period=\"$open_period\"} \\\n\t\t\t\t\t\t\t\t\t${close_date:+-d close_date=\"$close_date\"} \\\n\t\t\t\t\t\t\t\t\t${is_closed:+-d is_closed=\"$is_closed\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-d disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-d reply_to_message_id=\"$reply_to_message_id\"})\n\t\t\n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\n\t}\n\n\tShellBot.KeyboardButtonPollType()\n\t{\n\t\tlocal type\n\n\t\tlocal param=$(getopt --name \"$FUNCNAME\" --options 't:' --longoptions 'type:' -- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-t|--type) type=$2;;\n\t\t\t\t--) shift; break;;\n\t\t\tesac\n\t\t\tshift 2\n\t\tdone\n\n\t\t[[ $type ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-t, --type]\"\n\n\t\tprintf '{\"type\": \"%s\"}' \"$type\"\n\n\t\treturn 0\n\t}\n\t\n\tShellBot.sendDice()\n\t{\n\t\tlocal chat_id disable_notification reply_to_message_id \n\t\tlocal reply_markup jq_obj emoji\n\n\t\tlocal param=$(getopt \t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:e:n:r:k:' \\\n\t\t\t\t\t\t\t\t--longoptions 'chat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\temoji:,\n\t\t\t\t\t\t\t\t\t\t\t\tdisable_notification:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_to_message_id:,\n\t\t\t\t\t\t\t\t\t\t\t\treply_markup:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--chat_id) chat_id=$2;;\n\t\t\t\t-e|--emoji) emoji=$2;;\n\t\t\t\t-n|--disable_notification) disable_notification=$2;;\n\t\t\t\t-r|--reply_to_message_id) reply_to_message_id=$2;;\n\t\t\t\t-k|--reply_markup) reply_markup=$2;;\n\t\t\t\t--) shift; break;;\n\t\t\tesac\n\t\t\tshift 2\n\t\tdone\n\t\t\n\t\t[[ $chat_id ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --chat_id]\"\n\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t\t${chat_id:+-d chat_id=\"$chat_id\"} \\\n\t\t\t\t\t\t\t\t\t${emoji:+-d emoji=\"$emoji\"} \\\n\t\t\t\t\t\t\t\t\t${disable_notification:+-d disable_notification=\"$disable_notification\"} \\\n\t\t\t\t\t\t\t\t\t${reply_to_message_id:+-d reply_to_message_id=\"$reply_to_message_id\"} \\\n\t\t\t\t\t\t\t\t\t${reply_markup:+-d reply_markup=\"$reply_markup\"})\n\n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t}\n\n\tShellBot.getMyCommands()\n\t{\n\t\tlocal jq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.})\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \treturn $?\n\t}\n\n\tShellBot.setMyCommands()\n\t{\n\t\tlocal jq_obj commands\n\n\t\tlocal param=$(getopt \t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'c:' \\\n\t\t\t\t\t\t\t\t--longoptions 'commands:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-c|--commands) commands=$2;;\n\t\t\t\t--) break;;\t\n\t\t\tesac\n\t\t\tshift 2\n\t\tdone\n\t\t\n\t\t[[ $commands ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --commands]\"\n\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} ${commands:+-d commands=\"$commands\"})\n\n\t\t# Retorno do método\n    \tMethodReturn \"$jq_obj\" || MessageError TG \"$jq_obj\"\n    \n    \t# Status\n    \treturn $?\n\t}\n\n\tShellBot.BotCommand()\n\t{\n\t\tlocal __command __description __list\n\t\t\n\t\tlocal __param=$(getopt \t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 'l:c:d:' \\\n\t\t\t\t\t\t\t\t--longoptions 'list:,\n\t\t\t\t\t\t\t\t\t\t\t\tcommand:,\n\t\t\t\t\t\t\t\t\t\t\t\tdescription:' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\teval set -- \"$__param\"\n\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-l|--list) \tCheckArgType var \"$1\" \"$2\"; __list=$2;;\n\t\t\t\t-c|--command) __command=$2;;\n\t\t\t\t-d|--description) __description=$2;;\n\t\t\t\t--) break;;\n\t\t\tesac\n\t\t\tshift 2\n\t\tdone\n\n\t\t[[ $__list ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-l, --list]\"\n\t\t[[ $__command ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-c, --command]\"\n\t\t[[ $__description ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-d, --description]\"\n\n\t\tprintf -v $__list '%s' \"${!__list#[}\"\n\t\tprintf -v $__list '%s' \"${!__list%]}\"\n\t\t\n\t\tprintf -v $__list '%s{\"command\": \"%s\", \"description\": \"%s\"}' \t\\\n\t\t\t\t\t\t\t\"${!__list:+${!__list},}\"\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"$__command\"\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\"$__description\"\n\n\t\tprintf -v $__list '%s' \"[${!__list}]\"\n\n\t\treturn $?\n\t}\n\n\tShellBot.setMessageRules()\n\t{\n\t\tlocal action command user_id username chat_id \n\t\tlocal chat_type time date language message_id \n\t\tlocal is_bot text entities_type file_type name\n\t\tlocal query_data query_id query_text send_message\n\t\tlocal chat_member mime_type num_args exec rule\n\t\tlocal action_args weekday user_status chat_name \n\t\tlocal message_status reply_message parse_mode\n\t\tlocal forward_message reply_markup continue i\n\t\tlocal author_signature bot_action auth_file\n\n\t\tlocal param=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t--options 's:a:z:c:i:u:h:v:y:l:m:b:t:n:f:p:q:r:g:o:e:d:w:j:x:R:S:F:K:P:E:A:C:B:T:' \\\n\t\t\t\t\t\t\t\t--longoptions\t'name:,\n\t\t\t\t\t\t\t\t\t\t\t\taction:,\n\t\t\t\t\t\t\t\t\t\t\t\taction_args:,\n\t\t\t\t\t\t\t\t\t\t\t\tcommand:,\n\t\t\t\t\t\t\t\t\t\t\t\tuser_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tusername:,\n\t\t\t\t\t\t\t\t\t\t\t\tchat_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tchat_name:,\n\t\t\t\t\t\t\t\t\t\t\t\tchat_type:,\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage_code:,\n\t\t\t\t\t\t\t\t\t\t\t\tmessage_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tis_bot:,\n\t\t\t\t\t\t\t\t\t\t\t\ttext:,\n\t\t\t\t\t\t\t\t\t\t\t\tentitie_type:,\n\t\t\t\t\t\t\t\t\t\t\t\tfile_type:,\n\t\t\t\t\t\t\t\t\t\t\t\tmime_type:,\n\t\t\t\t\t\t\t\t\t\t\t\tquery_data:,\n\t\t\t\t\t\t\t\t\t\t\t\tquery_id:,\n\t\t\t\t\t\t\t\t\t\t\t\tchat_member:,\n\t\t\t\t\t\t\t\t\t\t\t\tnum_args:,\n\t\t\t\t\t\t\t\t\t\t\t\ttime:,\n\t\t\t\t\t\t\t\t\t\t\t\tdate:,\n\t\t\t\t\t\t\t\t\t\t\t\tweekday:,\n\t\t\t\t\t\t\t\t\t\t\t\tuser_status:,\n\t\t\t\t\t\t\t\t\t\t\t\tmessage_status:,\n\t\t\t\t\t\t\t\t\t\t\t\texec:,\n\t\t\t\t\t\t\t\t\t\t\t\tauth_file:,\n\t\t\t\t\t\t\t\t\t\t\t\tbot_reply_message:,\n\t\t\t\t\t\t\t\t\t\t\t\tbot_send_message:,\n\t\t\t\t\t\t\t\t\t\t\t\tbot_forward_message:,\n\t\t\t\t\t\t\t\t\t\t\t\tbot_reply_markup:,\n\t\t\t\t\t\t\t\t\t\t\t\tbot_parse_mode:,\n\t\t\t\t\t\t\t\t\t\t\t\tbot_action:,\n\t\t\t\t\t\t\t\t\t\t\t\tauthor_signature:,\n\t\t\t\t\t\t\t\t\t\t\t\tcontinue' \\\n\t\t\t\t\t\t\t\t-- \"$@\")\n\t\t\n\t\teval set -- \"$param\"\n\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-s|--name)\n\t\t\t\t\tCheckArgType flag \"$1\" \"$2\"\n\t\t\t\t\tname=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-a|--action)\n\t\t\t\t\tCheckArgType func \"$1\" \"$2\"\n\t\t\t\t\taction=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-z|--action_args)\n\t\t\t\t\taction_args=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-c|--command)\n\t\t\t\t\tCheckArgType cmd \"$1\" \"$2\"\n\t\t\t\t\tcommand=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-i|--user_id)\n\t\t\t\t\tuser_id=${user_id:+$user_id|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-u|--username)\n\t\t\t\t\tusername=${username:+$username|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-h|--chat_id)\n\t\t\t\t\tchat_id=${chat_id:+$chat_id|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-v|--chat_name)\n\t\t\t\t\tchat_name=${chat_name:+$chat_name|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-y|--chat_type)\n\t\t\t\t\tchat_type=${chat_type:+$chat_type|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-e|--time)\n\t\t\t\t\ttime=${time:+$time|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-d|--date)\n\t\t\t\t\tdate=${date:+$date|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-l|--laguage_code)\n\t\t\t\t\tlanguage=${language:+$language|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-m|--message_id)\n\t\t\t\t\tmessage_id=${message_id:+$message_id|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-b|--is_bot)\n\t\t\t\t\tis_bot=${is_bot:+$is_bot|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-t|--text)\n\t\t\t\t\ttext=${2//$'\\n'/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-n|--entitie_type)\n\t\t\t\t\tentities_type=${entities_type:+$entities_type|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-f|--file_type)\n\t\t\t\t\tfile_type=${file_type:+$file_type|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-p|--mime_type)\n\t\t\t\t\tmime_type=${mime_type:+$mime_type|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-q|--query_data)\n\t\t\t\t\tquery_data=${query_data:+$query_data|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-r|--query_id)\n\t\t\t\t\tquery_id=${query_id:+$query_id|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-g|--chat_member)\n\t\t\t\t\tchat_member=${chat_member:+$chat_member|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-o|--num_args)\n\t\t\t\t\tnum_args=${num_args:+$num_args|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-w|--weekday)\n\t\t\t\t\tweekday=${weekday:+$weekday|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-j|--user_status)\n\t\t\t\t\tuser_status=${user_status:+$user_status|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-x|--message_status)\n\t\t\t\t\tmessage_status=${message_status:+$message_status|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-T|--auth_file)\n\t\t\t\t\tauth_file=${auth_file:+$auth_file|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-R|--bot_reply_message)\n\t\t\t\t\treply_message=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-S|--bot_send_message)\n\t\t\t\t\tsend_message=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-F|--bot_forward_message)\n\t\t\t\t\tforward_message=${forward_message:+$forward_message|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-K|--bot_reply_markup)\n\t\t\t\t\treply_markup=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-P|--bot_parse_mode)\n\t\t\t\t\tparse_mode=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-B|--bot_action)\n\t\t\t\t\tbot_action=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-E|--exec)\n\t\t\t\t\texec=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-A|--author_signature)\n\t\t\t\t\tauthor_signature=${author_signature:+$author_signature|}${2//[,$'\\n']/|}\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t-C|--continue)\n\t\t\t\t\tcontinue=true\n\t\t\t\t\tshift\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t\t\n\t\t[[ $name ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-s, --name]\"\n\t\t[[ ${_BOT_RULES_[$name]} ]] && MessageError API \"$_ERR_RULE_ALREADY_EXISTS_\" \"[-s, --name]\" \"$name\"\n\n\t\ti=${_BOT_RULES_INDEX_:=0}\n\n\t\t_BOT_RULES_[$i:source]=${BASH_SOURCE[1]##*/}\n\t\t_BOT_RULES_[$i:line]=${BASH_LINENO}\n\t\t_BOT_RULES_[$i:name]=${name}\n\t\t_BOT_RULES_[$i:action]=${action}\n\t\t_BOT_RULES_[$i:action_args]=${action_args}\n\t\t_BOT_RULES_[$i:user_id]=${user_id}\n\t\t_BOT_RULES_[$i:username]=${username}\n\t\t_BOT_RULES_[$i:chat_id]=${chat_id}\n\t\t_BOT_RULES_[$i:chat_name]=${chat_name}\n\t\t_BOT_RULES_[$i:chat_type]=${chat_type}\n\t\t_BOT_RULES_[$i:language_code]=${language}\n\t\t_BOT_RULES_[$i:message_id]=${message_id}\n\t\t_BOT_RULES_[$i:is_bot]=${is_bot}\n\t\t_BOT_RULES_[$i:command]=${command}\n\t\t_BOT_RULES_[$i:text]=${text}\n\t\t_BOT_RULES_[$i:entities_type]=${entities_type}\n\t\t_BOT_RULES_[$i:file_type]=${file_type}\n\t\t_BOT_RULES_[$i:mime_type]=${mime_type}\n\t\t_BOT_RULES_[$i:query_data]=${query_data}\n\t\t_BOT_RULES_[$i:query_id]=${query_id}\n\t\t_BOT_RULES_[$i:chat_member]=${chat_member}\n\t\t_BOT_RULES_[$i:num_args]=${num_args}\n\t\t_BOT_RULES_[$i:time]=${time}\n\t\t_BOT_RULES_[$i:date]=${date}\n\t\t_BOT_RULES_[$i:weekday]=${weekday}\n\t\t_BOT_RULES_[$i:user_status]=${user_status}\n\t\t_BOT_RULES_[$i:message_status]=${message_status}\n\t\t_BOT_RULES_[$i:author_signature]=${author_signature}\n\t\t_BOT_RULES_[$i:auth_file]=${auth_file}\n\t\t_BOT_RULES_[$i:bot_reply_message]=${reply_message}\n\t\t_BOT_RULES_[$i:bot_send_message]=${send_message}\n\t\t_BOT_RULES_[$i:bot_forward_message]=${forward_message}\n\t\t_BOT_RULES_[$i:bot_reply_markup]=${reply_markup}\n\t\t_BOT_RULES_[$i:bot_parse_mode]=${parse_mode}\n\t\t_BOT_RULES_[$i:bot_action]=${bot_action}\n\t\t_BOT_RULES_[$i:exec]=${exec}\n\t\t_BOT_RULES_[$i:continue]=${continue}\n\t\t_BOT_RULES_[$name]=true\n\n\t\t# Incrementa índice.\n\t\t((_BOT_RULES_INDEX_++))\n\n\t\treturn $?\n\t}\n\t\n\tShellBot.manageRules()\n\t{\n\t\tlocal uid rule botcmd err tm stime etime ctime mime_type weekday\n\t\tlocal dt sdate edate cdate mem ent type args status out fwid\n\t   \tlocal stdout i re match file user line\n\n\t\tlocal u_message_text u_message_id u_message_from_is_bot \n\t\tlocal u_message_from_id u_message_from_username msgstatus argpos\n\t\tlocal u_message_from_language_code u_message_chat_id message_status\n\t\tlocal u_message_chat_type u_message_date u_message_entities_type\n\t\tlocal u_message_mime_type u_message_author_signature\n\n\t\tlocal \tparam=$(getopt\t--name \"$FUNCNAME\" \\\n\t\t\t\t\t\t\t\t\t--options 'u:' \\\n\t\t\t\t\t\t\t\t\t--longoptions 'update_id:' \\\n\t\t\t\t\t\t\t\t\t-- \"$@\")\n\n\t\t\t\t\n\t\teval set -- \"$param\"\n\t\t\n\t\twhile :\n\t\tdo\n\t\t\tcase $1 in\n\t\t\t\t-u|--update_id)\n\t\t\t\t\tCheckArgType int \"$1\" \"$2\"\n\t\t\t\t\tuid=$2\n\t\t\t\t\tshift 2\n\t\t\t\t\t;;\n\t\t\t\t--)\n\t\t\t\t\tshift\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\t\t\t\n\t\tdone\n\t\t\n\t\t[[ $uid ]] || MessageError API \"$_ERR_PARAM_REQUIRED_\" \"[-u, --update_id]\"\n\n\t\t# Regras (somente-leitura)\n\t\treadonly _BOT_RULES_ _BOT_RULES_INDEX_\n\t\t\n\t\t[[ ${u_message_text:=${message_text[$uid]}} \t\t\t\t]] ||\n\t\t[[ ${u_message_text:=${edited_message_text[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_text:=${callback_query_message_text[$uid]}}\t]] ||\n\t\t[[ ${u_message_text:=${inline_query_query[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_text:=${chosen_inline_result_query[$uid]}}\t]] ||\n\t\t[[ ${u_message_text:=${channel_post_text[$uid]}}\t\t\t]] ||\n\t\t[[ ${u_message_text:=${edited_channel_post_text[$uid]}}\t\t]]\n\n\t\t[[ ${u_message_id:=${message_message_id[$uid]}}\t\t\t\t\t]] ||\n\t\t[[ ${u_message_id:=${edited_message_message_id[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_id:=${callback_query_message_message_id[$uid]}} \t]] ||\n\t\t[[ ${u_message_id:=${inline_query_id[$uid]}} \t\t\t\t\t]] ||\n\t\t[[ ${u_message_id:=${chosen_inline_result_result_id[$uid]}}\t\t]] ||\n\t\t[[ ${u_message_id:=${channel_post_message_id[$uid]}}\t\t\t]] ||\n\t\t[[ ${u_message_id:=${edited_channel_post_message_id[$uid]}}\t\t]] ||\n\t\t[[ ${u_message_id:=${poll_answer_poll_id[$uid]}}\t\t\t\t]]\n\n\t\t[[ ${u_message_from_is_bot:=${message_from_is_bot[$uid]}} \t\t\t\t]] ||\n\t\t[[ ${u_message_from_is_bot:=${edited_message_from_is_bot[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_from_is_bot:=${callback_query_from_is_bot[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_from_is_bot:=${inline_query_from_is_bot[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_from_is_bot:=${chosen_inline_result_from_is_bot[$uid]}}\t]] ||\n\t\t[[ ${u_message_from_is_bot:=${poll_answer_user_is_bot[$uid]}}\t\t\t]]\n\n\t\t[[ ${u_message_from_id:=${message_from_id[$uid]}} \t\t\t\t]] ||\n\t\t[[ ${u_message_from_id:=${edited_message_from_id[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_from_id:=${callback_query_from_id[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_from_id:=${inline_query_from_id[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_from_id:=${chosen_inline_result_from_id[$uid]}}\t]] ||\n\t\t[[ ${u_message_from_id:=${poll_answer_user_id[$uid]}}\t\t\t]]\n\n\t\t[[ ${u_message_from_username:=${message_from_username[$uid]}} \t\t\t\t]] ||\n\t\t[[ ${u_message_from_username:=${edited_message_from_username[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_from_username:=${callback_query_from_username[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_from_username:=${inline_query_from_username[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_from_username:=${chosen_inline_result_from_username[$uid]}}\t]] ||\n\t\t[[ ${u_message_from_username:=${poll_answer_user_username[$uid]}}\t\t\t]]\n\n\t\t[[ ${u_message_from_language_code:=${message_from_language_code[$uid]}} \t\t\t\t]] ||\n\t\t[[ ${u_message_from_language_code:=${edited_message_from_language_code[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_from_language_code:=${callback_query_from_language_code[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_from_language_code:=${inline_query_from_language_code[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_from_language_code:=${chosen_inline_result_from_language_code[$uid]}}\t]]\n\n\t\t[[ ${u_message_chat_id:=${message_chat_id[$uid]}} \t\t\t\t\t]] ||\n\t\t[[ ${u_message_chat_id:=${edited_message_chat_id[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_chat_id:=${callback_query_message_chat_id[$uid]}}\t]] ||\n\t\t[[ ${u_message_chat_id:=${channel_post_chat_id[$uid]}}\t\t\t\t]] ||\n\t\t[[ ${u_message_chat_id:=${edited_channel_post_chat_id[$uid]}}\t\t]]\n\n\t\t[[ ${u_message_chat_username:=${message_chat_username[$uid]}}\t\t\t\t\t]] ||\n\t\t[[ ${u_message_chat_username:=${edited_message_chat_username[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_chat_username:=${callback_query_message_chat_username[$uid]}}\t]]\n\n\t\t[[ ${u_message_chat_type:=${message_chat_type[$uid]}} \t\t\t\t\t]] ||\n\t\t[[ ${u_message_chat_type:=${edited_message_chat_type[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_chat_type:=${callback_query_message_chat_type[$uid]}}\t]] ||\n\t\t[[ ${u_message_chat_type:=${channel_post_chat_type[$uid]}}\t\t\t\t]] ||\n\t\t[[ ${u_message_chat_type:=${edited_channel_post_chat_type[$uid]}}\t\t]]\n\n\t\t[[ ${u_message_date:=${message_date[$uid]}} \t\t\t\t]] ||\n\t\t[[ ${u_message_date:=${edited_message_edit_date[$uid]}} \t]] ||\n\t\t[[ ${u_message_date:=${callback_query_message_date[$uid]}}\t]] ||\n\t\t[[ ${u_message_date:=${channel_post_date[$uid]}}\t\t\t]] ||\n\t\t[[ ${u_message_date:=${edited_channel_post_date[$uid]}}\t\t]]\n\n\t\t[[ ${u_message_entities_type:=${message_entities_type[$uid]}} \t\t\t\t\t]] ||\n\t\t[[ ${u_message_entities_type:=${edited_message_entities_type[$uid]}} \t\t\t]] ||\n\t\t[[ ${u_message_entities_type:=${callback_query_message_entities_type[$uid]}}\t]] ||\n\t\t[[ ${u_message_entities_type:=${channel_post_entities_type[$uid]}}\t\t\t\t]] ||\n\t\t[[ ${u_message_entities_type:=${edited_channel_post_entities_type[$uid]}}\t\t]]\n\n\t\t[[ ${u_message_mime_type:=${message_document_mime_type[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_mime_type:=${message_video_mime_type[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_mime_type:=${message_audio_mime_type[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_mime_type:=${message_voice_mime_type[$uid]}}\t\t\t]] ||\n\t\t[[ ${u_message_mime_type:=${channel_post_document_mime_type[$uid]}} ]]\n\n\t\t[[ ${u_message_author_signature:=${channel_post_author_signature[$uid]}} \t\t]] ||\n\t\t[[ ${u_message_author_signature:=${edited_channel_post_author_signature[$uid]}} ]]\n\n\t\t# Regras\n\t\tfor ((i=0; i < _BOT_RULES_INDEX_; i++)); do\n\t\t\n\t\t\tIFS=' ' read -ra args <<< $u_message_text\n\t\t\t\n\t\t\t[[ ! ${_BOT_RULES_[$i:num_args]}\t\t\t||\t${#args[@]}\t\t\t\t\t\t\t== @(${_BOT_RULES_[$i:num_args]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:command]}\t\t\t\t||\t${u_message_text%% *}\t\t\t\t== @(${_BOT_RULES_[$i:command]})?(@${_BOT_INFO_[3]}) \t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:message_id]} \t\t\t||\t$u_message_id \t\t\t\t\t\t== @(${_BOT_RULES_[$i:message_id]})\t\t\t\t\t\t]] \t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:is_bot]} \t\t\t\t||\t$u_message_from_is_bot\t\t\t\t== @(${_BOT_RULES_[$i:is_bot]})\t\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:user_id]}\t\t\t\t||\t$u_message_from_id\t\t\t\t\t== @(${_BOT_RULES_[$i:user_id]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:username]}\t\t\t||\t$u_message_from_username\t\t\t== @(${_BOT_RULES_[$i:username]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:language]}\t\t\t||\t$u_message_from_language_code\t\t== @(${_BOT_RULES_[$i:language]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:chat_id]}\t\t\t\t||\t$u_message_chat_id\t\t\t\t\t== @(${_BOT_RULES_[$i:chat_id]})\t\t\t\t\t\t]] \t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:chat_name]}\t\t\t||\t$u_message_chat_username\t\t\t== @(${_BOT_RULES_[$i:chat_name]})\t\t\t\t\t\t]] \t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:chat_type]}\t\t\t||\t$u_message_chat_type\t\t\t\t== @(${_BOT_RULES_[$i:chat_type]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:author_signature]}\t||\t$u_message_author_signature\t\t\t== @(${_BOT_RULES_[$i:author_signature]})\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:mime_type]}\t\t\t||\t$u_message_mime_type\t\t\t\t== @(${_BOT_RULES_[$i:mime_type]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:query_id]}\t\t\t||\t${callback_query_id[$uid]}\t\t\t== @(${_BOT_RULES_[$i:query_id]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:query_data]}\t\t\t||\t${callback_query_data[$uid]}\t\t== @(${_BOT_RULES_[$i:query_data]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:weekday]}\t\t\t\t|| \t$(printf '%(%u)T' $u_message_date) \t== @(${_BOT_RULES_[$i:weekday]})\t\t\t\t\t\t]]\t&&\n\t\t\t[[ ! ${_BOT_RULES_[$i:text]}\t\t\t\t||\t$u_message_text\t\t\t\t\t\t=~ ${_BOT_RULES_[$i:text]}\t\t\t\t\t\t\t\t]]\t|| continue\n\n\t\t\t# Extrai os arquivos do conjunto negado. Caso esteja ausente\n\t\t\t# define a expressão padrão.\n\t\t\t# Captura os grupos contidos no padrão, separando o\n\t   \t\t# operador de negação '!' (se presente) para determinar o \n\t\t\t# tratamento de valição do intervalo.\n\t\t\t#\n\t\t\t# Exemplo 1:\n\t\t\t#              \n\t\t\t#       BASH_REMATCH[2]\n\t\t\t#    __________|__________\n\t\t\t#   |                     |\n\t\t\t# !(12:00-13:00,15:00-17:00)\n\t\t\t# |\n\t\t\t# |_ BASH_REMATCH[1]\n\t\t\t#\n\t\t\tre='^(!)\\(([^)]+)\\)$'\n\n\t\t\t[[ ${_BOT_RULES_[$i:auth_file]} =~ $re ]]\n\t\t\tmatch=${BASH_REMATCH[2]:-${_BOT_RULES_[$i:auth_file]}}\n\t\t\t\n\t\t\tfor file in ${match//|/ }; do\n\t\t\t\t# Testa acesso ao arquivo.\n\t\t\t\tif ! [[ -f \"$file\" && -r \"$file\" ]]; then\n\t\t\t\t\tMessageError API \"'$file' $_ERR_FILE_NOT_FOUND_\" \"${_BOT_RULES_[$i:name]}\" '[-T, --auth_file]'\n\t\t\t\tfi\n\n\t\t\t\t# Lê os usuários removendo os comentários complementares\n\t\t\t\t# e ignora a linha prefixada com hashtag '#'.\t\n\t\t\t\twhile read -r line; do\n\t\t\t\t\tuser=${line%%*( )#*}\n\t\t\t\t\t[[ $user != *( )#* ]] \t\t\t\t\t\t\t\t\t\t\t\t\t&&\n\t\t\t\t\t[[ $user == $u_message_from_id || $user == $u_message_from_username\t]] \t&& break 2\n\t\t\t\tdone < \"$file\"\n\t\t\tdone\n\n\t\t\t((${BASH_REMATCH[1]} $?)) && continue\n\t\n\t\t\tfor msgstatus in ${_BOT_RULES_[$i:message_status]//|/ }; do\n\t\t\t\t[[ $msgstatus == pinned\t\t&& ${message_pinned_message_message_id[$uid]:-${channel_post_pinned_message_message_id[$uid]}} \t\t]] \t||\n\t\t\t\t[[ $msgstatus == edited \t&& ${edited_message_message_id[$uid]:-${edited_channel_post_message_id[$uid]}}\t\t\t\t\t\t]] \t||\n\t\t\t\t[[ $msgstatus == forwarded\t&& ${message_forward_from_id[$uid]:-${channel_post_forward_from_chat_id[$uid]}}\t\t\t\t\t\t]]\t||\n\t\t\t\t[[ $msgstatus == reply\t\t&& ${message_reply_to_message_message_id[$uid]:-${channel_post_reply_to_message_message_id[$uid]}}\t]] \t||\n\t\t\t\t[[ $msgstatus == callback\t&& ${callback_query_message_message_id[$uid]}\t\t\t\t\t\t\t\t\t\t\t\t\t\t]]\t||\n\t\t\t\t[[ $msgstatus == inline\t\t&& ${inline_query_id[$uid]}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]]\t||\n\t\t\t\t[[ $msgstatus == chosen\t\t&& ${chosen_inline_result_result_id[$uid]}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]]\t||\n\t\t\t\t[[ $msgstatus == poll\t\t&& ${poll_answer_poll_id[$uid]}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]]\t&& break\n\t\t\tdone\n\t\t\t\t\n\t\t\t(($?)) && continue\n\n\t\t\tfor ent in ${_BOT_RULES_[$i:entities_type]//|/ }; do\n\t\t\t\t[[ $ent == @(${u_message_entities_type//$_BOT_DELM_/|})\t]] \t&& break\n\t\t\tdone\n\n\t\t\t(($?)) && continue\n\t\n\t\t\tfor mem in ${_BOT_RULES_[$i:chat_member]//|/ }; do\n\t\t\t\t[[ $mem == new \t&& ${message_new_chat_member_id[$uid]} \t]] ||\n\t\t\t\t[[ $mem == left\t&& ${message_left_chat_member_id[$uid]} ]] && break\n\t\t\tdone\n\t\t\t\n\t\t\t(($?)) && continue\n\n\t\t\tfor type in ${_BOT_RULES_[$i:file_type]//|/ }; do\n\t\t\t\t[[ $type == document \t&& ${message_document_file_id[$uid]:-${channel_post_document_file_id[$uid]}} &&\n\t\t\t\t\t\t\t\t\t\t ! ${message_document_thumb_file_id[$uid]:-${channel_post_document_thumb_file_id[$uid]}}\t]] \t||\n\t\t\t\t[[ $type == gif \t\t&& ${message_document_file_id[$uid]:-${channel_post_document_file_id[$uid]}} &&\n\t\t\t\t\t\t\t\t\t\t   ${message_document_thumb_file_id[$uid]:-${channel_post_document_thumb_file_id[$uid]}}\t]] \t||\n\t\t\t\t[[ $type == photo\t\t&& ${message_photo_file_id[$uid]:-${channel_post_photo_file_id[$uid]}}\t\t\t\t\t\t]] \t||\n\t\t\t\t[[ $type == sticker \t&& ${message_sticker_file_id[$uid]:-${channel_post_sticker_file_id[$uid]}}\t\t\t\t\t]]\t||\n\t\t\t\t[[ $type == video\t\t&& ${message_video_file_id[$uid]:-${channel_post_video_file_id[$uid]}}\t\t\t\t\t\t]]\t||\n\t\t\t\t[[ $type == audio\t\t&& ${message_audio_file_id[$uid]:-${channel_post_audio_file_id[$uid]}}\t\t\t\t\t\t]]\t||\n\t\t\t\t[[ $type == voice\t\t&& ${message_voice_file_id[$uid]:-${channel_post_voice_file_id[$uid]}}\t\t\t\t\t\t]]\t||\n\t\t\t\t[[ $type == contact\t\t&& ${message_contact_user_id[$uid]:-${channel_post_contact_user_id[$uid]}}\t\t\t\t\t]]\t||\n\t\t\t\t[[ $type == location\t&& ${message_location_latitude[$uid]:-${channel_post_location_latitude[$uid]}}\t\t\t\t]]\t&& break\n\t\t\tdone\n\n\t\t\t(($?)) && continue\n\t\t\t\n\t\t\t[[ ${_BOT_RULES_[$i:time]} =~ $re ]]\n\t\t\tmatch=${BASH_REMATCH[2]:-${_BOT_RULES_[$i:time]}}\n\n\t\t\tfor tm in ${match//|/ }; do\n\t\t\t\tIFS='-' read stime etime <<< $tm\n\t\t\t\tprintf -v ctime '%(%H:%M)T' $u_message_date\n\n\t\t\t\t[[ $ctime == @($stime|$etime) \t\t\t]]\t||\n\t\t\t\t[[ $ctime > $stime && $ctime < $etime \t]]\t&& break\n\t\t\tdone\n\t\t\t\t\t\n\t\t\t((${BASH_REMATCH[1]} $?)) && continue\n\n\t\t\t[[ ${_BOT_RULES_[$i:date]} =~ $re ]]\n\t\t\tmatch=${BASH_REMATCH[2]:-${_BOT_RULES_[$i:date]}}\n\n\t\t\tfor dt in ${match//|/ }; do\n\n\t\t\t\tIFS='-' read sdate edate <<< $dt\n\t\t\t\tIFS='/' read -a sdate <<< $sdate\n\t\t\t\tIFS='/' read -a edate <<< $edate\n\t\t\t\t\t\n\t\t\t\tsdate=${sdate[2]}/${sdate[1]}/${sdate[0]}\n\t\t\t\tedate=${edate[2]}/${edate[1]}/${edate[0]}\n\n\t\t\t\tprintf -v cdate '%(%Y/%m/%d)T' $u_message_date\n\t\t\t\t\t\n\t\t\t\t[[ $cdate == @($sdate|$edate) \t\t\t]] \t||\n\t\t\t\t[[ $cdate > $sdate && $cdate < $edate \t]]\t&& break\n\t\t\tdone\n\t\t\t\n\t\t\t((${BASH_REMATCH[1]} $?)) && continue\n\n\t\t\tif [[ ${_BOT_RULES_[$i:user_status]} ]]; then\n\t\t\t\tcase $_BOT_TYPE_RETURN_ in\n\t\t\t\t\tvalue)\n\t\t\t\t\t\tout=$(ShellBot.getChatMember \t--chat_id $u_message_chat_id \\\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t--user_id $u_message_from_id 2>/dev/null)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tIFS=$_BOT_DELM_ read -a out <<< $out\n\t\t\t\t\t\t[[ ${out[2]} == true ]]\n\t\t\t\t\t\tstatus=${out[$(($? ? 6 : 5))]}\n\t\t\t\t\t\t;;\n\t\t\t\t\tjson)\n\t\t\t\t\t\tout=$(ShellBot.getChatMember \t--chat_id $u_message_chat_id \\\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t--user_id $u_message_from_id 2>/dev/null)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tstatus=$(Json '.result.status' $out)\n\t\t\t\t\t\t;;\n\t\t\t\t\tmap)\t\n\t\t\t\t\t\tShellBot.getChatMember \t--chat_id $u_message_chat_id \\\n\t\t\t\t\t\t\t\t\t\t\t\t--user_id $u_message_from_id &>/dev/null\n\n\t\t\t\t\t\tstatus=${return[status]}\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\t\t[[ $status == @(${_BOT_RULES_[$i:user_status]}) ]] || continue\n\t\t\tfi\n\t\t\t\n\t\t\t# Monitor\n\t\t\t[[ $_BOT_MONITOR_ ]]\t&& \tprintf '[%s]: %s: %s: %s: %s: %s: %s: %s: %s: %s: %s\\n'\t\\\n\t\t\t\t\t\t\t\t\t\t\"${FUNCNAME}\"\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"$((uid+1))\"\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"$(printf '%(%d/%m/%Y %H:%M:%S)T' ${u_message_date})\"\t\\\n\t\t\t\t\t\t\t\t\t\t\"${u_message_chat_type}\"\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${u_message_chat_username:--}\"\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${u_message_from_username:--}\"\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${_BOT_RULES_[$i:source]}\"\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${_BOT_RULES_[$i:line]}\"\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${_BOT_RULES_[$i:name]}\" \t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${_BOT_RULES_[$i:action]:--}\"\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${_BOT_RULES_[$i:exec]:--}\"\n\t\t\t\n\t\t\t# Log\t\n\t\t\t[[ $_BOT_LOG_FILE_ ]] \t&&\tprintf '%s: %s: %s: %s: %s: %s: %s\\n'\t\\\n\t\t\t\t\t\t\t\t\t \t\"$(printf '%(%d/%m/%Y %H:%M:%S)T')\"\t\t\\\n\t\t\t\t\t\t\t\t \t \t\"${FUNCNAME}\"\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t \t\"${_BOT_RULES_[$i:source]}\"\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t \t\"${_BOT_RULES_[$i:line]}\"\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t \t\"${_BOT_RULES_[$i:name]}\"\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${_BOT_RULES_[$i:action]:--}\"\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\"${_BOT_RULES_[$i:exec]:--}\"\t\t\t>> \"$_BOT_LOG_FILE_\"\n\n\t\t\t# Anexa tipo da ação. (se presente)\n\t\t\tif [[ ${_BOT_RULES_[$i:bot_action]} ]]; then\n\t\t\t\tShellBot.sendChatAction --chat_id $u_message_chat_id --action ${_BOT_RULES_[$i:bot_action]} &>/dev/null\n\t\t\tfi\n\n\t\t\tif [[ ${_BOT_RULES_[$i:bot_reply_message]} ]]; then\n\t\t\t\tShellBot.sendMessage\t--chat_id $u_message_chat_id \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t--reply_to_message_id $u_message_id\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t--text \"$(FlagConv $uid \"${_BOT_RULES_[$i:bot_reply_message]}\")\" \t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t${_BOT_RULES_[$i:bot_reply_markup]:+--reply_markup \"${_BOT_RULES_[$i:bot_reply_markup]}\"} \t\\\n\t\t\t\t\t\t\t\t\t\t${_BOT_RULES_[$i:bot_parse_mode]:+--parse_mode ${_BOT_RULES_[$i:bot_parse_mode]}} \t\t\t&>/dev/null\n\t\t\tfi\n\t\t\t\t\n\t\t\tif [[ ${_BOT_RULES_[$i:bot_send_message]} ]]; then\n\t\t\t\tShellBot.sendMessage\t--chat_id $u_message_chat_id \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t--text \"$(FlagConv $uid \"${_BOT_RULES_[$i:bot_send_message]}\")\"\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t${_BOT_RULES_[$i:bot_reply_markup]:+--reply_markup \"${_BOT_RULES_[$i:bot_reply_markup]}\"} \t\\\n\t\t\t\t\t\t\t\t\t\t${_BOT_RULES_[$i:bot_parse_mode]:+--parse_mode ${_BOT_RULES_[$i:bot_parse_mode]}} \t\t\t&>/dev/null\n\t\t\tfi\n\n\t\t\tfor fwid in ${_BOT_RULES_[$i:bot_forward_message]//|/ }; do\n\t\t\t\tShellBot.forwardMessage\t\t--chat_id $fwid\t\t\t\t\t\t\\\n\t\t\t\t\t\t\t\t\t\t\t--from_chat_id $u_message_chat_id \t\\\n\t\t\t\t\t\t\t\t\t\t\t--message_id $u_message_id\t\t\t&>/dev/null\n\t\t\tdone\n\n\t\t\t# Chama a função passando os argumentos posicionais. (se existir)\n\t\t\t${_BOT_RULES_[$i:action]:+${_BOT_RULES_[$i:action]} ${_BOT_RULES_[$i:action_args]:-${args[*]}}}\n\t\t\n\t\t\t# Executa a linha de comando e salva o retorno.\n\t\t\tstdout=${_BOT_RULES_[$i:exec]:+$(set -- ${args[*]}; eval $(FlagConv $uid \"${_BOT_RULES_[$i:exec]}\") 2>&1)}\n\n\t\t\twhile [[ $stdout ]]; do\n\t\t\t\tShellBot.sendMessage\t--chat_id $u_message_chat_id \t\t\t\\\n\t\t\t\t\t\t\t\t\t\t--reply_to_message_id $u_message_id\t\t\\\n\t\t\t\t\t\t\t\t\t\t--text \"${stdout:0:4096}\"\t\t\t\t&>/dev/null\n\n\t\t\t\t# Atualiza o buffer de saída.\n\t\t\t\tstdout=${stdout:4096}\n\t\t\t\n\t\t\t\t# Reenvia ação se ainda houver dados.\t\n\t\t\t\tif [[ ${_BOT_RULES_[$i:bot_action]} && $stdout ]]; then\n\t\t\t\t\tShellBot.sendChatAction --chat_id $u_message_chat_id --action ${_BOT_RULES_[$i:bot_action]} &>/dev/null\n\t\t\t\tfi\n\t\t\tdone \n\t\t\t[[ ${_BOT_RULES_[$i:continue]} ]] || return 0\n\t\tdone\n\n\t\treturn 1\n\t}\n\n    ShellBot.getUpdates()\n    {\n    \tlocal total_keys offset limit timeout allowed_updates jq_obj\n\tlocal vet val var obj oldv bar vars vals i\n\n\t# Define os parâmetros da função\n\tlocal param=$(getopt \t--name \"$FUNCNAME\" \\\n\t\t\t\t--options 'o:l:t:a:' \\\n\t\t\t\t--longoptions 'offset:,\n\t\t\t\t\t\tlimit:,\n\t\t\t\t\t\ttimeout:,\n\t\t\t\t\t\tallowed_updates:' \\\n\t\t\t\t-- \"$@\")\n    \n\teval set -- \"$param\"\n\n    \twhile :\n    \tdo\n    \t\tcase $1 in\n    \t\t\t-o|--offset)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\toffset=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-l|--limit)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\tlimit=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-t|--timeout)\n    \t\t\t\tCheckArgType int \"$1\" \"$2\"\n    \t\t\t\ttimeout=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t-a|--allowed_updates)\n    \t\t\t\tallowed_updates=$2\n    \t\t\t\tshift 2\n    \t\t\t\t;;\n    \t\t\t--)\n    \t\t\t\t# Se não houver mais parâmetros\n    \t\t\t\tshift \n    \t\t\t\tbreak\n    \t\t\t\t;;\n    \t\tesac\n    \tdone\n    \t\n\t\t# Seta os parâmetros\n\t\tjq_obj=$(curl $_CURL_OPT_ POST $_API_TELEGRAM_/${FUNCNAME#*.} \\\n\t\t\t\t\t\t\t\t${offset:+-d offset=\"$offset\"} \\\n\t\t\t\t\t\t\t\t${limit:+-d limit=\"$limit\"} \\\n\t\t\t\t\t\t\t\t${timeout:+-d timeout=\"$timeout\"} \\\n\t\t\t\t\t\t\t\t${allowed_updates:+-d allowed_updates=\"$allowed_updates\"})\n\n\n\t\t# Limpa as variáveis inicializadas.\n\t\tunset $_VAR_INIT_; _VAR_INIT_=\n\t\t\n\t\t# Se há atualizações.\n    \t[[ $(jq -r '.result|length' <<< $jq_obj) -eq 0 ]] && return 0\n\t\n\t\t# Se o método 'ShellBot.getUpdates' for invocado a partir de um subshell,\n\t\t# as atualizações são retornadas em um estrutura de dados json, o método\n\t\t# é finalizado e variáveis não são inicializadas.\n\t\t[[ $BASH_SUBSHELL -gt 0 ]] && { echo \"$jq_obj\"; return 0; }\n\n\t\tif [[ $_BOT_MONITOR_ ]]; then\n\t\t\tprintf -v bar '=%.s' {1..50}\n\t\t\tprintf \"$bar\\nData: %(%d/%m/%Y %T)T\\n\"\n\t\t\tprintf 'Script: %s\\nBot (nome): %s\\nBot (usuario): %s\\nBot (id): %s\\n' \t\\\n\t\t\t\t\t\"${_BOT_SCRIPT_}\" \t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\"${_BOT_INFO_[2]}\" \t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\"${_BOT_INFO_[3]}\" \t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\"${_BOT_INFO_[1]}\"\n\t\tfi\n\t\t\n\t\tmapfile -t vars <<< $(GetAllKeys \"$jq_obj\")\n\t\tmapfile -t vals <<< $(GetAllValues \"$jq_obj\")\n\n\t\tfor i in ${!vars[@]}; do\n\t\n\t\t\t[[ ${vars[$i]} =~ [0-9]+ ]]\n\t\t\tvet=${BASH_REMATCH:-0}\n\t\t\t\n\t\t\tvar=${vars[$i]//[0-9\\[\\]]/}\n\t\t\tvar=${var#result.}\n\t\t\tvar=${var//./_}\n\t\n\t\t\tdeclare -g $var\n\t\t\tlocal -n byref=$var # ponteiro\n\t\t\t\t\t\t\n\t\t\tval=${vals[$i]}\n\t\t\tval=${val#\\\"}\n\t\t\tval=${val%\\\"}\n\n\t\t\tbyref[$vet]+=${byref[$vet]:+$_BOT_DELM_}${val}\n\n\t\t\tif [[ $_BOT_MONITOR_ ]]; then\n\t\t\t\t[[ $vet -ne ${oldv:--1} ]] && printf \"$bar\\nMensagem: %d\\n$bar\\n\" $((vet+1))\n\t\t\t\tprintf \"[%s]: %s = '%s'\\n\" \"$FUNCNAME\" \"$var\" \"$val\"\n\t\t\t\toldv=$vet\n\t\t\tfi\n\t\n\t\t\tunset -n byref\n\t\t\t[[ $var != @(${_VAR_INIT_// /|}) ]] && _VAR_INIT_=${_VAR_INIT_:+$_VAR_INIT_ }${var}\n\t\tdone\n\t\n\t\t# Log (thread)\t\n\t\t[[ $_BOT_LOG_FILE_ ]] && CreateLog \"${#update_id[@]}\" \"$jq_obj\"\n\n   \t\t # Status\n   \t \treturn $?\n\t}\n   \n\t# Bot métodos (somente leitura)\n\treadonly -f ShellBot.token \t\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.id \t\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.username \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.first_name \t\t\t\t\t\t\\\n\t\t\t\tShellBot.getConfig\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.regHandleFunction \t\t\t\t\t\\\n\t\t\t\tShellBot.regHandleExec\t\t\t\t\t\t\\\n\t\t\t\tShellBot.watchHandle \t\t\t\t\t\t\\\n\t\t\t\tShellBot.ListUpdates \t\t\t\t\t\t\\\n\t\t\t\tShellBot.TotalUpdates \t\t\t\t\t\t\\\n\t\t\t\tShellBot.OffsetEnd \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.OffsetNext \t\t\t\t\t\t\\\n\t\t\t\tShellBot.getMe \t\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.getWebhookInfo \t\t\t\t\t\\\n\t\t\t\tShellBot.deleteWebhook \t\t\t\t\t\t\\\n\t\t\t\tShellBot.setWebhook \t\t\t\t\t\t\\\n\t\t\t\tShellBot.init \t\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.ReplyKeyboardMarkup \t\t\t\t\\\n\t\t\t\tShellBot.ForceReply\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.ReplyKeyboardRemove\t\t\t\t\\\n\t\t\t\tShellBot.KeyboardButton\t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendMessage \t\t\t\t\t\t\\\n\t\t\t\tShellBot.forwardMessage \t\t\t\t\t\\\n\t\t\t\tShellBot.sendPhoto \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendAudio \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendDocument \t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendSticker \t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendVideo \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendVideoNote \t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendVoice \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendLocation \t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendVenue \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendContact \t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendChatAction \t\t\t\t\t\\\n\t\t\t\tShellBot.getUserProfilePhotos \t\t\t\t\\\n\t\t\t\tShellBot.getFile \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.kickChatMember \t\t\t\t\t\\\n\t\t\t\tShellBot.leaveChat \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.unbanChatMember \t\t\t\t\t\\\n\t\t\t\tShellBot.getChat \t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.getChatAdministrators \t\t\t\t\\\n\t\t\t\tShellBot.getChatMembersCount \t\t\t\t\\\n\t\t\t\tShellBot.getChatMember \t\t\t\t\t\t\\\n\t\t\t\tShellBot.editMessageText \t\t\t\t\t\\\n\t\t\t\tShellBot.editMessageCaption \t\t\t\t\\\n\t\t\t\tShellBot.editMessageReplyMarkup \t\t\t\\\n\t\t\t\tShellBot.InlineKeyboardMarkup \t\t\t\t\\\n\t\t\t\tShellBot.InlineKeyboardButton \t\t\t\t\\\n\t\t\t\tShellBot.answerCallbackQuery \t\t\t\t\\\n\t\t\t\tShellBot.deleteMessage \t\t\t\t\t\t\\\n\t\t\t\tShellBot.exportChatInviteLink \t\t\t\t\\\n\t\t\t\tShellBot.setChatPhoto \t\t\t\t\t\t\\\n\t\t\t\tShellBot.deleteChatPhoto \t\t\t\t\t\\\n\t\t\t\tShellBot.setChatTitle \t\t\t\t\t\t\\\n\t\t\t\tShellBot.setChatDescription \t\t\t\t\\\n\t\t\t\tShellBot.pinChatMessage \t\t\t\t\t\\\n\t\t\t\tShellBot.unpinChatMessage \t\t\t\t\t\\\n\t\t\t\tShellBot.promoteChatMember \t\t\t\t\t\\\n\t\t\t\tShellBot.restrictChatMember \t\t\t\t\\\n\t\t\t\tShellBot.getStickerSet \t\t\t\t\t\t\\\n\t\t\t\tShellBot.uploadStickerFile \t\t\t\t\t\\\n\t\t\t\tShellBot.createNewStickerSet \t\t\t\t\\\n\t\t\t\tShellBot.addStickerToSet \t\t\t\t\t\\\n\t\t\t\tShellBot.setStickerPositionInSet \t\t\t\\\n\t\t\t\tShellBot.deleteStickerFromSet \t\t\t\t\\\n\t\t\t\tShellBot.stickerMaskPosition \t\t\t\t\\\n\t\t\t\tShellBot.downloadFile \t\t\t\t\t\t\\\n\t\t\t\tShellBot.editMessageLiveLocation \t\t\t\\\n\t\t\t\tShellBot.stopMessageLiveLocation \t\t\t\\\n\t\t\t\tShellBot.setChatStickerSet \t\t\t\t\t\\\n\t\t\t\tShellBot.deleteChatStickerSet \t\t\t\t\\\n\t\t\t\tShellBot.sendMediaGroup \t\t\t\t\t\\\n\t\t\t\tShellBot.editMessageMedia \t\t\t\t\t\\\n\t\t\t\tShellBot.inputMedia \t\t\t\t\t\t\\\n\t\t\t\tShellBot.sendAnimation \t\t\t\t\t\t\\\n\t\t\t\tShellBot.answerInlineQuery\t\t\t\t\t\\\n\t\t\t\tShellBot.InlineQueryResult\t\t\t\t\t\\\n\t\t\t\tShellBot.InputMessageContent\t\t\t\t\\\n\t\t\t\tShellBot.ChatPermissions \t\t\t\t\t\\\n\t\t\t\tShellBot.setChatPermissions \t\t\t\t\\\n\t\t\t\tShellBot.setChatAdministratorCustomTitle \t\\\n\t\t\t\tShellBot.sendPoll\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.KeyboardButtonPollType\t\t\t\t\\\n\t\t\t\tShellBot.sendDice\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.getMyCommands\t\t\t\t\t\t\\\n\t\t\t\tShellBot.setMyCommands\t\t\t\t\t\t\\\n\t\t\t\tShellBot.BotCommand\t\t\t\t\t\t\t\\\n\t\t\t\tShellBot.setMessageRules \t\t\t\t\t\\\n\t\t\t\tShellBot.manageRules \t\t\t\t\t\t\\\n\t\t\t\tShellBot.getUpdates\n\n\toffset=${_BOT_FLUSH_:+$(FlushOffset)}\t# flush\n\tprintf -v jq_obj '{\"token\":\"%s\",\"id\":%d,\"first_name\":\"%s\",\"username\":\"%s\",\"offset_start\":%d,\"offset_end\":%d}'\t\\\n\t\t\t\t\t\t\"${_BOT_INFO_[0]}\" \t\\\n\t\t\t\t\t\t\"${_BOT_INFO_[1]}\" \t\\\n\t\t\t\t\t\t\"${_BOT_INFO_[2]}\" \t\\\n\t\t\t\t\t\t\"${_BOT_INFO_[3]}\" \t\\\n\t\t\t\t\t\t\"${offset%|*}\"\t\t\\\n\t\t\t\t\t\t\"${offset#*|}\"\n\n\t# Retorna informações do bot.\n\tMethodReturn \"$jq_obj\"\n\n   \treturn $?\n}\n\n# Funções (somente leitura)\nreadonly -f MessageError \t\t\\\n\t\t\tJson \t\t\t\t\\\n\t\t\tFlushOffset \t\t\\\n\t\t\tCreateUnitService \t\\\n\t\t\tGetAllKeys \t\t\t\\\n\t\t\tGetAllValues \t\t\\\n\t\t\tSetDelmValues\t\t\\\n\t\t\tMethodReturn \t\t\\\n\t\t\tCheckArgType \t\t\\\n\t\t\tCreateLog\t\t\t\\\n\t\t\tFlagConv\n\n# /* SHELLBOT */\n"
  },
  {
    "path": "Install/Url",
    "content": "________________________\nResource Locator:\n\nhttps://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/hehe\n\nhttps://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/versao\n\nhttps://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Modulos/$_arq\n\nhttps://raw.githubusercontent.com/shellscriptx/shellbot/master/ShellBot.sh\n\nhttps://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64\n\nhttps://raw.githubusercontent.com/fabricio94b/SQUID3/main/squid3\n\nhttps://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/stunnel.pem\n\nhttps://github.com/OpenVPN/easy-rsa/releases/download/3.0.1/EasyRSA-3.0.1.tgz\n\nhttps://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/sshd_config\n\n__________________\nIP locator:\n\nipv4.icanhazip.com\n\nhttp://whatismyip.akamai.com/\n\n"
  },
  {
    "path": "Install/instsqd",
    "content": "clear\nop=$1\n[[ ! -d /usr/share/.plus ]] && exit 0\nfun_sqd01() {\n[[ -e /etc/apt/sources.list.d/trusty_sources.list ]] && {\nrm /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1\n[[ $(grep -wc 'Debian' /etc/issue.net) != '0' ]] && {\napt-key del 3B4FE6ACC0B21F32 >/dev/null 2>&1\n}\napt remove squid3=3.3.8-1ubuntu6 squid=3.3.8-1ubuntu6 squid3-common=3.3.8-1ubuntu6 -y >/dev/null 2>&1\napt update -y >/dev/null 2>&1\napt autoremove -y >/dev/null 2>&1\n}\napt install squid3 -y >/dev/null 2>&1\n}\nfun_sqd02() {\n[[ ! -e /etc/apt/sources.list.d/trusty_sources.list ]] && {\ntouch /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1\necho \"deb http://us.archive.ubuntu.com/ubuntu/ trusty main universe\" | tee --append /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1\n}\n[[ $(grep -wc 'Debian' /etc/issue.net) != '0' ]] && {\napt install dirmngr -y >/dev/null 2>&1\n[[ $(apt-key list 2>/dev/null | grep -c 'Ubuntu') == '0' ]] && {\napt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 >/dev/null 2>&1\n}\n}\napt update -y >/dev/null 2>&1\napt install squid3=3.3.8-1ubuntu6 squid=3.3.8-1ubuntu6 squid3-common=3.3.8-1ubuntu6 -y >/dev/null 2>&1\nwget -qO- https://raw.githubusercontent.com/fabricio94b/SQUID3/main/squid3 >/etc/init.d/squid3\nchmod +x /etc/init.d/squid3 >/dev/null 2>&1\nupdate-rc.d squid3 defaults >/dev/null 2>&1\n}\n[[ $op == '1' ]] && {\nfun_sqd02\n} || {\nfun_sqd01\n}"
  },
  {
    "path": "Install/list",
    "content": "#!/bin/bash\n\n_lvk=$(wget -qO- https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Sistema/versao)\nIP=$(wget -qO- ipv4.icanhazip.com)\nIP2=$(wget -qO- http://whatismyip.akamai.com/)\n[[ \"$IP\" != \"$IP2\" ]] && ipdovps=\"$IP2\" || ipdovps=\"$IP\"\necho -e \"$ipdovps\" >/etc/IP\nlst=$1 && lst1=$2 && lst2=$3 && key1=$4 && key2=crz\necho -e \"America/Sao_Paulo\" >/etc/timezone\nln -fs /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime >/dev/null 2>&1\ndpkg-reconfigure --frontend noninteractive tzdata >/dev/null 2>&1\n[[ -z $lst1 ]] && {\n\trm -rf $_Ink/list >/dev/null 2>&1 && cat /dev/null >~/.bash_history && history -c && exit 0\n}\n[[ ! -d /etc/VPSManager ]] && mkdir /etc/VPSManager\n[[ ! -d /etc/VPSManager/senha ]] && mkdir /etc/VPSManager/senha\n[[ ! -e /etc/VPSManager/Exp ]] && touch /etc/VPSManager/Exp\n[[ ! -d /etc/VPSManager/userteste ]] && mkdir /etc/VPSManager/userteste\n[[ ! -d /etc/VPSManager/.tmp ]] && mkdir /etc/VPSManager/.tmp\n[[ ! -d /etc/bot ]] && mkdir /etc/bot\n[[ ! -d /etc/bot/info-users ]] && mkdir /etc/bot/info-users\n[[ ! -d /etc/bot/arquivos ]] && mkdir /etc/bot/arquivos\n[[ ! -d /etc/bot/revenda ]] && mkdir /etc/bot/revenda\n[[ ! -d /etc/bot/suspensos ]] && mkdir /etc/bot/suspensos\n[[ ! -e /etc/bot/lista_ativos ]] && touch /etc/bot/lista_ativos\n[[ ! -e /etc/bot/lista_suspensos ]] && touch /etc/bot/lista_suspensos\necho -e 'by: @DRAGON_VPS_MANAGER' >/usr/lib/vpsmanager && cat /usr/lib/vpsmanager >$lst2/licence && cat /usr/lib/vpsmanager > /etc/VPSManager/.tmp/vps\nnetstat -nplt | grep -w 'apache2' | grep -w '80' && sed -i \"s/Listen 80/Listen 8888/g\" /etc/apache2/ports.conf && service apache2 restart\n[[ \"$(grep -o '#Port 22' /etc/ssh/sshd_config)\" == \"#Port 22\" ]] && sed -i \"s;#Port 22;Port 22;\" /etc/ssh/sshd_config && service ssh restart\ngrep -v \"^PasswordAuthentication\" /etc/ssh/sshd_config >/tmp/passlogin && mv /tmp/passlogin /etc/ssh/sshd_config\necho \"PasswordAuthentication yes\" >>/etc/ssh/sshd_config\n_dir1='/bin'\n_dir2='/etc/VPSManager'\n_dir3='/root'\nrm $_dir2/ShellBot.sh $_dir2/cabecalho $_dir2/open.py $_dir2/proxy.py $_dir2/wsproxy.py >/dev/null 2>&1\n_mdls=(\"addhost\" \"delhost\" \"alterarsenha\" \"criarusuario\" \"expcleaner\" \"mudardata\" \"remover\" \"criarteste\" \"verifbot\" \"droplimiter\" \"alterarlimite\" \"ajuda\" \"sshmonitor\" \"badvpn\" \"userbackup\" \"instsqd\" \"blockt\" \"otimizar\" \"menu\" \"speedtest\" \"banner\" \"senharoot\" \"reiniciarservicos\" \"reiniciarsistema\" \"attscript\" \"conexao\" \"delscript\" \"detalhes\" \"botssh\"  \"botteste\" \"botgen\" \"infousers\" \"verifatt\" \"limiter\" \"uexpired\" \"cabecalho\" \"bot\" \"botsshteste\" \"botgerador\" \"open.py\" \"slow_dns\" \"proxy.py\" \"wsproxy.py\")\n_mdls2=(\"onlineapp.sh\")\nfor _arq in ${_mdls[@]}; do\n\t[[ -e $_dir1/$_arq ]] && rm $_dir1/$_arq >/dev/null 2>&1\n\twget -c -P $_dir1 https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Modulos/$_arq\n\tchmod +x $_dir1/$_arq\ndone\nfor _arq in ${_mdls2[@]}; do\n\t[[ -e $_dir3/$_arq ]] && rm $_dir3/$_arq >/dev/null 2>&1\n\twget -c -P $_dir3 https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Modulos/$_arq\n\tchmod +x $_dir3/$_arq\ndone\ncd /var/www/html && mkdir server\ncd /root && ./onlineapp.sh\nmv $_dir1/cabecalho $_dir1/bot $_dir1/botsshteste $_dir1/botgerador $_dir1/open.py $_dir1/proxy.py $_dir1/wsproxy.py $_dir2\n_arq_host=\"/etc/hosts\"\n_host[0]=\"d1n212ccp6ldpw.cloudfront.net\"\n_host[1]=\"dns.whatsapp.net\"\n_host[2]=\"portalrecarga.vivo.com.br/recarga\"\n_host[3]=\"navegue.vivo.com.br/controle/\"\n_host[4]=\"navegue.vivo.com.br/pre/\"\n_host[5]=\"www.whatsapp.net\"\n_host[6]=\"/VPSMANAGER?\"\nfor host in ${_host[@]}; do\n\tif [[ \"$(grep -w \"$host\" $_arq_host | wc -l)\" = \"0\" ]]; then\n\t\tsed -i \"3i\\127.0.0.1 $host\" $_arq_host\n\tfi\ndone\n[[ ! -e /etc/autostart ]] && {\n\techo '#!/bin/bash\nclear\n#AUTOMATIC START' >/etc/autostart\n\tchmod +x /etc/autostart\n} || {\n\t[[ $(ps x | grep \"bot_plus\" | grep -v grep | wc -l) != '0' ]] && wget -qO- https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/ShellBot.sh\n\tfor proc in $(ps x | grep 'dmS' | grep -v 'grep' | awk {'print $1'}); do\n\t\tscreen -r -S \"$proc\" -X quit\t\ndone\n\tscreen -wipe >/dev/null\n\techo '#!/bin/bash\nclear\n\n#AUTOMATIC START' >/etc/autostart\n\tchmod +x /etc/autostart\n} || {\n\t[[ $(ps x | grep \"bot_teste\" | grep -v grep | wc -l) != '0' ]] && wget -qO- https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/ShellBot.sh\n\tfor proc in $(ps x | grep 'dmS' | grep -v 'grep' | awk {'print $1'}); do\n\t\tscreen -r -S \"$proc\" -X quit\t\ndone\n\tscreen -wipe >/dev/null\n\techo '#!/bin/bash\nclear\n\n#AUTOMATIC START' >/etc/autostart\n\tchmod +x /etc/autostart\n} || {\n\t[[ $(ps x | grep \"bot_gen\" | grep -v grep | wc -l) != '0' ]] && wget -qO- https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/ShellBot.sh\n\tfor proc in $(ps x | grep 'dmS' | grep -v 'grep' | awk {'print $1'}); do\n\t\tscreen -r -S \"$proc\" -X quit\t\ndone\n\tscreen -wipe >/dev/null\n\techo '#!/bin/bash\nclear\n\n#AUTOMATIC START' >/etc/autostart\n\tchmod +x /etc/autostart\n}\ncrontab -r >/dev/null 2>&1\n(\n\tcrontab -l 2>/dev/null\n\techo \"@daily /bin/verifatt\"\n\techo \"@reboot /etc/autostart\"\n\techo \"* * * * * /etc/autostart\"\n\techo \"0 */6 * * * /bin/uexpired\"\n\techo \"*/1 * * * * cd /root/ && ./onlineapp.sh\"\n) | crontab -\necho \"$_lvk\" | sed -n '1 p' | cut -d' ' -f2 >/bin/versao && cat /bin/versao >/home/vpsmanager\nwget https://github.com/januda-ui/DRAGON-VPS-MANAGER/raw/main/Install/jq-linux64 >/dev/null 2>&1\nchmod +x jq-linux64 && mv jq-linux64 $(which jq)\nservice cron restart >/dev/null 2>&1\nservice ssh restart >/dev/null 2>&1\n[[ -d /var/www/html/openvpn ]] && service apache2 restart >/dev/null 2>&1\nrm -rf $lst1/list >/dev/null 2>&1\n"
  },
  {
    "path": "Install/squid3",
    "content": "#! /bin/sh\n\n\nNAME=squid3\nDESC=\"Squid HTTP Proxy\"\nDAEMON=/usr/sbin/squid3\nPIDFILE=/var/run/$NAME.pid\nCONFIG=/etc/squid3/squid.conf\nSQUID_ARGS=\"-YC -f $CONFIG\"\n\n[ ! -f /etc/default/squid ] || . /etc/default/squid\n\n. /lib/lsb/init-functions\n\nPATH=/bin:/usr/bin:/sbin:/usr/sbin\n\n[ -x $DAEMON ] || exit 0\n\nulimit -n 65535\n\nfind_cache_dir () {\n\tw=\" \t\"\n        res=`$DAEMON -k parse -f $CONFIG 2>&1 |\n\t\tgrep \"Processing:\" |\n\t\tsed s/.*Processing:\\ // |\n\t\tsed -ne '\n\t\t\ts/^['\"$w\"']*'$1'['\"$w\"']\\+[^'\"$w\"']\\+['\"$w\"']\\+\\([^'\"$w\"']\\+\\).*$/\\1/p;\n\t\t\tt end;\n\t\t\td;\n\t\t\t:end q'`\n        [ -n \"$res\" ] || res=$2\n        echo \"$res\"\n}\n\ngrepconf () {\n\tw=\" \t\"\n        res=`$DAEMON -k parse -f $CONFIG 2>&1 |\n\t\tgrep \"Processing:\" |\n\t\tsed s/.*Processing:\\ // |\n\t\tsed -ne '\n\t\t\ts/^['\"$w\"']*'$1'['\"$w\"']\\+\\([^'\"$w\"']\\+\\).*$/\\1/p;\n\t\t\tt end;\n\t\t\td;\n\t\t\t:end q'`\n\t[ -n \"$res\" ] || res=$2\n\techo \"$res\"\n}\n\ncreate_run_dir () {\n\trun_dir=/var/run/squid3\n\tusr=`grepconf cache_effective_user proxy`\n\tgrp=`grepconf cache_effective_group proxy`\n\n\tif [ \"$(dpkg-statoverride --list $run_dir)\" = \"\" ] &&\n\t   [ ! -e $run_dir ] ; then\n\t\tmkdir -p $run_dir\n\t  \tchown $usr:$grp $run_dir\n\t\t[ -x /sbin/restorecon ] && restorecon $run_dir\n\tfi\n}\n\nstart () {\n\tcache_dir=`find_cache_dir cache_dir`\n\tcache_type=`grepconf cache_dir`\n\trun_dir=/var/run/squid3\n\tcreate_run_dir\n\n\tif test -d \"$cache_dir\" -a ! -d \"$cache_dir/00\"\n\tthen\n\t\tlog_warning_msg \"Creating $DESC cache structure\"\n\t\t$DAEMON -z -f $CONFIG\n\t\t[ -x /sbin/restorecon ] && restorecon -R $cache_dir\n\tfi\n\n\tumask 027\n\tulimit -n 65535\n\tcd $run_dir\n\tstart-stop-daemon --quiet --start \\\n\t\t--pidfile $PIDFILE \\\n\t\t--exec $DAEMON -- $SQUID_ARGS < /dev/null\n\treturn $?\n}\n\nstop () {\n\tPID=`cat $PIDFILE 2>/dev/null`\n\tstart-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON\n\tsleep 2\n\tif test -n \"$PID\" && kill -0 $PID 2>/dev/null\n\tthen\n\t\tlog_action_begin_msg \" Waiting\"\n\t\tcnt=0\n\t\twhile kill -0 $PID 2>/dev/null\n\t\tdo\n\t\t\tcnt=`expr $cnt + 1`\n\t\t\tif [ $cnt -gt 24 ]\n\t\t\tthen\n\t\t\t\tlog_action_end_msg 1\n\t\t\t\treturn 1\n\t\t\tfi\n\t\t\tsleep 5\n\t\t\tlog_action_cont_msg \"\"\n\t\tdone\n\t\tlog_action_end_msg 0\n\t\treturn 0\n\telse\n\t\treturn 0\n\tfi\n}\n\ncfg_pidfile=`grepconf pid_filename`\nif test \"${cfg_pidfile:-none}\" != \"none\" -a \"$cfg_pidfile\" != \"$PIDFILE\"\nthen\n\tlog_warning_msg \"squid.conf pid_filename overrides init script\"\n\tPIDFILE=\"$cfg_pidfile\"\nfi\n\ncase \"$1\" in\n    start)\n\tres=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o \"FATAL: .*\"`\n\tif test -n \"$res\";\n\tthen\n\t\tlog_failure_msg \"$res\"\n\t\texit 3\n\telse\n\t\tlog_daemon_msg \"Starting $DESC\" \"$NAME\"\n\t\tif start ; then\n\t\t\tlog_end_msg $?\n\t\telse\n\t\t\tlog_end_msg $?\n\t\tfi\n\tfi\n\t;;\n    stop)\n\tlog_daemon_msg \"Stopping $DESC\" \"$NAME\"\n\tif stop ; then\n\t\tlog_end_msg $?\n\telse\n\t\tlog_end_msg $?\n\tfi\n\t;;\n    reload|force-reload)\n\tres=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o \"FATAL: .*\"`\n\tif test -n \"$res\";\n\tthen\n\t\tlog_failure_msg \"$res\"\n\t\texit 3\n\telse\n\t\tlog_action_msg \"Reloading $DESC configuration files\"\n\t  \tstart-stop-daemon --stop --signal 1 \\\n\t\t\t--pidfile $PIDFILE --quiet --exec $DAEMON\n\t\tlog_action_end_msg 0\n\tfi\n\t;;\n    restart)\n\tres=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o \"FATAL: .*\"`\n\tif test -n \"$res\";\n\tthen\n\t\tlog_failure_msg \"$res\"\n\t\texit 3\n\telse\n\t\tlog_daemon_msg \"Restarting $DESC\" \"$NAME\"\n\t\tstop\n\t\tif start ; then\n\t\t\tlog_end_msg $?\n\t\telse\n\t\t\tlog_end_msg $?\n\t\tfi\n\tfi\n\t;;\n    status)\n\tstatus_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit 3\n\t;;\n    *)\n\techo \"Utilize: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}\"\n\texit 3\n\t;;\nesac\n\nexit 0\n"
  },
  {
    "path": "Install/sshd_config",
    "content": "Port 22\nProtocol 2\nKeyRegenerationInterval 3600\nServerKeyBits 1024\nSyslogFacility AUTH\nLogLevel INFO\nLoginGraceTime 120\nPermitRootLogin yes\nStrictModes yes\nRSAAuthentication yes\nPubkeyAuthentication yes\nIgnoreRhosts yes\nRhostsRSAAuthentication no\nHostbasedAuthentication no\nPermitEmptyPasswords no\nPermitTunnel yes\nChallengeResponseAuthentication no\nPasswordAuthentication yes\nX11Forwarding yes\nX11DisplayOffset 10\nPrintMotd no\nPrintLastLog yes\nTCPKeepAlive yes\n#UseLogin no\nAcceptEnv LANG LC_*\nSubsystem sftp /usr/lib/openssh/sftp-server\nUsePAM yes\n"
  },
  {
    "path": "Install/stunnel.pem",
    "content": "-----BEGIN CERTIFICATE REQUEST-----\nMIICcDCCAVgCAQIwADCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPE7\n0yix+NYRCA60guoa7MzxBLhJfLNA+FQ5V1L671a0BvqA60f6MkiyKd0KVinFP7Ox\nfDd1FdUz2kSyeKvUhL1H84zAeDOZOgkyka3/wDBvzsM5Ju25fjjU8hA8jltP+JMR\nKaTv9r0tHIPH1ymmXs6AHQoLSvTvFwIz+6sAPSGqxy8c1hzM1vsz3ArUjm90mRkE\nfHuPQMQPEwN3wpmcs0YMwOJQcYW6PXbznvYtbDGJzjSFZ9ez/yNO9RbY9N/T5CEq\ntLA/l9F/XBv3imBZwsMHEv6Ok10WxswxWU3Ij2rHvqDixE4e+lD/IpFz4IKSV0jG\nqYfIEwaMYj834MwxtbkCAwEAAaArMCkGCSqGSIb3DQEJDjEcMBowGAYDVR0RBBEw\nD4INYnIyLmpydnBzLnh5ejANBgkqhkiG9w0BAQsFAAOCAQEAfpPr7cpsIZGVrbmx\n/meRVaQgIVagOOSFzAbUcqtHZKkxOUGOpsNL4YBJaRhcLR9b8xuQ9MphbxzXqncm\npP+318P5heCtvlo2nx5wKnLD9FZmyKmadKcMMiGs9OxZH/GJ6k2BA3T5WDELVTS+\nwN9j3yXkoANpBCuIDUXRSqTl11oNcVVHeqH35zHDzZxzM2/wJSfvK8+Z75amiTAj\njC+L5mpGRysSCQOvJsFLldAl/n8ltWAEGn/SfBBqlfP8Vcjk3w2UyMpzRnalVGiZ\nde7UmIGcBhNLFiN6E8ZKahJkWvxcF8D0CVt3xE5CWrFAoharnrlGnnGx/UGTGCyK\nPcKa+A==\n-----END CERTIFICATE REQUEST-----\n-----BEGIN CERTIFICATE-----\nMIIFLzCCBBegAwIBAgISBJgB15+Qh/t+3Iou1tXmuYdcMA0GCSqGSIb3DQEBCwUA\nMDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD\nEwJSMzAeFw0yMTA4MDQyMjI5MjdaFw0yMTExMDIyMjI5MjVaMCAxHjAcBgNVBAMT\nFWJyYXNpbC0wMS5uZXh0c3NoLnh5ejCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC\nAQoCggEBAKARP0WX1UFQzoY3gCVAZKICepD4SfGM2H4rvJRGCAgGrTRq3NKHzGoK\nk+eWoakjKAjAVr5GTXNLEXENPwuW3S0kPhC890Bxetvjln/a/l4o5NuAPFacvyNE\nUfxLTlMvvghyHHg+f/Y74KdjYa/aOf0d3+4yd6FYLvHskIUiP1lV9r0o/V0uNEry\nuwnJsVjA7tOChKLqGmFsLrE+DYuCZO4G9dAqjxOBgfuTXRYCNJx1QkD2IoIRw05L\nY5ipHrVLU107XeuxnJT4GJEbT/qsKE7cs8T4j8XcsVQqu/4F1RmZ47IqOPfsUWzX\nSvT9Vu5Q4W13xDNgeVLjGUujJxuZz28CAwEAAaOCAk8wggJLMA4GA1UdDwEB/wQE\nAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIw\nADAdBgNVHQ4EFgQUIFnyEuwmiz0jNdH/T0SNRChxuygwHwYDVR0jBBgwFoAUFC6z\nF7dYVsuuUAlA5h+vnYsUwsYwVQYIKwYBBQUHAQEESTBHMCEGCCsGAQUFBzABhhVo\ndHRwOi8vcjMuby5sZW5jci5vcmcwIgYIKwYBBQUHMAKGFmh0dHA6Ly9yMy5pLmxl\nbmNyLm9yZy8wIAYDVR0RBBkwF4IVYnJhc2lsLTAxLm5leHRzc2gueHl6MEwGA1Ud\nIARFMEMwCAYGZ4EMAQIBMDcGCysGAQQBgt8TAQEBMCgwJgYIKwYBBQUHAgEWGmh0\ndHA6Ly9jcHMubGV0c2VuY3J5cHQub3JnMIIBAwYKKwYBBAHWeQIEAgSB9ASB8QDv\nAHYAb1N2rDHwMRnYmQCkURX/dxUcEdkCwQApBo2yCJo32RMAAAF7E4AZTAAABAMA\nRzBFAiA4UnUT5iXXb5SihfdvMuL7DyPHLnokKhRMxh3O/33+ZAIhAKC2R3WGRxic\nOLxvWDDptfqu0SHaL89y1wTAZjCbi+t4AHUAfT7y+I//iFVoJMLAyp5SiXkrxQ54\nCX8uapdomX4i8NcAAAF7E4AZSQAABAMARjBEAiAeah3CaKe7jUJXsB3FOE7nxvD4\nfDGk71Tx2eVth9B1QQIgC+LJHKIP3m4DLVipA+5koGs0Iva3TUc8WDcgS5EdNYkw\nDQYJKoZIhvcNAQELBQADggEBACFlqYeooJwsprV66XRWYiLCQkn/nJRBqLiyWlP5\nMY3KlGdd/7ucvAjrUqBOaRTVu5UmABa12op+Wlb5jBiOnkF2g4xqgtMa+DJ/TUzj\nxQQa5R8NQm1f3GeXSxPCxP7ohzkZRVCpyZr4s/wW3jBzjKUGKQW18ty8pFxVsfDZ\nKiWtViQMW6AcUdsRNZBBrlPYTD6OszCo0B9NaxVM1hgsSOXttTLKCmeCUKo17F97\nAEPSSFiFTP9YF/fQAEM6LotMYFrnbQTtdgxhTjxPWUeWtR9g3pNRbncqd708YZlR\nM2ertwgWFBSivfXUPR8dKBfPfLH/J7xjEo5x5NoNjx/JleY=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw\nTzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\ncmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw\nWhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg\nRW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP\nR5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx\nsxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zutm\nNHz6a4uPVymZ+DAXXbpyb/uBxa3Shlg9F8fnCbvxK/eG3MHacV3URuPMrSXBiLxg\nZ3Vms/EY96Jc5lP/Ooi2R6X/ExjqmAl3P51T+c8B5fWmcBcUr2Ok/5mzk53cU6cG\n/kiFHaFpriV1uxPMUgP17VGhi9sVAgMBAAGjggEIMIIBBDAOBgNVHQ8BAf8EBAMC\nAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMBIGA1UdEwEB/wQIMAYB\nAf8CAQAwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYfr52LFMLGMB8GA1UdIwQYMBaA\nFHm0WeZ7tuXkAXOACIjIGlj26ZtuMDIGCCsGAQUFBwEBBCYwJDAiBggrBgEFBQcw\nAoYWaHR0cDovL3gxLmkubGVuY3Iub3JnLzAnBgNVHR8EIDAeMBygGqAYhhZodHRw\nOi8veDEuYy5sZW5jci5vcmcvMCIGA1UdIAQbMBkwCAYGZ4EMAQIBMA0GCysGAQQB\ngt8TAQEBMA0GCSqGSIb3DQEBCwUAA4ICAQCFyk5HPqP3hUSFvNVneLKYY611TR6W\nPTNlclQtgaDqw+34IL9fzLdwALduO/ZelN7kIJ+m74uyA+eitRY8kc607TkC53wl\nikfmZW4/RvTZ8M6UK+5UzhK8jCdLuMGYL6KvzXGRSgi3yLgjewQtCPkIVz6D2QQz\nCkcheAmCJ8MqyJu5zlzyZMjAvnnAT45tRAxekrsu94sQ4egdRCnbWSDtY7kh+BIm\nlJNXoB1lBMEKIq4QDUOXoRgffuDghje1WrG9ML+Hbisq/yFOGwXD9RiX8F6sw6W4\navAuvDszue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2\nyJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O\nyK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids\nhCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+\nHlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv\nMldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX\nnLRbwHOoq7hHwg==\n-----END CERTIFICATE-----\n\n-----BEGIN CERTIFICATE-----\nMIIFYDCCBEigAwIBAgIQQAF3ITfU6UK47naqPGQKtzANBgkqhkiG9w0BAQsFADA/\nMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\nDkRTVCBSb290IENBIFgzMB4XDTIxMDEyMDE5MTQwM1oXDTI0MDkzMDE4MTQwM1ow\nTzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\ncmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwggIiMA0GCSqGSIb3DQEB\nAQUAA4ICDwAwggIKAoICAQCt6CRz9BQ385ueK1coHIe+3LffOJCMbjzmV6B493XC\nov71am72AE8o295ohmxEk7axY/0UEmu/H9LqMZshftEzPLpI9d1537O4/xLxIZpL\nwYqGcWlKZmZsj348cL+tKSIG8+TA5oCu4kuPt5l+lAOf00eXfJlII1PoOK5PCm+D\nLtFJV4yAdLbaL9A4jXsDcCEbdfIwPPqPrt3aY6vrFk/CjhFLfs8L6P+1dy70sntK\n4EwSJQxwjQMpoOFTJOwT2e4ZvxCzSow/iaNhUd6shweU9GNx7C7ib1uYgeGJXDR5\nbHbvO5BieebbpJovJsXQEOEO3tkQjhb7t/eo98flAgeYjzYIlefiN5YNNnWe+w5y\nsR2bvAP5SQXYgd0FtCrWQemsAXaVCg/Y39W9Eh81LygXbNKYwagJZHduRze6zqxZ\nXmidf3LWicUGQSk+WT7dJvUkyRGnWqNMQB9GoZm1pzpRboY7nn1ypxIFeFntPlF4\nFQsDj43QLwWyPntKHEtzBRL8xurgUBN8Q5N0s8p0544fAQjQMNRbcTa0B7rBMDBc\nSLeCO5imfWCKoqMpgsy6vYMEG6KDA0Gh1gXxG8K28Kh8hjtGqEgqiNx2mna/H2ql\nPRmP6zjzZN7IKw0KKP/32+IVQtQi0Cdd4Xn+GOdwiK1O5tmLOsbdJ1Fu/7xk9TND\nTwIDAQABo4IBRjCCAUIwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw\nSwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5pZGVudHJ1\nc3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTEp7Gkeyxx\n+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEEAYLfEwEB\nATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2VuY3J5cHQu\nb3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0LmNvbS9E\nU1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFHm0WeZ7tuXkAXOACIjIGlj26Ztu\nMA0GCSqGSIb3DQEBCwUAA4IBAQAKcwBslm7/DlLQrt2M51oGrS+o44+/yQoDFVDC\n5WxCu2+b9LRPwkSICHXM6webFGJueN7sJ7o5XPWioW5WlHAQU7G75K/QosMrAdSW\n9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuG\nWCLKTVXkcGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9O\nhe8Y4IWS6wY7bCkjCWDcRQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFC\nDfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5\n-----END CERTIFICATE-----\n-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCgET9Fl9VBUM6G\nN4AlQGSiAnqQ+EnxjNh+K7yURggIBq00atzSh8xqCpPnlqGpIygIwFa+Rk1zSxFx\nDT8Llt0tJD4QvPdAcXrb45Z/2v5eKOTbgDxWnL8jRFH8S05TL74Ichx4Pn/2O+Cn\nY2Gv2jn9Hd/uMnehWC7x7JCFIj9ZVfa9KP1dLjRK8rsJybFYwO7TgoSi6hphbC6x\nPg2LgmTuBvXQKo8TgYH7k10WAjScdUJA9iKCEcNOS2OYqR61S1NdO13rsZyU+BiR\nG0/6rChO3LPE+I/F3LFUKrv+BdUZmeOyKjj37FFs10r0/VbuUOFtd8QzYHlS4xlL\noycbmc9vAgMBAAECggEADvjOBEJpbgyS5Lb4Q4O8ZfL5Z+nxcKiN729D2lKambWW\nKdr9AKw3EIwgvX63bEyfiAIFmxKUV/5jiUGF7h2UXo6PR52FOv/iUAL/psHjHQeS\nMH3UJv3OWwwe5wxcLSfADKYvx4eBDJUZNE71ai9tUSGkOnF6AxtueK557hn/9ukP\nnX2VmcmYRvLLw9e73Z82kdD8C+lxD+gOMV23/XwZBlIwNpUp0JI45WhgYWIXUF3e\nTIcr50AHrgFE/1V4IdKe7mWJUnAhUqz9QyF55MYpIec62Nvyb9wS+k21hjvgrj/G\nXckkkBmPJQoBQRrj5t+4suFADlx0MysQ8r3eNQjDcQKBgQDTeaUAZA0alGzAv15o\nX803ckFVoxDnu45ni7Xqf+rKDWV7243ZYeOapgcJ5zi0OCOPlhcUFO8XC+SaSO64\nkFseOyRfVm53B5xc724qBHe7zTmmIBdw7n79K9N+gSVgxp+4AYCDz9n3aYufvRuO\n/zx8Xf3ts9nsHxS44QtJpxzgzQKBgQDBxMKV2QGb/LjQVcyaLzKEo1cn8iwDO9QA\nYmyZ2WQMs+UbtWkot4uiW+0jQA6L5iYngCEbBVF9ptdAOVME3mmz9o3xo1EwSwcK\n4/abN++FT2yQhZu94N3LRyHgMbr/Yr6CUo1g6aymvwI9QTsGliSIXaf8xKlw51RC\nm0Dgl1xBKwKBgAYKY3wvX3By7OhUjw3MLsB2swcPMVxtLxQmGXwpSzuaRlvTWanr\n8eRo+ap+wE/lip5/Wwlnz6yI2m7NxoPfG7sxVUij32PnA8Bj1nG8zu6+Xfcw03qW\nVWpF5jSm27p38ff/kvww47j9es+FR1Q+Viv3Q1mW2ZK1EJJ3WysvatPBAoGBAK4X\nnESJ3ppJq7ry+4skEJ1/LBVlzglxvX5C8BQib3PCRXxpt3uvvTM4qIzdRrSHKYyf\n4B6o3pioSAkZ9+8N7aaVRN7vv0hGgKNWQgEfdoIt4/rNMCqfWGcFF/iYdcxy6Xup\ntAB4snh2cQqcCu5WA6jJjN7byuj3zoqxds7S7z5VAoGBAJHk6hs20mb01Oz29orS\naTfeEpOTagPpj+hk92+2FNq+MOs7ph4l4o0ADKRh4DjFPTm6bOGT9Z9TlcvQWKXL\nD7fw+cASvEZpPte1sAHfa4lJ8TwLhSdpliYC9U5SCGhdnpwb8kzhyciKhxiD9ukv\nG5lPlY/W1LzY6Mu2uatNhByF\n-----END PRIVATE KEY-----\n"
  },
  {
    "path": "Install/tcptweaker.sh",
    "content": "#!/bin/bash\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%35s%s%-20s\\n' \"TCP Tweaker 1.0\" ; tput sgr0\nif [[ `grep -c \"^#PH56\" /etc/sysctl.conf` -eq 1 ]]\nthen\n\techo \"\"\n\techo \"TCP Tweaker network settings have already been added to the system!\"\n\techo \"\"\n\tread -p \"Do you want to remove TCP Tweaker settings? [s/n]: \" -e -i n resposta0\n\tif [[ \"$resposta0\" = 's' ]]; then\n\t\tgrep -v \"^#PH56\nnet.ipv4.tcp_window_scaling = 1\nnet.core.rmem_max = 16777216\nnet.core.wmem_max = 16777216\nnet.ipv4.tcp_rmem = 4096 87380 16777216\nnet.ipv4.tcp_wmem = 4096 16384 16777216\nnet.ipv4.tcp_low_latency = 1\nnet.ipv4.tcp_slow_start_after_idle = 0\" /etc/sysctl.conf > /tmp/syscl && mv /tmp/syscl /etc/sysctl.conf\nsysctl -p /etc/sysctl.conf > /dev/null\n\t\techo \"\"\n\t\techo \"TCP Tweaker network settings were successfully removed.\"\n\t\techo \"\"\n\texit\n\telse \n\t\techo \"\"\n\t\texit\n\tfi\nelse\n\techo \"\"\n\techo \"This is an experimental script. Use at your own risk!\"\n\techo \"This script will change some network settings\"\n\techo \"to reduce latency and improve speed.\"\n\techo \"\"\n\tread -p \"Proceed with installation? [s/n]: \" -e -i n resposta\n\tif [[ \"$resposta\" = 's' ]]; then\n\techo \"\"\n\techo \"Modifying the following settings:\"\n\techo \" \" >> /etc/sysctl.conf\n\techo \"#PH56\" >> /etc/sysctl.conf\necho \"net.ipv4.tcp_window_scaling = 1\nnet.core.rmem_max = 16777216\nnet.core.wmem_max = 16777216\nnet.ipv4.tcp_rmem = 4096 87380 16777216\nnet.ipv4.tcp_wmem = 4096 16384 16777216\nnet.ipv4.tcp_low_latency = 1\nnet.ipv4.tcp_slow_start_after_idle = 0\" >> /etc/sysctl.conf\necho \"\"\nsysctl -p /etc/sysctl.conf\n\t\techo \"\"\n\t\techo \"TCP Tweaker network settings have been added successfully.\"\n\t\techo \"\"\n\telse\n\t\techo \"\"\n\t\techo \"Installation was canceled by the user!\"\n\t\techo \"\"\n\tfi\nfi\nexit\n"
  },
  {
    "path": "Install/versao",
    "content": "VERSION: 01\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "Modulos/addhost",
    "content": "#!/bin/bash\nif [ -d \"/etc/squid/\" ]; then\n    payload=\"/etc/squid/payload.txt\"\nelif [ -d \"/etc/squid3/\" ]; then\n\tpayload=\"/etc/squid3/payload.txt\"\nfi\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%35s%s%-10s\\n' \"Add Host to Squid Proxy\" ; tput sgr0\nif [ ! -f \"$payload\" ]\nthen\n\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"File $payload Not Found\" ; tput sgr0\n\texit 1\nelse\n\ttput setaf 2 ; tput bold ; echo \"\"; echo \"Current domains in file $payload:\" ; tput sgr0\n\ttput setaf 3 ; tput bold ; echo \"\" ; cat $payload ; echo \"\" ; tput sgr0\n\tread -p \"Enter the domain you want to add to the list: \" host\n\tif [[ -z $host ]]\n\tthen\n\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"You have entered an empty or non-existent domain!\" ; echo \"\" ; tput sgr0\n\t\texit 1\n\telse\n\t\tif [[ `grep -c \"^$host\" $payload` -eq 1 ]]\n\t\tthen\n\t\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"the domain $host already exists in the file $payload\" ; echo \"\" ; tput sgr0\n\t\t\texit 1\n\t\telse\n\t\t\tif [[ $host != \\.* ]]\n\t\t\tthen\n\t\t\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"You must add a domain by starting it with a dot!\" ; echo \"For example: .phreaker56.xyz\" ; echo \"It is not necessary to add subdomains for domains that are already in the file.\" ; echo \"In other words, it is not necessary to add recargawap .claro .com .br\" ; echo \"if the domain .claro .com .br is already in the file.\" ; echo \"\"; tput sgr0\n\t\t\t\texit 1\n\t\t\telse\n\t\t\t\techo \"$host\" >> $payload && grep -v \"^$\" $payload > /tmp/a && mv /tmp/a $payload\n\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"File $payload updated, the domain was successfully added.:\" ; tput sgr0\n\t\t\t\ttput setaf 3 ; tput bold ; echo \"\" ; cat $payload ; echo \"\" ; tput sgr0\n\t\t\t\tif [ ! -f \"/etc/init.d/squid3\" ]\n\t\t\t\tthen\n\t\t\t\t\tservice squid3 reload\n\t\t\t\telif [ ! -f \"/etc/init.d/squid\" ]\n\t\t\t\tthen\n\t\t\t\t\tservice squid reload\n\t\t\t\tfi\t\n\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"Proxy,Squid Proxy reloaded successfully! ◇ Proxy,Squid Proxy සාර්ථකව නැවත පූරණය කරන ලදී!\" ; echo \"\" ; tput sgr0\n\t\t\t\texit 1\n\t\t\tfi\n\t\tfi\n\tfi\nfi\n"
  },
  {
    "path": "Modulos/ajuda",
    "content": "#!/bin/bash\nclear\necho -e \"                              \\033[1;31mByㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ\\033[1;36m\"\necho \"   ㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ\" | figlet\necho -e \"\\033[1;32m      MENU INFORMATION AND OPTIONS \\033[0m\\n\\n\"\necho -e \" \\033[1;37m[\\033[1;31m01\\033[1;37m] - \\033[1;33m Create ssh user\"\necho -e \" \\033[1;37m[\\033[1;31m02\\033[1;37m] - \\033[1;33m Create test ssh user\"\necho -e \" \\033[1;37m[\\033[1;31m03\\033[1;37m] - \\033[1;33m Remove ssh user\"\necho -e \" \\033[1;37m[\\033[1;31m04\\033[1;37m] - \\033[1;33m Monitor ssh and dropbear users\"\necho -e \" \\033[1;37m[\\033[1;31m05\\033[1;37m] - \\033[1;33m Change ssh user date\"\necho -e \" \\033[1;37m[\\033[1;31m06\\033[1;37m] - \\033[1;33m Change limit for connections\"\necho -e \" \\033[1;37m[\\033[1;31m07\\033[1;37m] - \\033[1;33m Change ssh user password\"\necho -e \" \\033[1;37m[\\033[1;31m08\\033[1;37m] - \\033[1;33m Remove all expired users\"\necho -e \" \\033[1;37m[\\033[1;31m09\\033[1;37m] - \\033[1;33m Activate the connection limiter\"\necho -e \" \\033[1;37m[\\033[1;31m10\\033[1;37m] - \\033[1;33m connection mode. squid, dropbear, etc.  \\033[1;32mNEW\"\necho -e \" \\033[1;37m[\\033[1;31m11\\033[1;37m] - \\033[1;33m Performs server speed test \\033[1;32mNEW\"\necho -e \" \\033[1;37m[\\033[1;31m12\\033[1;37m] - \\033[1;33m Set a banner for vps\"\necho -e \" \\033[1;37m[\\033[1;31m13\\033[1;37m] - \\033[1;33m Displays the traffic consumed\"\necho -e \" \\033[1;37m[\\033[1;31m14\\033[1;37m] - \\033[1;33m Performs cleaning and error repairs \\033[1;32mNEW\"\necho -e \" \\033[1;37m[\\033[1;31m15\\033[1;37m] - \\033[1;33m Install OpenVPN \"\necho -e \" \\033[1;37m[\\033[1;31m16\\033[1;37m] - \\033[1;33m Create users backup\"\necho -e \" \\033[1;37m[\\033[1;31m17\\033[1;37m] - \\033[1;33m Install Bad Udp for VoIP calls\"\necho -e \" \\033[1;37m[\\033[1;31m18\\033[1;37m] - \\033[1;33m Improves latency 'Experimental'\"\necho -e \" \\033[1;37m[\\033[1;31m19\\033[1;37m] - \\033[1;33m Display the second Menu\"\necho -e \" \\033[1;37m[\\033[1;31m20\\033[1;37m] - \\033[1;33m Add host on vps for squid connection\"\necho -e \" \\033[1;37m[\\033[1;31m21\\033[1;37m] - \\033[1;33m Remove host from vps \"\necho -e \" \\033[1;37m[\\033[1;31m22\\033[1;37m] - \\033[1;33m restart system\"\necho -e \" \\033[1;37m[\\033[1;31m23\\033[1;37m] - \\033[1;33m Restart services 'squid' 'dropbear' and etc.\"\necho -e \" \\033[1;37m[\\033[1;31m24\\033[1;37m] - \\033[1;33m Option to manage vps by telegram \\033[1;32mNEW\"\necho -e \" \\033[1;37m[\\033[1;31m25\\033[1;37m] - \\033[1;33m Displays vps information\"\necho -e \" \\033[1;37m[\\033[1;31m26\\033[1;37m] - \\033[1;33m Change vps password\"\necho -e \" \\033[1;37m[\\033[1;31m27\\033[1;37m] - \\033[1;33m Update theㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤscript\"\necho -e \" \\033[1;37m[\\033[1;31m28\\033[1;37m] - \\033[1;33m Remove theㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤscript\"\necho -e \" \\033[1;37m[\\033[1;31m29\\033[1;37m] - \\033[1;33m Display information about the script\"\necho -e \" \\033[1;37m[\\033[1;31m30\\033[1;37m] - \\033[1;33m Return to previous menu\\033[0m\"\n"
  },
  {
    "path": "Modulos/alterarlimite",
    "content": "#!/bin/bash\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%20s%s\\n' \"ㅤ🐉ㅤChange limit on simultaneous connectionsㅤ🐉ㅤ\" ; tput sgr0\ndatabase=\"/root/usuarios.db\"\nif [ ! -f \"$database\" ]; then\n\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"File $database not found!\" ; echo \"\" ; tput sgr0\n\texit 1\nelse\n\ttput setaf 3 ; tput bold ; echo \"\"; echo \"◇ LIST OF USERS AND THEIR LIMITS:\" ; tput sgr0\n\techo \"\"\n\t_userT=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody)\n\ti=0\n\tunset _userPass\n\twhile read _user; do\n\t\ti=$(expr $i + 1)\n\t\t_oP=$i\n\t\t[[ $i == [1-9] ]] && i=0$i && oP+=\" 0$i\"\n\t\tif [[ \"$(grep -wc \"$_user\" $database)\" != \"0\" ]]; then\n\t\t\tlimit=$(grep -w \"$_user\" $database |cut -d' ' -f2)\n\t\telse\n\t\t\tlimit='1'\n\t\tfi\n\t\tl_user=$(echo -e \"\\033[1;31m[\\033[1;36m$i\\033[1;31m] \\033[1;37m- \\033[1;32m$_user\\033[0m\")\n        lim=$(echo -e \"\\033[1;33m◇ㅤLimit\\033[1;37m: $limit\")\n        printf '%-65s%s\\n' \"$l_user\" \"$lim\"\n\t\t_userPass+=\"\\n${_oP}:${_user}\"\n\tdone <<< \"${_userT}\"\n\techo \"\"\n\tnum_user=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\n\techo -ne \"\\033[1;32m◇ Enter or select a user \\033[1;33m[\\033[1;36m1\\033[1;31m-\\033[1;36m$num_user\\033[1;33m]\\033[1;37m: \" ; read option\n\tusuario=$(echo -e \"${_userPass}\" | grep -E \"\\b$option\\b\" | cut -d: -f2)\n    if [[ -z $option ]]; then\n        tput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"◇ Empty or non-existent user\" ; echo \"\" ; tput sgr0\n\t\texit\n\telif [[ -z $usuario ]]; then\n\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"◇ Empty or non-existent user\" ; echo \"\" ; tput sgr0\n\t\texit 1\n\telse\n\t\tif cat /etc/passwd |grep -w $usuario > /dev/null; then\n\t\t\techo -ne \"\\n\\033[1;32m◇ New limit for the user \\033[1;33m$usuario\\033[1;37m: \"; read sshnum\n\t\t\tif [[ -z $sshnum ]]\n\t\t\tthen\n\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"◇ You entered an invalid number!\" ; echo \"\" ; tput sgr0\n\t\t\t\texit 1\n\t\t\telse\n\t\t\t\tif (echo $sshnum | egrep [^0-9] &> /dev/null)\n\t\t\t\tthen\n\t\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"◇ You entered an invalid number!\" ; echo \"\" ; tput sgr0\n\t\t\t\t\texit 1\n\t\t\t\telse\n\t\t\t\t\tif [[ $sshnum -lt 1 ]]\n\t\t\t\t\tthen\n\t\t\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"◇ You must enter a number greater than zero!\" ; echo \"\" ; tput sgr0\n\t\t\t\t\t\texit 1\n\t\t\t\t\telse\n\t\t\t\t\t\tgrep -v ^$usuario[[:space:]] /root/usuarios.db > /tmp/a\n\t\t\t\t\t\tsleep 1\n\t\t\t\t\t\tmv /tmp/a /root/usuarios.db\n\t\t\t\t\t\techo $usuario $sshnum >> /root/usuarios.db\n\t\t\t\t\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"◇ Limit applied to the user $usuario foi $sshnum \" ; tput sgr0\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\texit\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\t\t\t\n\t\telse\n\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"◇ The user $usuario was not found\" ; echo \"\" ; tput sgr0\n\t\t\texit 1\n\t\tfi\n\tfi\nfi\n"
  },
  {
    "path": "Modulos/alterarsenha",
    "content": "#!/bin/bash\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%35s%s%-10s\\n' \"🐉ㅤChange User Passwordㅤ🐉\" ; tput sgr0\necho \"\"\necho -e \"\\033[1;33mLIST OF USERS AND THEIR PASSWORDS: \\033[0m\"\necho\"\"\n_userT=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody)\ni=0\nunset _userPass\nwhile read _user; do\n\ti=$(expr $i + 1)\n\t_oP=$i\n\t[[ $i == [1-9] ]] && i=0$i && oP+=\" 0$i\"\n\tif [[ -e \"/etc/VPSManager/senha/$_user\" ]]; then\n\t\t_senha=\"$(cat /etc/VPSManager/senha/$_user)\"\n\telse\n\t\t_senha='Null'\n\tfi\n\tsuser=$(echo -e \"\\033[1;31m[\\033[1;36m$i\\033[1;31m] \\033[1;37m- \\033[1;32m$_user\\033[0m\")\n    ssenha=$(echo -e \"\\033[1;33mPassword\\033[1;37m: $_senha\")\n    printf '%-60s%s\\n' \"$suser\" \"$ssenha\"\n\t_userPass+=\"\\n${_oP}:${_user}\"\ndone <<< \"${_userT}\"\nnum_user=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\necho \"\"\necho -ne \"\\033[1;32mEnter or select a user \\033[1;33m[\\033[1;36m1\\033[1;31m-\\033[1;36m$num_user\\033[1;33m]\\033[1;37m: \" ; read option\nuser=$(echo -e \"${_userPass}\" | grep -E \"\\b$option\\b\" | cut -d: -f2)\nif [[ -z $option ]]\nthen\n\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"Empty or invalid field!\" ; echo \"\" ; tput sgr0\n\texit 1\nelif [[ -z $user ]]\nthen\n\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"You entered an empty or invalid name!\" ; echo \"\" ; tput sgr0\n\texit 1\nelse\n\tif [[ `grep -c /$user: /etc/passwd` -ne 0 ]]\n\tthen\n\t\techo -ne \"\\n\\033[1;32mNew password for user \\033[1;33m$user\\033[1;37m: \"; read password\n\t\tsizepass=$(echo ${#password})\n\t\tif [[ $sizepass -lt 4 ]]\n\t\tthen\n\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"Empty or invalid password! use at least 4 characters\" ; echo \"\" ; tput sgr0\n\t\t\texit 1\n\t\telse\n\t\t\tps x | grep $user | grep -v grep | grep -v pt > /tmp/rem\n\t\t\tif [[ `grep -c $user /tmp/rem` -eq 0 ]]\n\t\t\tthen\n\t\t\t\techo \"$user:$password\" | chpasswd\n\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"User password $user has been changed to: $password\" ; echo \"\" ; tput sgr0\n\t\t\t\techo \"$password\" > /etc/VPSManager/senha/$user\n\t\t\t\texit 1\n\t\t\telse\n\t\t\t\techo \"\"\n\t\t\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"User logged in. Disconnecting...\" ; tput sgr0\n\t\t\t\tpkill -f $user\n\t\t\t\techo \"$user:$password\" | chpasswd\n\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"User password $user has been changed to: $password\" ; echo \"\" ; tput sgr0\n\t\t\t\techo \"$password\" > /etc/VPSManager/senha/$user\n\t\t\t\texit 1\n\t\t\tfi\n\t\tfi\n\telse\n\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"The user $user does not exist!\" ; echo \"\" ; tput sgr0\n\tfi\nfi\n"
  },
  {
    "path": "Modulos/attscript",
    "content": "#!/bin/bash\n\nclear\n\nfun_bar () {\n\ncomando[0]=\"$1\"\n\ncomando[1]=\"$2\"\n\n (\n\n[[ -e $HOME/fim ]] && rm $HOME/fim\n\n${comando[0]} > /dev/null 2>&1\n\n${comando[1]} > /dev/null 2>&1\n\ntouch $HOME/fim\n\n ) > /dev/null 2>&1 &\n\n tput civis\n\necho -ne \"   \\033[1;33mPLEASE WAIT ... \\033[1;37m- \\033[1;33m[\"\n\nwhile true; do\n\n   for((i=0; i<18; i++)); do\n\n   echo -ne \"\\033[1;31m#\"\n\n   sleep 0.1s\n\n   done\n\n   [[ -e $HOME/fim ]] && rm $HOME/fim && break\n\n   echo -e \"\\033[1;33m]\"\n\n   sleep 1s\n\n   tput cuu1\n\n   tput dl1\n\n   echo -ne \"   \\033[1;33mPLEASE WAIT ... \\033[1;37m- \\033[1;33m[\"\n\ndone\n\necho -e \"\\033[1;33m]\\033[1;37m -\\033[1;32m OK !\\033[1;37m\"\n\ntput cnorm\n\n}\n\necho \" \"\n\nfun_atts () {\n\n  [[ -e /home/versao ]] && rm /home/versao\n\n  [[ -e /tmp/att ]] && rm /tmp/att\n\n\twget -c -P /home https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Sistema/versao\n\n\t[[ -f \"/home/versao\" ]] && mv /home/versao /tmp/att\n\n\t[[ ! -e /bin/versao ]] && rm -rf /bin/menu\n\n} > /dev/null 2>&1\n\necho -e \"ㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ\" | figlet\n\necho \" \"\n\necho -e \"   \\033[1;32m◇ CHECKING FOR AVAILABLE UPDATES\\033[0m\\n\"\n\nfun_bar 'fun_atts'\n\n[[ ! -f \"/tmp/att\" ]] && {\n\n\techo -e \"\\n\\033[1;31m◇ ERROR CONNECTING TO SERVER\\n\"\n\n\techo -ne \"\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n\n\tmenu\n\n}\n\necho \" \"\n\nvrs1=$(sed -n '1 p' /bin/versao| sed -e 's/[^0-9]//ig')\n\nvrs2=$(sed -n '1 p' /tmp/att | sed -e 's/[^0-9]//ig')\n\n[[ \"$vrs1\" == \"$vrs2\" ]] && {\n\n  echo -e \" \\033[1;36m   ◇ THE SCRIPT IS NOW UPDATED!\\033[1;32m\\n\"\n\n  rm /tmp/att > /dev/null 2>&1\n\n  echo -ne \" \\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n\n  menu\n\n} || {\n\n  echo -e \"  \\033[1;36m◇ THERE IS A NEW UPDATE AVAILABLE!\\033[1;33m\\n\"\n\n  echo -e \"  \\033[1;32m◇ UPDATE DETAILS:\\033[0m\\n\"\n\n  while read linha; do\n\n    echo -e \"  \\033[1;37m- \\033[1;33m$linha\"\n\n  done < \"/tmp/att\"\n\n  echo \" \"\n\n  echo -ne \"  \\033[1;32m◇ WISH TO UPDATE \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"; read res\n\n  if [[ \"$res\" = s || \"$res\" = S ]];then\n\n    echo -e \"\\n\\033[1;32m◇ STARTING UPDATE...\"\n\n    sleep 3\n\n    wget https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/hehe > /dev/null 2>&1\n\n    chmod +x hehe\n\n    ./hehe\n\n    clear\n\n    echo -e \"\\033[1;32m◇ SUCCESSFULLY UPDATED SCRIPT\\033[0m\\n\"\n\n    rm /tmp/att > /dev/null 2>&1\n\n    echo -ne \"\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n\n    menu\n\n  else\n\n    menu\n\n  fi\n\n}\n\n"
  },
  {
    "path": "Modulos/badvpn",
    "content": "#!/bin/bash\nfun_badvpn() {\n    clear\n    echo -e \"\\E[44;1;37m        ㅤ🐉ㅤBADVPN MANAGERㅤ🐉ㅤ         \\E[0m\"\n    echo \"\"\n    if ps x | grep -w udpvpn | grep -v grep 1>/dev/null 2>/dev/null; then\n        echo -e \"\\033[1;33m◇ PORTS\\033[1;37m: \\033[1;32m$(netstat -nplt | grep 'badvpn-ud' | awk {'print $4'} | cut -d: -f2 | xargs)\"\n    else\n        sleep 0.1\n    fi\n    var_sks1=$(ps x | grep \"udpvpn\"|grep -v grep > /dev/null && echo -e \"\\033[1;32m♦ \" || echo -e \"\\033[1;31m○ \")\n    echo \"\"\n    echo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mACTIVATE BADVPN(Port 7300) $var_sks1 \\033[0m\"\n    echo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mOPEN THE PORT\\033[0m\"\n    echo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[0m\"\n    echo \"\"\n    echo -ne \"\\033[1;32m◇ WHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;37m \"\n    read resposta\n    if [[ \"$resposta\" = '1' ]]; then\n        if ps x | grep -w udpvpn | grep -v grep 1>/dev/null 2>/dev/null; then\n            clear\n            echo -e \"\\E[41;1;37m             BADVPN              \\E[0m\"\n            echo \"\"\n            fun_stopbad () {\n                sleep 1\n                for pidudpvpn in $(screen -ls | grep \".udpvpn\" | awk {'print $1'}); do\n                    screen -r -S \"$pidudpvpn\" -X quit\n\t\t\t\tdone\n                [[ $(grep -wc \"udpvpn\" /etc/autostart) != '0' ]] && {\n                    sed -i '/udpvpn/d' /etc/autostart\n                }\n                sleep 1\n                screen -wipe >/dev/null\n            }\n            echo -e \"\\033[1;32m◇ DISABLING BADVPN\\033[1;33m\"\n            echo \"\"\n            fun_stopbad\n            echo \"\"\n            echo -e \"\\033[1;32m◇ BADVPN SUCCESSFULLY DISABLED!\\033[1;33m\"\n            sleep 3\n            fun_badvpn\n        else\n            clear\n            echo -e \"\\033[1;32m◇ STARTING BADVPN... \\033[0m\\n\"\n            fun_udpon () {\n                screen -dmS udpvpn /bin/badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 10000 --max-connections-for-client 8\n                [[ $(grep -wc \"udpvpn\" /etc/autostart) = '0' ]] && {\n                    echo -e \"ps x | grep 'udpvpn' | grep -v 'grep' || screen -dmS udpvpn /bin/badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 10000 --max-connections-for-client 8 --client-socket-sndbuf 10000\" >> /etc/autostart\n                } || {\n                    sed -i '/udpvpn/d' /etc/autostart\n                    echo -e \"ps x | grep 'udpvpn' | grep -v 'grep' || screen -dmS udpvpn /bin/badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 10000 --max-connections-for-client 8 --client-socket-sndbuf 10000\" >> /etc/autostart\n                }\n                sleep 1\n            }\n            inst_udp () {\n                [[ -e \"/bin/badvpn-udpgw\" ]] && {\n                    sleep 0.1\n                } || {\n                    cd $HOME\n                    wget https://github.com/januda-ui/DRAGON-VPS-MANAGER/raw/main/Modulos/badvpn-udpgw -o /dev/null\n                    mv -f $HOME/badvpn-udpgw /bin/badvpn-udpgw\n                    chmod 777 /bin/badvpn-udpgw\n                }\n            }\n            echo \"\"\n            inst_udp\n            fun_udpon\n            echo \"\"\n            echo -e \"\\033[1;32m◇ SUCCESSFULLY ACTIVATED BADVPN\\033[1;33m\"\n            sleep 3\n            fun_badvpn\n        fi\n    elif [[ \"$resposta\" = '2' ]]; then\n        if ps x | grep -w udpvpn | grep -v grep 1>/dev/null 2>/dev/null; then\n            clear\n            echo -e \"\\E[44;1;37m            BADVPN             \\E[0m\"\n            echo \"\"\n            echo -ne \"\\033[1;32m◇ WHICH PORT YOU WANT TO USE \\033[1;33m?\\033[1;37m: \"\n            read porta\n            [[ -z \"$porta\" ]] && {\n                echo \"\"\n                echo -e \"\\033[1;31m◇ Invalid port!\"\n                sleep 2\n                clear\n                menu\n            }\n            echo \"\"\n            echo -e \"\\033[1;32m◇ STARTING BADVPN AT THE PORT \\033[1;31m$porta\\033[1;33m\"\n            echo \"\"\n            fun_abrirptbad() {\n                sleep 1\n                screen -dmS udpvpn /bin/badvpn-udpgw --listen-addr 127.0.0.1:$porta --max-clients 10000 --max-connections-for-client 8\n                sleep 1\n            }\n            fun_abrirptbad\n            echo \"\"\n            echo -e \"\\033[1;32m◇ SUCCESSFULLY ACTIVATED BADVPN\\033[1;33m\"\n            sleep 2\n            fun_badvpn\n        else\n            clear\n            echo -e \"\\033[1;31m◇ UNAVAILABLE FUNCTION\\n\\n\\033[1;33mACTIVATE BADVPN FIRST!\\033[1;33m\"\n            sleep 2\n            fun_badvpn\n        fi\n    elif [[ \"$resposta\" = '0' ]]; then\n        echo \"\"\n        echo -e \"\\033[1;31m◇ Returning...\\033[0m\"\n        sleep 1\n        menu\n    else\n        echo \"\"\n        echo -e \"\\033[1;31m◇ Invalid option!\\033[0m\"\n        sleep 1\n        fun_badvpn\n    fi\n}\nfun_badvpn\n"
  },
  {
    "path": "Modulos/banner",
    "content": "#!/bin/bash\nclear\nchk=$(cat /etc/ssh/sshd_config | grep Banner)\n[[ $(netstat -nltp|grep 'dropbear' | wc -l) != '0' ]] && {\n    local=\"/etc/bannerssh\"\n\t[[ $(grep -wc $local /etc/default/dropbear) = '0' ]] && echo 'DROPBEAR_BANNER=\"/etc/bannerssh\"' >>  /etc/default/dropbear\n}\n[[ \"$(echo \"$chk\" | grep -v '#Banner' | grep Banner)\" != \"\" ]] && {\n\tlocal=$(echo \"$chk\" |grep -v \"#Banner\" | grep Banner | awk '{print $2}')\n} || {\n    local=\"/etc/bannerssh\"\n    [[ $(grep -wc $local /etc/ssh/sshd_config) = '0' ]] && echo \"Banner /etc/bannerssh\" >> /etc/ssh/sshd_config\n}\necho -e \"\\E[44;1;37m     ㅤ🐉ㅤBANNER MANAGERㅤ🐉ㅤ        \\E[0m\"\necho \"\"\necho -e \"\\033[1;32m◇───MANUAL BANNER ADDING METHOD───◇\"\necho -e \"\\033[1;37m◇ Step 1:- Press CTRL+C and sendㅤ👇ㅤ\"\necho -e \"\\033[1;31msudo nano /etc/bannerssh\"\necho -e \"\\033[1;37m◇ PASTE YOUR BANNER AS A HTML TEXT\"\necho -e \"\\033[1;37m◇ Step 2:- Press CTRL+O enter CTRL+X\"\necho \"\"\necho -e \"\\033[1;32m Or\"\necho \"\"\necho -e \"\\033[1;32m◇───EASY BANNER ADDING METHOD───◇\"\necho -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m]\\033[1;37m • \\033[1;33mADD BANNER\"\necho -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m]\\033[1;37m • \\033[1;33mREMOVE BANNER\"\necho -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m]\\033[1;37m • \\033[1;33mCOME BACK\"\necho \"\"\n\necho -ne \"\\033[1;32m◇ WHAT DO YOU WANT TO DO\\033[1;31m ?\\033[1;37m : \"; read resp\nif [[ \"$resp\" = \"1\" ]]; then\necho \"\"\necho -ne \"\\033[1;32m◇ WHICH MESSAGE DO YOU WANT TO DISPLAY\\033[1;31m ?\\033[1;37m : \"; read msg1\nif [[ -z \"$msg1\" ]]; then\n\techo -e \"\\n\\033[1;31m◇ Empty or invalid field!\\033[0m\"\n\tsleep 2\n\tbanner\nfi\necho -e \"\\n\\033[1;31m[\\033[1;36m01\\033[1;31m]\\033[1;33m SMALL FONT SIZE\"\necho -e \"\\033[1;31m[\\033[1;36m02\\033[1;31m]\\033[1;33m AVERAGE FONT SIZE\"\necho -e \"\\033[1;31m[\\033[1;36m03\\033[1;31m]\\033[1;33m LARGE FONT SIZE\"\necho -e \"\\033[1;31m[\\033[1;36m04\\033[1;31m]\\033[1;33m GIANT FONT SIZE\"\necho \"\"\necho -ne \"\\033[1;32m◇ WHAT IS THE FONT SIZE\\033[1;31m ?\\033[1;37m : \"; read opc\nif [[ \"$opc\" = \"1\" ]] || [[ \"$opc\" = \"01\" ]]; then\n_size='6'\nelif [[ \"$opc\" = \"2\" ]] || [[ \"$opc\" = \"02\" ]]; then\n_size='4'\nelif [[ \"$opc\" = \"3\" ]] || [[ \"$opc\" = \"03\" ]]; then\n_size='3'\nelif [[ \"$opc\" = \"4\" ]] || [[ \"$opc\" = \"04\" ]]; then\n_size='1'\nfi\n\necho -e \"\\n\\033[1;31m[\\033[1;36m01\\033[1;31m]\\033[1;33m BLUE\"\necho -e \"\\033[1;31m[\\033[1;36m02\\033[1;31m]\\033[1;33m GREEN\"\necho -e \"\\033[1;31m[\\033[1;36m03\\033[1;31m]\\033[1;33m RED\"\necho -e \"\\033[1;31m[\\033[1;36m04\\033[1;31m]\\033[1;33m YELLOW\"\necho -e \"\\033[1;31m[\\033[1;36m05\\033[1;31m]\\033[1;33m PINK\"\necho -e \"\\033[1;31m[\\033[1;36m06\\033[1;31m]\\033[1;33m CYAN\"\necho -e \"\\033[1;31m[\\033[1;36m07\\033[1;31m]\\033[1;33m ORANGE\"\necho -e \"\\033[1;31m[\\033[1;36m08\\033[1;31m]\\033[1;33m PURPLE\"\necho -e \"\\033[1;31m[\\033[1;36m09\\033[1;31m]\\033[1;33m BLACK\"\necho -e \"\\033[1;31m[\\033[1;36m10\\033[1;31m]\\033[1;33m NO COLOR\"\necho \"\"\necho -ne \"\\033[1;32m◇ WHAT'S THE COLOR\\033[1;31m ?\\033[1;37m : \"; read ban_cor\nif [[ \"$ban_cor\" = \"1\" ]] || [[ \"$ban_cor\" = \"01\" ]]; then\necho \"<h$_size><font color='blue'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"2\" ]] || [[ \"$ban_cor\" = \"02\" ]]; then\necho \"<h$_size><font color='green'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"3\" ]] || [[ \"$ban_cor\" = \"03\" ]]; then\necho \"<h$_size><font color='red'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"4\" ]] || [[ \"$ban_cor\" = \"04\" ]]; then\necho \"<h$_size><font color='yellow'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"5\" ]] || [[ \"$ban_cor\" = \"05\" ]]; then\necho \"<h$_size><font color='#F535AA'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"6\" ]] || [[ \"$ban_cor\" = \"06\" ]]; then\necho \"<h$_size><font color='cyan'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"7\" ]] || [[ \"$ban_cor\" = \"07\" ]]; then\necho \"<h$_size><font color='#FF7F00'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"8\" ]] || [[ \"$ban_cor\" = \"08\" ]]; then\necho \"<h$_size><font color='#9932CD'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"9\" ]] || [[ \"$ban_cor\" = \"09\" ]]; then\necho \"<h$_size><font color='black'>$msg1\" >> $local\nelif [[ \"$ban_cor\" = \"10\" ]]; then\necho \"<h$_size>$msg1</h$_size>\" >> $local\n/etc/init.d/ssh restart > /dev/null 2>&1\necho -e \"\\n\\033[1;32m◇ BANNER ADDED!\\033[0m\"\nsleep 2\nmenu\nelse\necho -e \"\\n\\033[1;31m◇ Invalid option!\\033[0m\"\n\tsleep 2\n\tbanner\nfi\necho \"</font></h$_size>\" >> $local\nservice ssh restart > /dev/null 2>&1 && service dropbear restart > /dev/null 2>&1\necho -e \"\\n\\033[1;32m◇ BANNER ADDED!\\033[0m\"\nunset ban_cor\nelif [[ \"$resp\" = \"2\" ]]; then\n\techo \" \" > $local\n\techo -e \"\\n\\033[1;32m◇ BANNER DELETED!\\033[0m\"\n\tservice ssh restart > /dev/null 2>&1 && service dropbear restart > /dev/null 2>&1\n\tsleep 2\n\tmenu\nelif [[ \"$resp\" = \"3\" ]]; then\n\tmenu\nelse\n\techo -e \"\\n\\033[1;31m◇ Invalid option!\\033[0m\"\n\tsleep 2\n\tbanner\nfi\n"
  },
  {
    "path": "Modulos/blockt",
    "content": "#!/bin/bash\nclear\nIP=$(wget -qO- ipv4.icanhazip.com)\narq=\"/etc/Plus-torrent\"\necho -e \"\\E[44;1;37m        ㅤ🐉ㅤTORRENT BLOCK FIREWALLㅤ🐉ㅤ        \\E[0m\"\necho \"\"\nif [[ -e \"$arq\" ]]; then\n\tfun_fireoff () {\n\t\tiptables -P INPUT ACCEPT\n\t\tiptables -P OUTPUT ACCEPT\n\t\tiptables -P FORWARD ACCEPT\n\t\tiptables -t mangle -F\n\t\tiptables -t mangle -X\n\t\tiptables -t nat -F\n\t\tiptables -t nat -X\n\t\tiptables -t filter -F\n\t\tiptables -t filter -X\n\t\tiptables -F\n\t\tiptables -X\n\t\trm $arq\n\t\tsleep 3\n\t}\nfun_spn1 () {\n\thelice () {\n\t\tfun_fireoff > /dev/null 2>&1 & \n\t\ttput civis\n\t\twhile [ -d /proc/$! ]\n\t\tdo\n\t\t\tfor i in / - \\\\ \\|\n\t\t\tdo\n\t\t\t\tsleep .1\n\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\tdone\n\t\tdone\n\t\ttput cnorm\n\t}\n\techo -ne \"\\033[1;31m◇ REMOVING FIREWALL\\033[1;32m.\\033[1;33m.\\033[1;31m. \\033[1;32m\"\n\thelice\n\techo -e \"\\e[1DOk\"\n}\nread -p \"$(echo -e \"\\033[1;32m◇ WANT TO REMOVE FIREWALL RULES? \\033[1;33m[s/n]:\\033[1;37m\") \" -e -i n resp\nif [[ \"$resp\" = 's' ]]; then\n\techo \"\"\t\n\tfun_spn1\n\techo \"\"\n\techo -e \"\\033[1;33m◇ TORRENT RELEASED!\\033[0m\"\n\techo \"\"\n\techo -e \"\\033[1;32m◇ SUCCESSFULLY REMOVED FIREWALL !\"\n\techo \"\"\n\tif [[ -e /etc/openvpn/openvpn-status.log ]]; then\n\t\techo -e \"\\033[1;31m[\\033[1;33m!\\033[1;31m]\\033[1;33m◇ RESTART THE SYSTEM TO COMPLETE\"\n\t\techo \"\"\n\t\tread -p \"$(echo -e \"\\033[1;32m◇ RESTART NOW \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \")\" -e -i s respost\n\t\techo \"\"\n\t\tif [[ \"$respost\" = 's' ]]; then\n\t\t\techo -ne \"\\033[1;31m◇ Restarting\" \n\t\t\tfor i in $(seq 1 1 5); do\n\t\t\t\techo -n \".\"\n\t\t\t\tsleep 01\n\t\t\t\techo -ne \"\"\n\t\t\tdone\n\t\t\treboot\n\t\tfi\n\tfi\n\tsleep 2\n\tmenu\nelse\n\tsleep 1\n\tmenu\nfi\nelse\necho -e \"\\033[1;31m[\\033[1;33m!\\033[1;31m]\\033[1;33m BETA FUNCTION USE AT YOUR OWN RISK\"\necho \"\"\nread -p \"$(echo -ne \"\\033[1;32m◇ WISH TO APPLY FIREWALL RULES ? \\033[1;33m[s/n]:\\033[1;37m\") \" -e -i n resp\nif [[ \"$resp\" = 's' ]]; then\necho \"\"\necho -ne \"\\033[1;33m◇ TO CONTINUE CONFIRM YOUR IP: \\033[1;37m\"; read -e -i $IP IP\nif [[ -z \"$IP\" ]];then\necho \"\"\necho -e \"\\033[1;31m◇ Invalid IP\\033[1;32m\"\nsleep 1\necho \"\"\nread -p \"◇ Enter your IP: \" IP\nfi\necho \"\"\nsleep 1\nfun_fireon () {\nmportas () {\nunset portas\nportas_var=$(lsof -V -i tcp -P -n | grep -v \"ESTABLISHED\" |grep -v \"COMMAND\" | grep \"LISTEN\")\nwhile read port; do\nvar1=$(echo $port | awk '{print $1}') && var2=$(echo $port | awk '{print $9}' | awk -F \":\" '{print $2}')\n[[ \"$(echo -e $portas|grep \"$var1 $var2\")\" ]] || portas+=\"$var1 $var2\\n\"\ndone <<< \"$portas_var\"\ni=1\necho -e \"$portas\"\n}\n[[ $(iptables -h|wc -l) -lt 5 ]] && apt-get install iptables -y > /dev/null 2>-1\nNIC=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\\S+)' | head -1)\necho 'iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\niptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\niptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT\niptables -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT' > $arq\necho 'iptables -A OUTPUT -p tcp --dport 53 -m state --state NEW -j ACCEPT\niptables -A OUTPUT -p udp --dport 53 -m state --state NEW -j ACCEPT' >> $arq\necho 'iptables -A OUTPUT -p tcp --dport 67 -m state --state NEW -j ACCEPT\niptables -A OUTPUT -p udp --dport 67 -m state --state NEW -j ACCEPT' >> $arq\nlist_ips=$(mportas|awk '{print $2}')\nwhile read PORT; do\necho \"iptables -A INPUT -p tcp --dport $PORT -j ACCEPT\niptables -A INPUT -p udp --dport $PORT -j ACCEPT\niptables -A OUTPUT -p tcp --dport $PORT -j ACCEPT\niptables -A OUTPUT -p udp --dport $PORT -j ACCEPT\niptables -A FORWARD -p tcp --dport $PORT -j ACCEPT\niptables -A FORWARD -p udp --dport $PORT -j ACCEPT\niptables -A OUTPUT -p tcp -d $IP --dport $PORT -m state --state NEW -j ACCEPT\niptables -A OUTPUT -p udp -d $IP --dport $PORT -m state --state NEW -j ACCEPT\" >> $arq\ndone <<< \"$list_ips\"\necho 'iptables -A INPUT -p icmp --icmp-type echo-request -j DROP' >> $arq\necho 'iptables -A INPUT -p tcp --dport 10000 -j ACCEPT\niptables -A OUTPUT -p tcp --dport 10000 -j ACCEPT' >> $arq\necho \"iptables -t nat -A PREROUTING -i $NIC -p tcp --dport 6881:6889 -j DNAT --to-dest $IP\niptables -A FORWARD -p tcp -i $NIC --dport 6881:6889 -d $IP -j REJECT\niptables -A OUTPUT -p tcp --dport 6881:6889 -j DROP\niptables -A OUTPUT -p udp --dport 6881:6889 -j DROP\" >> $arq\necho 'iptables -A FORWARD -m string --algo bm --string \"BitTorrent\" -j DROP\niptables -A FORWARD -m string --algo bm --string \"BitTorrent protocol\" -j DROP\niptables -A FORWARD -m string --algo bm --string \"peer_id=\" -j DROP\niptables -A FORWARD -m string --algo bm --string \".torrent\" -j DROP\niptables -A FORWARD -m string --algo bm --string \"announce.php?passkey=\" -j DROP\niptables -A FORWARD -m string --algo bm --string \"torrent\" -j DROP\niptables -A FORWARD -m string --algo bm --string \"announce\" -j DROP\niptables -A FORWARD -m string --algo bm --string \"info_hash\" -j DROP\niptables -A FORWARD -m string --string \"get_peers\" --algo bm -j DROP\niptables -A FORWARD -m string --string \"announce_peer\" --algo bm -j DROP\niptables -A FORWARD -m string --string \"find_node\" --algo bm -j DROP' >> $arq\nsleep 2\nchmod +x $arq\n/etc/Plus-torrent > /dev/null\n}\nfun_spn2 () {\n\thelice () {\n\t\tfun_fireon > /dev/null 2>&1 & \n\t\ttput civis\n\t\twhile [ -d /proc/$! ]\n\t\tdo\n\t\t\tfor i in / - \\\\ \\|\n\t\t\tdo\n\t\t\t\tsleep .1\n\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\tdone\n\t\tdone\n\t\ttput cnorm\n\t}\n\techo -ne \"\\033[1;32m◇ APPLYING FIREWALL\\033[1;32m.\\033[1;33m.\\033[1;31m. \\033[1;32m\"\n\thelice\n\techo -e \"\\e[1D◇ DONE.\"\n}\nfun_spn2\necho \"\"\necho -e \"\\033[1;33m◇ TORRENT\\033[1;37m BLOCK \\033[1;33mAPPLIED!\\033[0m\"\necho \"\"\necho -e \"\\033[1;32m◇ FIREWALL SUCCESSFULLY APPLIED!\"\nsleep 3\nmenu\nelse\n\tsleep 1\n\tmenu\nfi\nfi\n"
  },
  {
    "path": "Modulos/bot",
    "content": "#!/bin/bash\n\n[[ ! -d /etc/VPSManager ]] && exit 0\n[[ ! -d /etc/bot ]] && exit 0\nsource ShellBot.sh\napi_bot=$1\nid_admin=$2\n[[ -z $api_bot ]] && exit 0\n[[ -z $id_admin ]] && exit 0\n[[ ! -e /usr/lib/licence ]] && exit 0\nativos='/etc/bot/lista_ativos'\nsuspensos='/etc/bot/lista_suspensos'\nShellBot.init --token \"$api_bot\" --monitor --return map --flush\nShellBot.username\nfun_menu() {\n    [[ \"${message_from_id[$id]}\" == \"$id_admin\" ]] && {\n        local env_msg\n        env_msg=\"<b>◈──────────────────◈</b>\\n\"\n        env_msg+=\"<b>🐉 DRAGON VPS MANAGER BOT 🐉</b>\\n\"\n        env_msg+=\"<b>◈──────────────────◈</b>\\n\\n\"\n        env_msg+=\"⚠️ <i>SELECT AN OPTION BELOW!</i>\\n\\n\"\n\tShellBot.sendMessage --chat_id ${message_chat_id[$id]} --text \"$env_msg\" \\\n            --reply_markup \"$keyboard1\" \\\n            --parse_mode html\n        return 0\n    }\n    [[ -d /etc/bot/suspensos/${message_from_username} ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"🚫 YOU ARE SUSPENDED 🚫\\n\\nCONTACT THE ADMINISTRATOR\")\"\n        return 0\n    }\n    if [[ \"$(grep -w \"${message_from_username}\" $ativos | grep -wc 'revenda')\" != '0' ]]; then\n        local env_msg\n        env_msg=\"<b>◈──────────────────◈</b>\\n\"\n        env_msg+=\"<b>🐉 DRAGON VPS MANAGER BOT 🐉</b>\\n\"\n        env_msg+=\"<b>◈──────────────────◈</b>\\n\\n\"\n        env_msg+=\"⚠️ <i>SELECT AN OPTION BELOW!</i>\\n\\n\"\n\tShellBot.sendMessage --chat_id ${message_chat_id[$id]} --text \"$env_msg\" \\\n            --reply_markup \"$keyboard1\" \\\n            --parse_mode html\n        return 0\n    elif [[ \"$(grep -w \"${message_from_username}\" $ativos | grep -wc 'subrevenda')\" != '0' ]]; then\n        local env_msg\n        env_msg=\"<b>◈──────────────────◈</b>\\n\"\n        env_msg+=\"<b>🐉 DRAGON VPS MANAGER BOT 🐉</b>\\n\"\n        env_msg+=\"<b>◈──────────────────◈</b>\\n\\n\"\n        env_msg+=\"⚠️ <i>SELECT AN OPTION BELOW!</i>\\n\\n\"\n\tShellBot.sendMessage --chat_id ${message_chat_id[$id]} --text \"$env_msg\" \\\n            --reply_markup \"$keyboard1\" \\\n            --parse_mode html\n        return 0\n    else\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n        return 0\n    fi\n}\n\nfun_ajuda() {\n    [[ ${message_chat_id[$id]} == \"\" ]] && {\n        id_chatuser=\"${callback_query_message_chat_id[$id]}\"\n        id_name=\"${callback_query_from_username}\"\n    } || {\n        id_chatuser=\"${message_chat_id[$id]}\"\n        id_name=\"${message_from_username}\"\n    }\n    if [[ \"$id_chatuser\" = \"$id_admin\" ]]; then\n        local env_msg\n        env_msg=\"<b>◈──────────────────◈</b>\\n\"\n        env_msg+=\"<b>🐉 DRAGON VPS MANAGER BOT 🐉</b>\\n\"\n        env_msg+=\"<b>◈──────────────────◈</b>\\n\\n\"\n        env_msg+=\"⚠️ <b>Available Commands</b>\\n\\n\"\n        env_msg+=\"[<b>01</b>] /menu = Display menu\\n\"\n        env_msg+=\"[<b>02</b>] /info = Display information\\n\"\n        env_msg+=\"[<b>03</b>] /help = Information about options\\n\\n\"\n        env_msg+=\"⚠️ <b>Available Options</b>\\n\\n\"\n        env_msg+=\"• <u>CREATE USER</u> = Create ssh user\\n\\n\"\n        env_msg+=\"• <u>CREATE TEST</u> = Create ssh test\\n\\n\"\n        env_msg+=\"• <u>REMOVE</u> = Remove ssh user\\n\\n\"\n        env_msg+=\"• <u>USER INFO</u> = User Information\\n\\n\"\n        env_msg+=\"• <u>ONLINE USERS</u> = Display Online Users\\n\\n\"\n        env_msg+=\"• <u>VPS INFO</u> = Server Information\\n\\n\"\n        env_msg+=\"• <u>CHANGE PASSWORD</u> = Change ssh password\\n\\n\"\n        env_msg+=\"• <u>CHANGE LIMIT</u> = Change ssh limit\\n\\n\"\n        env_msg+=\"• <u>CHANGE DATE</u> = Change date ssh\\n\\n\"\n        env_msg+=\"• <u>EXPIRED</u> = Remove expired ssh\\n\\n\"\n        env_msg+=\"• <u>BACKUP</u> = Create ssh Backup and resellers\\n\\n\"\n        env_msg+=\"• <u>OPTIMIZE</u> = Clear cache - ram\\n\\n\"\n        env_msg+=\"• <u>SPEEDTEST</u> = Connection test\\n\\n\"\n        env_msg+=\"• <u>FILES</u> = Host Files\\n\\n\"\n        env_msg+=\"• <u>RESALE</u> = Manage Resellers\\n\\n\"\n        env_msg+=\"• <u>AUTOBACKUP</u> = On/Off Automatic Backup\\n\\n\"\n        env_msg+=\"• <u>REPORT</u> = Information about resellers\\n\\n\"\n        env_msg+=\"• <u>HELP</u> = Information about options\\n\\n\"\n        ShellBot.sendMessage --chat_id $id_chatuser \\\n            --text \"$(echo -e $env_msg)\" \\\n            --parse_mode html\n\tShellBot.sendMessage --chat_id $id_chatuser \\\n            --text \"$(echo -e ✅ All Tutorials , Updates : @DRAGON_VPS_MANAGER)\"\n        return 0\n    elif [[ -d /etc/bot/suspensos/$id_name ]]; then\n        ShellBot.sendMessage --chat_id $id_chatuser \\\n            --text \"$(echo -e \"🚫 YOU ARE SUSPENDED 🚫\\n\\nCONTACT THE ADMINISTRATOR\")\"\n\tShellBot.sendSticker --chat_id $id_chatuser \\\n            --sticker \"CAACAgEAAxkBAAEDbIdhrlBIJ-fUNJHXn-g352lK26WtBQACYgEAAgkeUEUw-f8AAZo7VDciBA\"\n        return 0\n    elif [[ \"$(grep -w \"$id_name\" $ativos | awk '{print $NF}')\" == 'revenda' ]]; then\n        local env_msg\n        env_msg=\"<b>◈──────────────────◈</b>\\n\"\n        env_msg+=\"<b>🐉 DRAGON VPS MANAGER BOT 🐉</b>\\n\"\n        env_msg+=\"<b>◈──────────────────◈</b>\\n\\n\"\n        env_msg+=\"⚠️ <b>Available Commands</b>\\n\\n\"\n        env_msg+=\"[<b>01</b>] /menu = Display menu\\n\"\n        env_msg+=\"[<b>02</b>] /info = Display information\\n\"\n        env_msg+=\"[<b>03</b>] /help = Information about options\\n\\n\"\n        env_msg+=\"⚠️ <b>Available Options</b>\\n\\n\"\n        env_msg+=\"• <u>CREATE USER</u> = Create ssh user\\n\\n\"\n        env_msg+=\"• <u>CREATE TEST</u> = Create ssh test\\n\\n\"\n        env_msg+=\"• <u>REMOVE</u> = Remove ssh user\\n\\n\"\n        env_msg+=\"• <u>USER INFO</u> = User Information\\n\\n\"\n        env_msg+=\"• <u>ONLINE USERS</u> = Display Online Users\\n\\n\"\n        env_msg+=\"• <u>CHANGE PASSWORD</u> = Change ssh password\\n\\n\"\n        env_msg+=\"• <u>CHANGE LIMIT</u> = Change ssh limit\\n\\n\"\n        env_msg+=\"• <u>CHANGE DATE</u> = Change date ssh\\n\\n\"\n        env_msg+=\"• <u>EXPIRED</u> = Remove expired ssh\\n\\n\"\n        env_msg+=\"• <u>RESALE</u> = Manage Resellers\\n\\n\"\n        env_msg+=\"• <u>REPORT</u> = Information about resellers\\n\\n\"\n        env_msg+=\"• <u>HELP</u> = Information about options\\n\\n\"\n        ShellBot.sendMessage --chat_id $id_chatuser \\\n            --text \"$(echo -e $env_msg)\" \\\n            --parse_mode html\n\tShellBot.sendMessage --chat_id $id_chatuser \\\n            --text \"$(echo -e ✅ All Tutorials , Updates : @DRAGON_VPS_MANAGER)\"\n        return 0\n    elif [[ \"$(grep -w \"$id_name\" $ativos | awk '{print $NF}')\" == 'subrevenda' ]]; then\n        local env_msg\n        env_msg=\"<b>◈──────────────────◈</b>\\n\"\n        env_msg+=\"<b>🐉 DRAGON VPS MANAGER BOT 🐉</b>\\n\"\n        env_msg+=\"<b>◈──────────────────◈</b>\\n\\n\"\n        env_msg+=\"⚠️ <b>Available Commands</b>\\n\\n\"\n        env_msg+=\"[<b>01</b>] /menu = display menu\\n\"\n        env_msg+=\"[<b>02</b>] /info = Display information\\n\"\n        env_msg+=\"[<b>03</b>] /help = Information about options\\n\\n\"\n        env_msg+=\"⚠️ <b>Available Options</b>\\n\\n\"\n        env_msg+=\"• <u>CREATE USER</u> = Create ssh user\\n\\n\"\n        env_msg+=\"• <u>CREATE TEST</u> = Create ssh test\\n\\n\"\n        env_msg+=\"• <u>REMOVE</u> = Remove ssh user\\n\\n\"\n        env_msg+=\"• <u>USER INFO</u> = User information\\n\\n\"\n        env_msg+=\"• <u>ONLINE USERS</u> = Display users online\\n\\n\"\n        env_msg+=\"• <u>CHANGE PASSWORD</u> = Change ssh password\\n\\n\"\n        env_msg+=\"• <u>CHANGE LIMIT</u> = Change ssh limit\\n\\n\"\n        env_msg+=\"• <u>CHANGE DATE</u> = Change ssh date\\n\\n\"\n        env_msg+=\"• <u>EXPIRED</u> = Remove expired ssh\\n\\n\"\n        env_msg+=\"• <u>HELP</u> = Information about options\\n\\n\"\n        ShellBot.sendMessage --chat_id $id_chatuser \\\n            --text \"$(echo -e $env_msg)\" \\\n            --parse_mode html\n\tShellBot.sendMessage --chat_id $id_chatuser \\\n            --text \"✅ All Tutorials , Updates : @DRAGON_VPS_MANAGER\"\n        return 0\n    else\n        ShellBot.sendMessage --chat_id $id_chatuser \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n\tShellBot.sendSticker --chat_id $id_chatuser \\\n            --sticker \"CAACAgEAAxkBAAEDbIdhrlBIJ-fUNJHXn-g352lK26WtBQACYgEAAgkeUEUw-f8AAZo7VDciBA\"\n        return 0\n    fi\n}\n\nverifica_acesso() {\n    [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n        [[ \"$(grep -wc ${message_from_username} $suspensos)\" != '0' ]] || [[ \"$(grep -wc ${message_from_username} $ativos)\" == '0' ]] && {\n            _erro=\"1\"\n            return 0\n        }\n    }\n}\n\nfun_adduser() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"👤 CREATE USER 👤\\n\\nUsername:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\ncriar_user() {\n    IP=$(cat /etc/IP)\n    newclient() {\n        cp /etc/openvpn/client-common.txt ~/$1.ovpn\n        echo \"<ca>\" >>~/$1.ovpn\n        cat /etc/openvpn/easy-rsa/pki/ca.crt >>~/$1.ovpn\n        echo \"</ca>\" >>~/$1.ovpn\n        echo \"<cert>\" >>~/$1.ovpn\n        cat /etc/openvpn/easy-rsa/pki/issued/$1.crt >>~/$1.ovpn\n        echo \"</cert>\" >>~/$1.ovpn\n        echo \"<key>\" >>~/$1.ovpn\n        cat /etc/openvpn/easy-rsa/pki/private/$1.key >>~/$1.ovpn\n        echo \"</key>\" >>~/$1.ovpn\n        echo \"<tls-auth>\" >>~/$1.ovpn\n        cat /etc/openvpn/ta.key >>~/$1.ovpn\n        echo \"</tls-auth>\" >>~/$1.ovpn\n    }\n    file_user=$1\n    usuario=$(sed -n '1 p' $file_user | cut -d' ' -f2)\n    senha=$(sed -n '2 p' $file_user | cut -d' ' -f2)\n    limite=$(sed -n '3 p' $file_user | cut -d' ' -f2)\n    data=$(sed -n '4 p' $file_user | cut -d' ' -f2)\n    validade=$(echo \"$data\" | awk -F'/' '{print $2FS$1FS$3}' | xargs -i date -d'{}' +%Y/%m/%d)\n\n    useradd -M -N -s /bin/false $usuario -e $validade >/dev/null 2>&1\n    (\n        echo \"${senha}\"\n        echo \"${senha}\"\n    ) | passwd \"${usuario}\" >/dev/null 2>&1\n    [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n        echo \"$usuario:$senha:$info_data:$limite\" >/etc/bot/revenda/${message_from_username}/usuarios/$usuario\n        echo \"$usuario:$senha:$info_data:$limite\" >/etc/bot/info-users/$usuario\n    }\n    echo \"$usuario $limite\" >>/root/usuarios.db\n    echo \"$senha\" >/etc/VPSManager/senha/$usuario\n    [[ -e \"/etc/openvpn/server.conf\" ]] && {\n        cd /etc/openvpn/easy-rsa/\n        ./easyrsa build-client-full $usuario nopass\n        newclient \"$usuario\"\n    }\n}\n\nfun_deluser() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"🗑 REMOVE USER 🗑\\n\\nUsername:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\nfun_del_user() {\n    usuario=$1\n    [[ \"${message_from_id[$id]}\" = \"$id_admin\" ]] && {\n        piduser=$(ps -u \"$usuario\" | grep sshd | cut -d? -f1)\n        kill -9 $piduser >/dev/null 2>&1\n        userdel --force \"$usuario\" 2>/dev/null\n        grep -v ^$usuario[[:space:]] /root/usuarios.db >/tmp/ph\n        cat /tmp/ph >/root/usuarios.db\n        rm /etc/VPSManager/senha/$usuario >/dev/null 2>&1\n    } || {\n        [[ ! -e /etc/bot/revenda/${message_from_username}/usuarios/$usuario ]] && {\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"❌ THE USER DOES NOT EXIST ❌\")\" \\\n                --parse_mode html\n            _erro='1'\n            return 0\n        }\n        piduser=$(ps -u \"$usuario\" | grep sshd | cut -d? -f1)\n        kill -9 $piduser >/dev/null 2>&1\n        userdel --force \"$usuario\" 2>/dev/null\n        grep -v ^$usuario[[:space:]] /root/usuarios.db >/tmp/ph\n        cat /tmp/ph >/root/usuarios.db\n        rm /etc/VPSManager/senha/$usuario >/dev/null 2>&1\n        rm /etc/bot/revenda/${message_from_username}/usuarios/$usuario\n        rm /etc/bot/info-users/$usuario\n    }\n    [[ -e /etc/VPSManager/userteste/$usuario.sh ]] && rm /etc/VPSManager/userteste/$usuario.sh\n    [[ -e \"/etc/openvpn/easy-rsa/pki/private/$usuario.key\" ]] && {\n        [[ -e /etc/debian_version ]] && GROUPNAME=nogroup\n        cd /etc/openvpn/easy-rsa/\n        ./easyrsa --batch revoke $usuario\n        ./easyrsa gen-crl\n        rm -rf pki/reqs/$usuario.req\n        rm -rf pki/private/$usuario.key\n        rm -rf pki/issued/$usuario.crt\n        rm -rf /etc/openvpn/crl.pem\n        cp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem\n        chown nobody:$GROUPNAME /etc/openvpn/crl.pem\n        [[ -e $HOME/$usuario.ovpn ]] && rm $HOME/$usuario.ovpn >/dev/null 2>&1\n    }\n}\n\nalterar_senha() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"🔐 Change Password 🔐\\n\\nUsername:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\nalterar_senha_user() {\n    usuario=$1\n    senha=$2\n    echo \"$usuario:$senha\" | chpasswd\n    echo \"$senha\" >/etc/VPSManager/senha/$usuario\n    [[ -e /etc/bot/revenda/${message_from_username}/usuarios/$usuario ]] && {\n        senha2=$(cat /etc/bot/revenda/${message_from_username}/usuarios/$usuario | awk -F : {'print $2'})\n        sed -i \"/$usuario/ s/\\b$senha2\\b/$senha/g\" /etc/bot/revenda/${message_from_username}/usuarios/$usuario\n        sed -i \"/$usuario/ s/\\b$senha2\\b/$senha/g\" /etc/bot/info-users/$usuario\n    }\n    [[ $(ps -u $usuario | grep sshd | wc -l) != '0' ]] && pkill -u $usuario >/dev/null 2>&1\n}\n\nalterar_limite() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"👥 Change Limit 👥\\n\\nUsername:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\nalterar_limite_user() {\n    usuario=$1\n    limite=$2\n    database=\"/root/usuarios.db\"\n    [[ \"${message_from_id[$id]}\" == \"$id_admin\" ]] && {\n        grep -v ^$usuario[[:space:]] /root/usuarios.db >/tmp/a\n        mv /tmp/a /root/usuarios.db\n        echo $usuario $limite >>/root/usuarios.db\n        return 0\n    }\n    [[ -d /etc/bot/revenda/${message_from_username} ]] && {\n        [[ ! -e /etc/bot/revenda/${message_from_username}/usuarios/$usuario ]] && {\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"❌ THE USER DOES NOT EXIST ❌\")\" \\\n                --parse_mode html\n            _erro='1'\n            return 0\n        }\n        _limTotal=$(grep -w 'LIMITE_REVENDA' /etc/bot/revenda/${message_from_username}/${message_from_username} | awk '{print $NF}')\n        [[ \"$limite\" -gt \"$_limTotal\" ]] && {\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"❌ YOU HAVE NO ENOUGH LIMIT ❌\\n\\nCurrent Limit: $_limTotal \")\" \\\n                --parse_mode html\n            _erro='1'\n            return 0\n        }\n        _limTotal=$(grep -w \"${message_from_username}\" $ativos | awk '{print $4}')\n        fun_verif_limite_rev ${message_from_username}\n        _limsomarev2=$(echo \"$_result + $limite\" | bc)\n        echo \"Total $_limsomarev2\"\n        [[ \"$_limsomarev2\" -gt \"$_limTotal\" ]] && {\n            [[ \"$_limTotal\" == \"$(($_limTotal - $_result))\" ]] && _restant1='0' || _restant1=$(($_limTotal - $_result))\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"❌ You don't have enough limit\\n\\nRemaining limit: $_restant1 \")\" \\\n                --parse_mode html\n            _erro='1'\n            return 0\n        }\n        grep -v ^$usuario[[:space:]] /root/usuarios.db >/tmp/a\n        mv /tmp/a /root/usuarios.db\n        echo $usuario $limite >>/root/usuarios.db\n        limite2=$(cat /etc/bot/revenda/${message_from_username}/usuarios/$usuario | awk -F : {'print $4'})\n        sed -i \"/\\b$usuario\\b/ s/\\b$limite2\\b/$limite/\" /etc/bot/revenda/${message_from_username}/usuarios/$usuario\n        sed -i \"/\\b$usuario\\b/ s/\\b$limite2\\b/$limite/\" /etc/bot/info-users/$usuario\n    }\n}\n\nalterar_data() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"⏳ Change Date ⏳\\n\\nUsername:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\nalterar_data_user() {\n    usuario=$1\n    inputdate=$2\n    database=\"/root/usuarios.db\"\n    [[ \"$(echo -e \"$inputdate\" | sed -e 's/[^/]//ig')\" != '//' ]] && {\n        udata=$(date \"+%d/%m/%Y\" -d \"+$inputdate days\")\n        sysdate=\"$(echo \"$udata\" | awk -v FS=/ -v OFS=- '{print $3,$2,$1}')\"\n    } || {\n        udata=$(echo -e \"$inputdate\")\n        sysdate=\"$(echo -e \"$inputdate\" | awk -v FS=/ -v OFS=- '{print $3,$2,$1}')\"\n        today=\"$(date -d today +\"%Y%m%d\")\"\n        timemachine=\"$(date -d \"$sysdate\" +\"%Y%m%d\")\"\n        [ $today -ge $timemachine ] && {\n            verify='1'\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"❌ Error! Invalid date\")\" \\\n                --parse_mode html\n            _erro='1'\n            return 0\n        }\n    }\n    chage -E $sysdate $usuario\n    [[ -e /etc/bot/revenda/${message_from_username}/usuarios/$usuario ]] && {\n        data2=$(cat /etc/bot/info-users/$usuario | awk -F : {'print $3'})\n        sed -i \"s;$data2;$udata;\" /etc/bot/info-users/$usuario\n        echo $usuario $udata ${message_from_username}\n        sed -i \"s;$data2;$udata;\" /etc/bot/revenda/${message_from_username}/usuarios/$usuario\n    }\n}\n\nver_users() {\n    if [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]]; then\n        arq_info=/tmp/$(echo $RANDOM)\n        local info_users\n        info_users='◈──────────────────◈\\n'\n        info_users+='<b>USER INFORMATION</b>\\n'\n        info_users+='◈──────────────────◈\\n\\n'\n        info_users+='⚠️ Displays in the format below:\\n\\n'\n        info_users+='<code>USER PASSWORD DATE LIMIT</code>\\n'\n        ShellBot.sendMessage --chat_id $id_admin \\\n            --text \"$(echo -e $info_users)\" \\\n            --parse_mode html\n        fun_infu() {\n            local info\n            for user in $(cat /etc/passwd | awk -F : '$3 >= 1000 {print $1}' | grep -v nobody); do\n                info='◈──────────────────◈\\n'\n                [[ -e /etc/VPSManager/senha/$user ]] && senha=$(cat /etc/VPSManager/senha/$user) || senha='Null'\n                [[ $(grep -wc $user $HOME/usuarios.db) != '0' ]] && limite=$(grep -w $user $HOME/usuarios.db | cut -d' ' -f2) || limite='Null'\n                datauser=$(chage -l $user | grep -i co | awk -F : '{print $2}')\n                [[ $datauser = ' never' ]] && {\n                    data=\"00/00/00\"\n                } || {\n                    databr=\"$(date -d \"$datauser\" +\"%Y%m%d\")\"\n                    hoje=\"$(date -d today +\"%Y%m%d\")\"\n                    [[ $hoje -ge $databr ]] && {\n                        data=\"Venceu\"\n                    } || {\n                        dat=\"$(date -d\"$datauser\" '+%Y-%m-%d')\"\n                        data=$(echo -e \"$((($(date -ud $dat +%s) - $(date -ud $(date +%Y-%m-%d) +%s)) / 86400)) DIAS\")\n                    }\n                }\n                info+=\"$user • $senha • $limite • $data\"\n                echo -e \"$info\"\n            done\n        }\n        fun_infu >$arq_info\n        while :; do\n            ShellBot.sendMessage --chat_id $id_admin \\\n                --text \"$(while read linha; do echo $linha; done < <(sed '1,30!d' $arq_info))\" \\\n                --parse_mode html\n            sed -i 1,30d $arq_info\n            [[ $(cat $arq_info | wc -l) = '0' ]] && rm $arq_info && break\n        done\n    elif [[ \"$(grep -wc \"${callback_query_from_username}\" $ativos)\" != '0' ]]; then\n        [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"⚠️YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n            return 0\n        }\n        [[ $(ls /etc/bot/revenda/${callback_query_from_username}/usuarios | wc -l) == '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"YOU HASN'T CREATED USER YET!\"\n            return 0\n        }\n        arq_info=/tmp/$(echo $RANDOM)\n        local info_users\n        info_users='◈──────────────────◈\\n'\n        info_users+='<b>USER INFORMATION</b>\\n'\n        info_users+='◈──────────────────◈\\n\\n'\n        info_users+='⚠️ Displays in the format below:\\n\\n'\n        info_users+='<code>USER PASSWORD DATE LIMIT</code>\\n'\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"$(echo -e $info_users)\" \\\n            --parse_mode html\n        fun_infu() {\n            local info\n            for user in $(ls /etc/bot/revenda/${callback_query_from_username}/usuarios); do\n                info='◈──────────────────◈\\n'\n                [[ -e /etc/VPSManager/senha/$user ]] && senha=$(cat /etc/VPSManager/senha/$user) || senha='Null'\n                [[ $(grep -wc $user $HOME/usuarios.db) != '0' ]] && limite=$(grep -w $user $HOME/usuarios.db | cut -d' ' -f2) || limite='Null'\n                datauser=$(chage -l $user | grep -i co | awk -F : '{print $2}')\n                [[ $datauser = ' never' ]] && {\n                    data=\"00/00/00\"\n                } || {\n                    databr=\"$(date -d \"$datauser\" +\"%Y%m%d\")\"\n                    hoje=\"$(date -d today +\"%Y%m%d\")\"\n                    [[ $hoje -ge $databr ]] && {\n                        data=\"Venceu\"\n                    } || {\n                        dat=\"$(date -d\"$datauser\" '+%Y-%m-%d')\"\n                        data=$(echo -e \"$((($(date -ud $dat +%s) - $(date -ud $(date +%Y-%m-%d) +%s)) / 86400)) DIAS\")\n                    }\n                }\n                info+=\"$user • $senha • $limite • $data\"\n                echo -e \"$info\"\n            done\n        }\n        fun_infu >$arq_info\n        while :; do\n            ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n                --text \"$(while read linha; do echo $linha; done < <(sed '1,30!d' $arq_info))\" \\\n                --parse_mode html\n            sed -i 1,30d $arq_info\n            [[ $(cat $arq_info | wc -l) = '0' ]] && rm $arq_info && break\n        done\n    else\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n        return 0\n    fi\n}\n\nfun_drop() {\n    port_dropbear=$(ps aux | grep dropbear | awk NR==1 | awk '{print $17;}')\n    log=/var/log/auth.log\n    loginsukses='Password auth succeeded'\n    pids=$(ps ax | grep dropbear | grep \" $port_dropbear\" | awk -F\" \" '{print $1}')\n    for pid in $pids; do\n        pidlogs=$(grep $pid $log | grep \"$loginsukses\" | awk -F\" \" '{print $3}')\n        i=0\n        for pidend in $pidlogs; do\n            let i=i+1\n        done\n        if [ $pidend ]; then\n            login=$(grep $pid $log | grep \"$pidend\" | grep \"$loginsukses\")\n            PID=$pid\n            user=$(echo $login | awk -F\" \" '{print $10}' | sed -r \"s/'/ /g\")\n            waktu=$(echo $login | awk -F\" \" '{print $2\"-\"$1,$3}')\n            while [ ${#waktu} -lt 13 ]; do\n                waktu=$waktu\" \"\n            done\n            while [ ${#user} -lt 16 ]; do\n                user=$user\" \"\n            done\n            while [ ${#PID} -lt 8 ]; do\n                PID=$PID\" \"\n            done\n            echo \"$user $PID $waktu\"\n        fi\n    done\n}\n\nmonitor_ssh() {\n    if [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]]; then\n        database=\"/root/usuarios.db\"\n        cad_onli=/tmp/$(echo $RANDOM)\n        local info_on\n        info_on='◈──────────────────◈\\n'\n        info_on+='<b>ONLINES USERS MONITOR</b>\\n'\n        info_on+='◈──────────────────◈\\n\\n'\n        info_on+='⚠️ Displays in the format below:\\n\\n'\n        info_on+='<code>ONLIN USERE/TIME LIMIT\\n</code>'\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"$(echo -e $info_on)\" \\\n            --parse_mode html\n        fun_online() {\n            local info2\n            for user in $(cat /etc/passwd | awk -F : '$3 >= 1000 {print $1}' | grep -v nobody); do\n                [[ \"$(grep -w $user $database)\" != \"0\" ]] && lim=\"$(grep -w $user $database | cut -d' ' -f2)\" || lim=0\n                [[ $(netstat -nltp | grep 'dropbear' | wc -l) != '0' ]] && drop=\"$(fun_drop | grep \"$user\" | wc -l)\" || drop=0\n                [[ -e /etc/openvpn/openvpn-status.log ]] && ovp=\"$(cat /etc/openvpn/openvpn-status.log | grep -E ,\"$user\", | wc -l)\" || ovp=0\n                sqd=\"$(ps -u $user | grep sshd | wc -l)\"\n                _cont=$(($drop + $ovp))\n                conex=$(($_cont + $sqd))\n                [[ $conex -gt '0' ]] && {\n                    timerr=\"$(ps -o etime $(ps -u $user | grep sshd | awk 'NR==1 {print $1}') | awk 'NR==2 {print $1}')\"\n                    info2+=\"◈──────────────────◈\\n\"\n                    info2+=\"🟢 $user       $conex/$lim       ⏳$timerr\\n\"\n                }\n            done\n            echo -e \"$info2\"\n        }\n        fun_online >$cad_onli\n        [[ $(cat $cad_onli | wc -w) != '0' ]] && {\n            while :; do\n                ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n                    --text \"$(while read linha; do echo $linha; done < <(sed '1,30!d' $cad_onli))\" \\\n                    --parse_mode html\n                sed -i 1,30d $cad_onli\n                [[ \"$(cat $cad_onli | wc -l)\" = '0' ]] && {\n                    rm $cad_onli\n                    break\n                }\n            done\n        } || {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"Nenhum usuario online\" \\\n                --parse_mode html\n            return 0\n        }\n    elif [[ \"$(grep -wc \"${callback_query_from_username}\" $ativos)\" != '0' ]]; then\n        [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n            return 0\n        }\n        [[ $(ls /etc/bot/revenda/${callback_query_from_username}/usuarios | wc -l) == '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"YOU HASN'T CREATED USER YET!\"\n            return 0\n        }\n        database=\"/root/usuarios.db\"\n        cad_onli=/tmp/$(echo $RANDOM)\n        local info_on\n        info_on='◈──────────────────◈\\n'\n        info_on+='<b>ONLINES USERS MONITOR</b>\\n'\n        info_on+='◈──────────────────◈\\n\\n'\n        info_on+='⚠️ Displays in the format below:\\n\\n'\n        info_on+='<code>ONLINE USER/TIME LIMIT\\n</code>'\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"$(echo -e $info_on)\" \\\n            --parse_mode html\n        fun_online() {\n            local info2\n            for user in $(ls /etc/bot/revenda/${callback_query_from_username}/usuarios); do\n                [[ \"$(grep -w $user $database)\" != \"0\" ]] && lim=\"$(grep -w $user $database | cut -d' ' -f2)\" || lim=0\n                [[ $(netstat -nltp | grep 'dropbear' | wc -l) != '0' ]] && drop=\"$(fun_drop | grep \"$user\" | wc -l)\" || drop=0\n                [[ -e /etc/openvpn/openvpn-status.log ]] && ovp=\"$(cat /etc/openvpn/openvpn-status.log | grep -E ,\"$user\", | wc -l)\" || ovp=0\n                sqd=\"$(ps -u $user | grep sshd | wc -l)\"\n                conex=$(($sqd + $ovp + $drop))\n                [[ $conex -gt '0' ]] && {\n                    timerr=\"$(ps -o etime $(ps -u $user | grep sshd | awk 'NR==1 {print $1}') | awk 'NR==2 {print $1}')\"\n                    info2+=\"------------------------------\\n\"\n                    info2+=\"👤$user       $conex/$lim       ⏳$timerr\\n\"\n                }\n            done\n            echo -e \"$info2\"\n        }\n        fun_online >$cad_onli\n        [[ $(cat $cad_onli | wc -w) != '0' ]] && {\n            while :; do\n                ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n                    --text \"<code>$(while read linha; do echo $linha; done < <(sed '1,30!d' $cad_onli))</code>\" \\\n                    --parse_mode html\n                sed -i 1,30d $cad_onli\n                [[ \"$(cat $cad_onli | wc -l)\" = '0' ]] && {\n                    rm $cad_onli\n                    break\n                }\n            done\n        } || {\n            ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n                --text \"No users online\" \\\n                --parse_mode html\n            return 0\n        }\n    else\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n        return 0\n    fi\n}\n\nfun_verif_user() {\n    user=$1\n    [[ -z \"$user\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"Error\")\" \\\n            --parse_mode html\n        return 0\n    }\n    [[ \"${message_from_id[$id]}\" == \"$id_admin\" ]] && {\n        [[ \"$(awk -F : '$3 >= 1000 { print $1 }' /etc/passwd | grep -wc $user)\" == '0' ]] && {\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e ❌ THE USER $user DOES NOT EXIST !)\" \\\n                --parse_mode html\n            _erro='1'\n            return 0\n        }\n    }\n    [[ -d /etc/bot/revenda/${message_from_username} ]] && {\n        [[ ! -e /etc/bot/revenda/${message_from_username}/usuarios/$user ]] && {\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e ❌ THE USER $user DOES NOT EXIST !)\" \\\n                --parse_mode html\n            _erro='1'\n            return 0\n        }\n    }\n}\n\nfun_down() {\n    [[ \"${callback_query_from_id[$id]}\" != \"$id_admin\" ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n    [[ ! -d /tmp/file ]] && mkdir /tmp/file\n    ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n        --text \"[1] - ADD FILE\\n[2] - DELETE FILE\\n\\nInform the option [1-2]:\" \\\n        --reply_markup \"$(ShellBot.ForceReply)\"\n}\n\ninfovps() {\n    [[ \"${callback_query_from_id[$id]}\" != \"$id_admin\" ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n        return 0\n    }\n    PTs='/tmp/prts'\n    _ons=$(ps -x | grep sshd | grep -v root | grep priv | wc -l)\n    [[ -e /etc/openvpn/openvpn-status.log ]] && _onop=$(grep -c \"10.8.0\" /etc/openvpn/openvpn-status.log) || _onop=\"0\"\n    [[ -e /etc/default/dropbear ]] && _drp=$(ps aux | grep dropbear | grep -v grep | wc -l) _ondrp=$(($_drp - 1)) || _ondrp=\"0\"\n    _on=$(($_ons + $_onop + $_ondrp))\n    total=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\n    system=$(cat /etc/issue.net)\n    uso=$(top -bn1 | awk '/Cpu/ { cpu = \"\" 100 - $8 \"%\" }; END { print cpu }')\n    cpucores=$(grep -c cpu[0-9] /proc/stat)\n    ram1=$(free -h | grep -i mem | awk {'print $2'})\n    usoram=$(free -m | awk 'NR==2{printf \"%.2f%%\\t\\t\", $3*100/$2 }')\n    total=$(cat -n /root/usuarios.db | tail -n 1 | awk '{print $1}')\n    echo -e \"SSH: $(grep 'Port' /etc/ssh/sshd_config | cut -d' ' -f2 | grep -v 'no' | xargs)\" >$PTs\n    [[ -e \"/etc/stunnel/stunnel.conf\" ]] && echo -e \"SSL Tunel: $(netstat -nplt | grep 'stunnel' | awk {'print $4'} | cut -d: -f2 | xargs)\" >>$PTs\n    [[ -e \"/etc/openvpn/server.conf\" ]] && echo -e \"Openvpn: $(netstat -nplt | grep 'openvpn' | awk {'print $4'} | cut -d: -f2 | xargs)\" >>$PTs\n    [[ \"$(netstat -nplt | grep 'sslh' | wc -l)\" != '0' ]] && echo -e \"SSlh: $(netstat -nplt | grep 'sslh' | awk {'print $4'} | cut -d: -f2 | xargs)\" >>$PTs\n    [[ \"$(netstat -nplt | grep 'squid' | wc -l)\" != '0' ]] && echo -e \"Squid: $(netstat -nplt | grep 'squid' | awk -F \":\" {'print $4'} | xargs)\" >>$PTs\n    [[ \"$(netstat -nltp | grep 'dropbear' | wc -l)\" != '0' ]] && echo -e \"DropBear: $(netstat -nplt | grep 'dropbear' | awk -F \":\" {'print $4'} | xargs)\" >>$PTs\n    [[ \"$(netstat -nplt | grep 'python' | wc -l)\" != '0' ]] && echo -e \"Proxy Socks: $(netstat -nplt | grep 'python' | awk {'print $4'} | cut -d: -f2 | xargs)\" >>$PTs\n    local info\n    info=\"◈──────────────────◈\\n\"\n    info+=\"<b>SERVER INFORMATION</b>\\n\"\n    info+=\"◈──────────────────◈\\n\\n\"\n    info+=\"<b>OPERATING SYSTEM</b>\\n\"\n    info+=\"$system\\n\\n\"\n    info+=\"<b>PROCESSOR</b>\\n\"\n    info+=\"<b>cores:</b> $cpucores\\n\"\n    info+=\"<b>use:</b> $uso\\n\\n\"\n    info+=\"<b>RAM MEMORY</b>\\n\"\n    info+=\"<b>Total:</b> $ram1\\n\"\n    info+=\"<b>use:</b> $usoram\\n\\n\"\n    while read linha; do\n        info+=\"<b>$(echo -e \"$linha\")</b>\\n\"\n    done < <(cat $PTs)\n    info+=\"\\n<b>$total</b><i> USERS</i><b> $_on</b> <i>ONLINE</i>\"\n    ShellBot.sendMessage --chat_id $id_admin \\\n        --text \"$(echo -e $info)\" \\\n        --parse_mode html\n    return 0\n}\n\nfun_download() {\n    Opc=$1\n    [[ -z \"$Opc\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"❌ error try again\")\"\n        _erro='1'\n        return 0\n    }\n    _file2=$2\n    [[ -z \"$_file2\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"❌ error try again\")\"\n        _erro='1'\n        return 0\n    }\n    _DirArq=$(ls /etc/bot/arquivos)\n    i=0\n    unset _Pass\n    while read _Arq; do\n        i=$(expr $i + 1)\n        _oP=$i\n        [[ $i == [1-9] ]] && i=0$i && oP+=\" 0$i\"\n        echo -e \"[$i] - $_Arq\"\n        _Pass+=\"\\n${_oP}:${_Arq}\"\n    done <<<\"${_DirArq}\"\n    _file=$(echo -e \"${_Pass}\" | grep -E \"\\b$Opc\\b\" | cut -d: -f2)\n    echo $_file2\n    ShellBot.sendDocument --chat_id ${message_from_id[$id]} \\\n        --document \"@/etc/bot/arquivos/$_file\" \\\n        --caption \"$(echo -e \"<b>=====================================</b>\\n<b>               🐉 DRAGON VPS MANAGER 🐉   </b>\\n<b>=====================================</b>\\n\\n<b>◈─────⪧ IMPORTANT ⪦──────◈</b>\\n\\n◈⪧ 🚫 NO SPAM\\n◈⪧ ⚠️ NO DDOS\\n◈⪧ 🎭 NO Hacking\\n◈⪧ ⛔️ NO Carding\\n◈⪧ 🙅‍♂️ NO Torrent\\n◈⪧ ❌ NO MultiLogin\\n◈⪧ 🤷‍♂️ NO Illegal Activities\\n\\n<b>◈─────⪧ SSH ACCOUNT ⪦─────◈</b>\\n\\n<b>◈ Username    :⪧</b>  <code>$(awk -F \" \" '/Nome/ {print $2}' $_file2)</code>\\n<b>◈ Password     :⪧</b>  <code>$(awk -F \" \" '/Senha/ {print $2}' $_file2)</code>\\n<b>◈ Login Limit   :⪧</b> $(awk -F \" \" '/Limite/ {print $2}' $_file2)\\n<b>◈ Expire Date  :⪧</b> $(awk -F \" \" '/Validade/ {print $2}' $_file2)\\n\\n<b>◈──────⪧ PORTS ⪦ ───────◈</b>\\n\\n◈ SSH            ⌁   22\\n◈ SSL             ⌁  443\\n◈ Squid         ⌁  8080\\n◈ DropBear ⌁  80\\n◈ BadVPN    ⌁  7300\\n\\n<b>◈───⪧ONLINE USER COUNT⪦────◈ </b>\\n\\nhttp://$(cat /etc/IP):8888/server/online\\n\\n<b>◈──────────────────◈</b>\\n\\n<b>©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉</b>\\n<b>◈──────────────────◈</b>\")\" \\\n        --parse_mode html\n    [[ -e \"/root/$(awk -F \" \" '/Nome/ {print $2}' $_file2).ovpn\" ]] && {\n        ShellBot.sendDocument --chat_id ${message_from_id[$id]} \\\n            --document \"@/root/$(awk -F \" \" '/Nome/ {print $2}' $_file2).ovpn\"\n    }\n}\n\notimizer() {\n    [[ \"${callback_query_from_id[$id]}\" != \"$id_admin\" ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n        return 0\n    }\n    MEM1=$(free | awk '/Mem:/ {print int(100*$3/$2)}')\n    ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n        --text \"🧹 LEARING SERVER CACHE\"\n    apt-get autoclean -y\n    echo 3 >/proc/sys/vm/drop_caches\n    sync && sysctl -w vm.drop_caches=3 1>/dev/null 2>/dev/null\n    sysctl -w vm.drop_caches=0 1>/dev/null 2>/dev/null\n    swapoff -a\n    swapon -a\n    ram1=$(free -h | grep -i mem | awk {'print $2'})\n    ram2=$(free -h | grep -i mem | awk {'print $3'})\n    ram3=$(free -h | grep -i mem | awk {'print $4'})\n    MEM2=$(free | awk '/Mem:/ {print int(100*$3/$2)}')\n    res=$(expr $MEM1 - $MEM2)\n    local sucess\n    sucess=\"◈──────────────────◈\\n\"\n    sucess+=\"<b>SUCCESSFULLY OPTIMIZED!</b>\\n\"\n    sucess+=\"◈──────────────────◈\\n\\n\"\n    sucess+=\"<i>Previous use</i> $MEM1%\\n\\n\"\n    sucess+=\"<b>Total Ram Memory</b> $ram1\\n\"\n    sucess+=\"<b>free</b> $ram3\\n\"\n    sucess+=\"<b>In use</b> $ram2\\n\"\n    sucess+=\"<i>current use</i> $MEM2%\\n\\n\"\n    sucess+=\"<b>Saving:</b> $res%\"\n    ShellBot.sendMessage --chat_id $id_admin \\\n        --text \"$(echo -e $sucess)\" \\\n        --parse_mode html\n    return 0\n}\n\nspeed_test() {\n    [[ \"${callback_query_from_id[$id]}\" != \"$id_admin\" ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n        return 0\n    }\n    rm -rf $HOME/speed >/dev/null 2>&1\n    ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n        --text \"🚀 TESTING SERVER SPEED\"\n    speedtest --share >speed\n    png=$(cat speed | sed -n '5 p' | awk -F : {'print $NF'})\n    down=$(cat speed | sed -n '7 p' | awk -F : {'print $NF'})\n    upl=$(cat speed | sed -n '9 p' | awk -F : {'print $NF'})\n    lnk=$(cat speed | sed -n '10 p' | awk {'print $NF'})\n    local msg\n    msg=\"◈──────────────────◈\\n\"\n    msg+=\"<b>🚀 SERVER SPEED 🚀</b>\\n\"\n    msg+=\"◈──────────────────◈\\n\\n\"\n    msg+=\"<b>PING/LATENCY:</b>$png\\n\"\n    msg+=\"<b>DOWNLOAD:</b>$down\\n\"\n    msg+=\"<b>UPLOAD:</b>$upl\\n\"\n    ShellBot.sendMessage --chat_id $id_admin \\\n        --text \"$(echo -e $msg)\" \\\n        --parse_mode html\n    ShellBot.sendMessage --chat_id $id_admin \\\n        --text \"$(echo -e $lnk)\" \\\n        --parse_mode html\n    rm -rf $HOME/speed >/dev/null 2>&1\n    return 0\n}\n\nbackup_users() {\n    [[ \"${callback_query_from_id[$id]}\" != \"$id_admin\" ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n        return 0\n    }\n    rm /root/backup.vps 1>/dev/null 2>/dev/null\n    ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n        --text \"♻️ CREATING USER BACKUP\"\n    tar cvf /root/backup.vps /root/usuarios.db /etc/shadow /etc/passwd /etc/group /etc/gshadow /etc/bot /etc/VPSManager/senha 1>/dev/null 2>/dev/null\n    ShellBot.sendDocument --chat_id ${id_admin} \\\n        --document \"@/root/backup.vps\" \\\n        --caption \"$(echo -e \"♻️ USER BACKUP ♻️\")\"\n    return 0\n}\n\nsobremim() {\n    local msg\n    msg=\"◈──────────────────◈\\n\"\n    msg+=\"<b>🐉 DRAGON VPS MANAGER 🐉</b>\\n\"\n    msg+=\"◈──────────────────◈\\n\\n\"\n    msg+=\"<b>Developed by:</b> @Dragon_vps_manager\\n\"\n    msg+=\"<b>Official channel:</b> @Dragon_vps_manager\\n\\n\"\n    msg+=\"I was created with the purpose of providing information and tools for VPN management on 🐧 GNU/Linux 🐧 servers.\\n\\n\"\n    msg+=\"<b>Menu:</b> /menu\\n\"\n    ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n        --text \"$(echo -e $msg)\" \\\n        --parse_mode html\n    return 0\n}\n\nfun_add_teste() {\n    if [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]]; then\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    elif [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]]; then\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"👤 CREATE TEST 👤\\n\\nhow many hours should it last EX: 1:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    elif [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]]; then\n        _limTotal=$(grep -w \"${callback_query_from_username}\" $ativos | awk '{print $4}')\n        fun_verif_limite_rev ${callback_query_from_username}\n        _limsomarev2=$(echo \"$_result + 1\" | bc)\n        [[ \"$_limsomarev2\" -gt \"$_limTotal\" ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"❌ You have NO LIMIT AVAILABLE!\"\n            return 0\n        } || {\n            ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n                --text \"👤 CREATE TEST 👤\\n\\nhow many hours should it last EX: 1:\" \\\n                --reply_markup \"$(ShellBot.ForceReply)\"\n        }\n    else\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    fi\n}\n\nfun_teste() {\n    usuario=$(echo TESTE$((RANDOM % +500)))\n    senha='1234'\n    limite='1'\n    t_time=$1\n    ex_date=$(date '+%d/%m/%C%y' -d \" +2 days\")\n    tuserdate=$(date '+%C%y/%m/%d' -d \" +2 days\")\n    [[ -z $t_time ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"❌ error try again\")\" \\\n            --parse_mode html\n        return 0\n        _erro='1'\n    }\n    useradd -M -N -s /bin/false $usuario -e $tuserdate >/dev/null 2>&1\n    (\n        echo \"$senha\"\n        echo \"$senha\"\n    ) | passwd $usuario >/dev/null 2>&1\n    echo \"$senha\" >/etc/VPSManager/senha/$usuario\n    echo \"$usuario $limite\" >>/root/usuarios.db\n    [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n        echo \"$usuario:$senha:$ex_date:$limite\" >/etc/bot/revenda/${message_from_username}/usuarios/$usuario\n    }\n    dir_teste=\"/etc/bot/revenda/${message_from_username}/usuarios/$usuario\"\n    cat <<-EOF >/etc/VPSManager/userteste/$usuario.sh\n\t#!/bin/bash\n\t# USUARIO TESTE\n\t[[ \\$(ps -u \"$usuario\" | grep -c sshd) != '0' ]] && pkill -u $usuario\n\tuserdel --force $usuario\n\tgrep -v ^$usuario[[:space:]] /root/usuarios.db > /tmp/ph ; cat /tmp/ph > /root/usuarios.db\n\t[[ -e $dir_teste ]] && rm $dir_teste\n\trm /etc/VPSManager/senha/$usuario > /dev/null 2>&1\n\trm /etc/VPSManager/userteste/$usuario.sh\n\tEOF\n    chmod +x /etc/VPSManager/userteste/$usuario.sh\n    echo \"/etc/VPSManager/userteste/$usuario.sh\" | at now + $t_time hour >/dev/null 2>&1\n    [[ \"$t_time\" == '1' ]] && hrs=\"hora\" || hrs=\"horas\"\n    [[ \"$(ls /etc/bot/arquivos | wc -l)\" != '0' ]] && {\n        for arqv in $(ls /etc/bot/arquivos); do\n            ShellBot.sendDocument --chat_id ${message_from_id[$id]} \\\n                --document \"@/etc/bot/arquivos/$arqv\" \\\n                --caption \"$(echo -e \"<b>====================================</b>\\n<b>               🐉 DRAGON VPS MANAGER 🐉   </b>\\n<b>====================================</b>\\n\\n<b>◈─────⪧ IMPORTANT ⪦──────◈</b>\\n\\n◈⪧ 🚫 NO SPAM\\n◈⪧ ⚠️ NO DDOS\\n◈⪧ 🎭 NO Hacking\\n◈⪧ ⛔️ NO Carding\\n◈⪧ 🙅‍♂️ NO Torrent\\n◈⪧ ❌ NO MultiLogin\\n◈⪧ 🤷‍♂️ NO Illegal Activities\\n\\n<b>◈─────⪧TEST SSH ACCOUNT ⪦─────◈</b>\\n\\n<b>◈ Username    :⪧</b>  <code>$usuario</code>\\n<b>◈ Password     :⪧</b> <code>1234</code>\\n<b>◈ Expire at  :⪧</b> $t_time $hrs / Hours \\n\\n<b>◈──────⪧ PORTS ⪦ ───────◈</b>\\n\\n◈ SSH            ⌁   22\\n◈ SSL             ⌁  443\\n◈ Squid         ⌁  8080\\n◈ DropBear ⌁  80\\n◈ BadVPN    ⌁  7300\\n\\n<b>◈───⪧ONLINE USER COUNT⪦────◈ </b>\\n\\nhttp://$(cat /etc/IP):8888/server/online\\n\\n<b>◈──────────────────◈</b>\\n\\n<b>©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉</b>\\n<b>◈──────────────────◈</b>\")\" \\\n                --parse_mode html\n        done\n        return 0\n    } || {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"<b>====================================</b>\\n<b>               🐉 DRAGON VPS MANAGER 🐉   </b>\\n<b>====================================</b>\\n\\n<b>◈─────⪧ IMPORTANT ⪦──────◈</b>\\n\\n◈⪧ 🚫 NO SPAM\\n◈⪧ ⚠️ NO DDOS\\n◈⪧ 🎭 NO Hacking\\n◈⪧ ⛔️ NO Carding\\n◈⪧ 🙅‍♂️ NO Torrent\\n◈⪧ ❌ NO MultiLogin\\n◈⪧ 🤷‍♂️ NO Illegal Activities\\n\\n<b>◈────⪧TEST SSH ACCOUNT ⪦────◈</b>\\n\\n<b>◈ Host / IP       :⪧</b>  <code>$(cat /etc/IP)</code>\\n<b>◈ Username    :⪧</b>  <code>$usuario</code>\\n<b>◈ Password     :⪧</b> <code>1234</code>\\n<b>◈ Expire at       :⪧</b> $t_time $hrs / Hours \\n\\n<b>◈──────⪧ PORTS ⪦ ───────◈</b>\\n\\n◈ SSH            ⌁   22\\n◈ SSL             ⌁  443\\n◈ Squid         ⌁  8080\\n◈ DropBear ⌁  80\\n◈ BadVPN    ⌁  7300\\n\\n<b>◈───⪧ONLINE USER COUNT⪦────◈ </b>\\n\\nhttp://$(cat /etc/IP):8888/server/online\\n\\n<b>◈──────────────────◈</b>\\n\\n<b>©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉</b>\\n<b>◈──────────────────◈</b>\")\" \\\n            --parse_mode html\n        return 0\n    }\n}\n\nfun_exp_user() {\n    if [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]]; then\n        [[ $(cat /root/usuarios.db | wc -l) == '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"YOU HASN'T CREATED USER YET!\"\n            return 0\n        }\n        datenow=$(date +%s)\n        for user in $(cat /etc/passwd | awk -F : '$3 >= 1000 {print $1}' | grep -v nobody); do\n            expdate=$(chage -l $user | awk -F: '/Account expires/{print $2}')\n            echo $expdate | grep -q never && continue\n            datanormal=$(date -d\"$expdate\" '+%d/%m/%Y')\n            expsec=$(date +%s --date=\"$expdate\")\n            diff=$(echo $datenow - $expsec | bc -l)\n            echo $diff | grep -q ^\\- && continue\n            pkill -u $user\n            userdel --force $user\n            grep -v ^$user[[:space:]] /root/usuarios.db >/tmp/ph\n            cat /tmp/ph >/root/usuarios.db\n            [[ -e /etc/bot/info-users/$user ]] && rm /etc/bot/info-users/$user\n            [[ -e /etc/VPSManager/userteste/$user.sh ]] && rm /etc/VPSManager/userteste/$user.sh\n            [[ \"$(ls /etc/bot/revenda)\" != '0' ]] && {\n                for ex in $(ls /etc/bot/revenda); do\n                    [[ -e /etc/bot/revenda/$exp/usuarios/$user ]] && rm /etc/bot/revenda/$ex/usuarios/$user\n                done\n            }\n        done\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⌛️ EXPIRED SSH USERS REMOVED\"\n        return 0\n    elif [[ \"$(grep -wc \"${callback_query_from_username}\" $ativos)\" != '0' ]]; then\n        [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n            return 0\n        }\n        [[ $(ls /etc/bot/revenda/${callback_query_from_username}/usuarios | wc -l) == '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"YOU HASN'T CREATED USER YET!\"\n            return 0\n        }\n        datenow=$(date +%s)\n        dir_user=\"/etc/bot/revenda/${callback_query_from_username}/usuarios\"\n        for user in $(ls $dir_user); do\n            expdate=$(chage -l $user | awk -F: '/Account expires/{print $2}')\n            echo $expdate | grep -q never && continue\n            datanormal=$(date -d\"$expdate\" '+%d/%m/%Y')\n            expsec=$(date +%s --date=\"$expdate\")\n            diff=$(echo $datenow - $expsec | bc -l)\n            echo $diff | grep -q ^\\- && continue\n            pkill -f $user\n            userdel --force $user\n            grep -v ^$user[[:space:]] /root/usuarios.db >/tmp/ph\n            cat /tmp/ph >/root/usuarios.db\n            [[ -e /etc/VPSManager/userteste/$user.sh ]] && rm /etc/VPSManager/userteste/$user.sh\n            [[ -e \"$dir_user/$user\" ]] && rm $dir_user/$user\n        done\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⌛️ EXPIRED SSH USERS REMOVED\"\n        return 0\n    else\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n        return 0\n    fi\n}\n\nrelatorio_rev() {\n    if [[ \"${callback_query_from_id[$id]}\" = \"$id_admin\" ]]; then\n        _ons=$(ps -x | grep sshd | grep -v root | grep priv | wc -l)\n        _tuser=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\n        [[ -e /etc/openvpn/openvpn-status.log ]] && _onop=$(grep -c \"10.8.0\" /etc/openvpn/openvpn-status.log) || _onop=\"0\"\n        [[ -e /etc/default/dropbear ]] && _drp=$(ps aux | grep dropbear | grep -v grep | wc -l) _ondrp=$(($_drp - 1)) || _ondrp=\"0\"\n        _onli=$(($_ons + $_onop + $_ondrp))\n        _cont_rev=$(echo $(grep -wc revenda $ativos) - $(grep -wc revenda $suspensos) | bc)\n        _cont_sus=$(grep -wc revenda $suspensos)\n        _cont_sub=$(grep -wc subrevenda $ativos)\n        _cont_revt=$(grep -wc revenda $ativos)\n        local msg\n        msg=\"◈──────────────────◈\\n\"\n        msg+=\"<b>📊 REPORT | INFORMATION</b>\\n\"\n        msg+=\"◈──────────────────◈\\n\\n\"\n        msg+=\"<b>Total users:</b> $_tuser\\n\"\n        msg+=\"<b>Online users:</b> $_onli\\n\"\n        msg+=\"<b>Active Resellers:</b> $_cont_rev\\n\"\n        msg+=\"<b>Suspended Resellers:</b> $_cont_sus\\n\"\n        msg+=\"<b>Sub-Resales:</b> $_cont_sub\\n\\n\"\n        msg+=\"<b>Username:</b> @${callback_query_from_username}\\n\"\n        msg+=\"<b>ID:</b> <code>${callback_query_from_id}</code>\\n\"\n        [[ $_cont_revt != '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"📊 CREATING REPORT!\"\n        } || {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"⚠️ NO DEALER FOUND !\"\n            return 0\n        }\n        echo -e \"RETAILER'S REPORT\\n\\nTotal: $_cont_revt  -  $(printf 'Data: %(%d/%m/%Y)T\\n')\\n◈──────────────────◈\" >/tmp/Relatorio.txt\n        while read _revlist; do\n            _nome_rev=\"$(echo $_revlist | awk '{print $2}')\"\n            _limite_rev=\"$(echo $_revlist | awk '{print $4}')\"\n            _data_rev=\"$(echo $_revlist | awk '{print $6}')\"\n            [[ -e \"/etc/bot/revenda/$_nome_rev/$_nome_rev\" ]] && {\n                _dirsts='revenda'\n                _status='Active'\n            } || {\n                _dirsts='suspensos'\n                _status='Suspended'\n            }\n            _subrev=\"$(grep -wc SUBREVENDA /etc/bot/$_dirsts/$_nome_rev/$_nome_rev)\"\n            fun_on() {\n                for user in $(ls /etc/bot/$_dirsts/$_nome_rev/usuarios); do\n                    [[ $(netstat -nltp | grep 'dropbear' | wc -l) != '0' ]] && drop=\"$(fun_drop | grep \"$user\" | wc -l)\" || drop=0\n                    [[ -e /etc/openvpn/openvpn-status.log ]] && ovp=\"$(cat /etc/openvpn/openvpn-status.log | grep -E ,\"$user\", | wc -l)\" || ovp=0\n                    sqd=\"$(ps -u $user | grep sshd | wc -l)\"\n                    conex=$(($sqd + $ovp + $drop))\n                    echo -e \"$conex\"\n                done\n            }\n            [[ \"$(ls /etc/bot/$_dirsts/$_nome_rev/usuarios | wc -l)\" != '0' ]] && {\n                total_on=$(fun_on | paste -s -d + | bc)\n                total_users=$(ls /etc/bot/$_dirsts/$_nome_rev/usuarios | wc -l)\n            } || {\n                total_on='0'\n                total_users='0'\n            }\n            echo -e \"\\nSTATUS: $_status\\nDEALER: @$_nome_rev\\nLIMIT: $_limite_rev\\nDAYS REMAINING: $_data_rev\\nSSH CREATED: $total_users\\nSSH ONLINE: $total_on\\nSUB-RESALE: $_subrev\\n\\n◈──────────────────◈\" >>/tmp/Relatorio.txt\n        done <<<\"$(grep -w 'revenda' $ativos)\"\n        ShellBot.sendDocument --chat_id $id_admin \\\n            --document \"@/tmp/Relatorio.txt\" \\\n            --caption \"$(echo -e \"$msg\")\" \\\n            --parse_mode html\n        return 0\n    elif [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]]; then\n        [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n            return 0\n        }\n        [[ $(grep -wc 'SUBREVENDA' /etc/bot/revenda/${callback_query_from_username}/${callback_query_from_username}) == '0' ]] && {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"⚠️ NO SUB DEALER FOUND !\"\n            _cont_limite=$(grep -w ${callback_query_from_username} $ativos | awk '{print $4}')\n            fun_verif_limite_rev ${callback_query_from_username}\n            _cont_disp=$(echo $_cont_limite - $_result | bc)\n            local msg\n            msg=\"◈──────────────────◈\\n\"\n            msg+=\"<b>📊 REPORT | INFORMATION</b>\\n\"\n            msg+=\"◈──────────────────◈\\n\\n\"\n            msg+=\"<b>Login Limit:</b> $_cont_limite\\n\"\n            msg+=\"<b>Available Limit:</b> $_cont_disp\\n\"\n            ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n                --text \"$msg\" \\\n                --parse_mode html\n            return 0\n        }\n        fun_contsub() {\n            while read _sublist; do\n                _usub=\"$(echo $_sublist | awk '{print $2}')\"\n                echo $(grep -wc $_usub $suspensos)\n            done <<<\"$(grep -w 'SUBREVENDA' /etc/bot/revenda/${callback_query_from_username}/${callback_query_from_username})\"\n        }\n        _cont_limite=$(grep -w ${callback_query_from_username} $ativos | awk '{print $4}')\n        fun_verif_limite_rev ${callback_query_from_username}\n        _cont_disp=$(echo $_cont_limite - $_result | bc)\n        _cont_atv=$(grep -wc SUBREVENDA /etc/bot/revenda/${callback_query_from_username}/${callback_query_from_username})\n        _cont_sup=$(fun_contsub | paste -s -d + | bc)\n        local msg\n        msg=\"◈──────────────────◈\\n\"\n        msg+=\"<b>📊 REPORT | INFORMATION</b>\\n\"\n        msg+=\"◈──────────────────◈\\n\\n\"\n        msg+=\"<b>Login Limit:</b> $_cont_limite\\n\"\n        msg+=\"<b>Available Limit:</b> $_cont_disp\\n\"\n        msg+=\"<b>Total Sub-Resales:</b> $_cont_atv\\n\"\n        msg+=\"<b>Suspended Sub-Resales:</b> $_cont_sup\\n\"\n        msg+=\"<b>Username:</b> @${callback_query_from_username}\\n\"\n        msg+=\"<b>ID:</b> <code>${callback_query_from_id}</code>\\n\"\n        echo -e \"LIST OF SUB-SELLERS\\n\\nTotal: $_cont_atv  -  $(printf 'Data: %(%d/%m/%Y)T\\n')\\n◈──────────────────◈\" >/tmp/Relatorio-${callback_query_from_username}.txt\n        while read _sublist; do\n            _usub=\"$(echo $_sublist | awk '{print $2}')\"\n            _limit_sub=$(echo $_sublist | awk '{print $4}')\n            _data_sub=$(grep -w $_usub $ativos | awk '{print $6}')\n            [[ -e \"/etc/bot/revenda/$_usub/$_usub\" ]] && {\n                _dirsts='revenda'\n                _status='Ativo'\n            } || {\n                _dirsts='suspensos'\n                _status='Suspenso'\n            }\n            fun_subon() {\n                for user in $(ls /etc/bot/$_dirsts/$_usub/usuarios); do\n                    [[ $(netstat -nltp | grep 'dropbear' | wc -l) != '0' ]] && drop=\"$(fun_drop | grep \"$user\" | wc -l)\" || drop=0\n                    [[ -e /etc/openvpn/openvpn-status.log ]] && ovp=\"$(cat /etc/openvpn/openvpn-status.log | grep -E ,\"$user\", | wc -l)\" || ovp=0\n                    sqd=\"$(ps -u $user | grep sshd | wc -l)\"\n                    conex=$(($sqd + $ovp + $drop))\n                    echo -e \"$conex\"\n                done\n            }\n            [[ \"$(ls /etc/bot/$_dirsts/$_usub/usuarios | wc -l)\" != '0' ]] && {\n                total_on=$(fun_on | paste -s -d + | bc)\n                total_users=$(ls /etc/bot/$_dirsts/$_usub/usuarios | wc -l)\n            } || {\n                total_on='0'\n                total_users='0'\n            }\n            echo -e \"\\nSTATUS: $_status\\nSUB-DEALER: @$_usub\\nLIMIT: $_limit_sub\\nDAYS REMAINING: $_data_sub\\nSSH CREATED: $total_users\\nSSH ONLINE: $total_on\\n\\n◈──────────────────◈\" >>/tmp/Relatorio-${callback_query_from_username}.txt\n        done <<<\"$(grep -w 'SUBREVENDA' /etc/bot/revenda/${callback_query_from_username}/${callback_query_from_username})\"\n        ShellBot.sendDocument --chat_id ${callback_query_message_chat_id[$id]} \\\n            --document \"@/tmp/Relatorio-${callback_query_from_username}.txt\" \\\n            --caption \"$(echo -e \"$msg\")\" \\\n            --parse_mode html\n        return 0\n    else\n\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    fi\n}\n\nfun_backauto() {\n    [[ \"${callback_query_from_id[$id]}\" = \"$id_admin\" ]] && {\n        [[ ! -d /etc/VPSManager/backups ]] && {\n            mkdir /etc/VPSManager/backups\n            [[ $(crontab -l | grep -c \"userbackup\") = '0' ]] && (\n                crontab -l 2>/dev/null\n                echo \"0 */6 * * * /bin/userbackup 1\"\n            ) | crontab -\n            s\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"♻️ AUTOMATIC BACKUP ENABLED 🟢\"\n            return 0\n        } || {\n            [[ $(crontab -l | grep -c \"userbackup\") != '0' ]] && crontab -l | grep -v 'userbackup' | crontab -\n            [[ -d /etc/VPSManager/backups ]] && rm -rf /etc/VPSManager/backups\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"♻️ AUTOMATIC BACKUP DISABLED 🔴\"\n            return 0\n        }\n    }\n}\n\nbackup_auto() {\n    ShellBot.sendDocument --chat_id $id_admin \\\n        --document \"@/etc/VPSManager/backups/backup.vps\" \\\n        --caption \"$(echo -e \"♻️ AUTOMATIC BACKUP ♻️\")\"\n    rm /etc/VPSManager/backups/backup.vps\n    return 0\n}\n\nrestaure_backup() {\n    [[ ${message_from_id[$id]} == ${id_admin} ]] && {\n        [[ \"${message_document_file_name}\" != 'backup.vps' ]] && return 0\n        local file_id\n        file_id=${message_document_file_id[$id]}\n        if [[ $file_id ]]; then\n            [[ -e /tmp/backup.vps ]] && rm /tmp/backup.vps\n            [[ \"$(ls /tmp | grep -c '.vps')\" != '0' ]] && {\n                for i in $(ls /tmp | grep '.vps'); do\n                    rm /tmp/$i\n                done\n            }\n            ShellBot.getFile --file_id $file_id\n            if ShellBot.downloadFile --file_path \"${return[file_path]}\" --dir \"/tmp\"; then\n                msg='<b>♻️ BACKUP FILE ♻️</b>\\n\\n<i>The uploaded file is a file\\nuser backup!</i>'\n                ShellBot.sendMessage --chat_id ${id_admin} \\\n                    --text \"$(echo -e \"$msg\")\" \\\n                    --parse_mode html\n                ShellBot.sendMessage --chat_id ${id_admin} \\\n                    --text 'Do you want to restore? [Yes | No]' \\\n                    --reply_markup \"$(ShellBot.ForceReply)\"\n            fi\n        fi\n        return 0\n    }\n}\nmsg_bem_vindo() {\n    local msg\n    msg=\"👋 Hello ${message_from_first_name[$id]} ! \\n\\n🤝 Welcome to\\n\"\n    msg+=\"<b>====================================</b>\\n<b>               🐉 DRAGON VPS MANAGER 🐉   </b>\\n<b>====================================</b>\\n\\n\"\n    msg+=\"<b>To access the menu</b>\\n<b>click [ /menu ]</b>\\n\\n\"\n    msg+=\"<b>For information</b>\\n<b>click [ /help ]</b>\\n\\n ✅ All Tutorials , Updates : @DRAGON_VPS_MANAGER\"\n    ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n        --text \"$(echo -e $msg)\" \\\n        --parse_mode html\n    ShellBot.sendSticker --chat_id ${message_chat_id[$id]} \\\n        --sticker \"CAACAgIAAxkBAAEDZt1hqPwEyUPLlqUVp27340hwwsO8OAACugADMNSdEYTXxIjEUGdWIgQ\"\n    return 0\n}\n\nfun_verif_limite_rev() {\n    _userrev=$1\n    [[ \"$(grep -w \"$_userrev\" $ativos | awk '{print $NF}')\" == 'revenda' ]] && {\n        echo $_userrev\n        [[ $(grep -wc 'SUBREVENDA' /etc/bot/revenda/$_userrev/$_userrev) != '0' ]] && {\n            _limsomarev=$(grep -w 'SUBREVENDA' /etc/bot/revenda/$_userrev/$_userrev | awk {'print $4'} | paste -s -d + | bc)\n        } || {\n            _limsomarev='0'\n        }\n        [[ $(ls /etc/bot/revenda/$_userrev/usuarios | wc -l) != '0' ]] && {\n            _mlim1='0'\n            _meus_users=\"/etc/bot/revenda/$_userrev/usuarios\"\n            for _user_ in $(ls $_meus_users); do\n                _mlim2=$(cat $_meus_users/$_user_ | awk -F : {'print $4'})\n                _mlim1=$(echo \"${_mlim1} + ${_mlim2}\" | bc)\n            done\n        }\n        [[ -z \"$_mlim1\" ]] && _mlim1='0'\n        _result=$(echo \"${_limsomarev} + ${_mlim1}\" | bc)\n    }\n    [[ \"$(grep -w \"$_userrev\" $ativos | awk '{print $NF}')\" == 'subrevenda' ]] && {\n        [[ \"$(ls /etc/bot/revenda/$_userrev/usuarios | wc -l)\" != '0' ]] && {\n            _dir_users=\"/etc/bot/revenda/$_userrev/usuarios\"\n            _lim1='0'\n            for i in $(ls $_dir_users); do\n                _lim2=$(cat $_dir_users/$i | awk -F : {'print $4'})\n                _lim1=$(echo \"${_lim1} + ${_lim2}\" | bc)\n            done\n        }\n        [[ -z \"$_lim1\" ]] && _lim1='0'\n        _result=$(echo \"${_lim1}\")\n    }\n}\n\nfun_add_revenda() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"👥 ADD DEALER 👥\\n\\nEnter the name:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\ncriar_rev() {\n    file_rev=$1\n    [[ -z \"$file_rev\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e Erro)\"\n        _erro='1'\n        break\n    }\n    n_rev=$(sed -n '1 p' $file_rev | cut -d' ' -f2)\n    u_rev=$(sed -n '2 p' $file_rev | awk -F '@' {'print $2'})\n    l_rev=$(sed -n '3 p' $file_rev | cut -d' ' -f2)\n    d_rev=$(sed -n '4 p' $file_rev | cut -d' ' -f2)\n    [[ \"${message_from_id[$id]}\" = \"$id_admin\" ]] && {\n        t_rev='revenda'\n    } || {\n        t_rev='subrevenda'\n        echo -e \"SUBRESALE: $u_rev LIMIT_SUBRESALE: $l_rev\" >>/etc/bot/revenda/${message_from_username}/${message_from_username}\n    }\n    mkdir /etc/bot/revenda/\"$u_rev\"\n    mkdir /etc/bot/revenda/\"$u_rev\"/usuarios\n    touch /etc/bot/revenda/\"$u_rev\"/$u_rev\n    echo -e \"USER: $u_rev LIMITE: $l_rev DIAS: $d_rev TIPO: $t_rev\" >>$ativos\n    echo -e \"◈──────────────────◈\\nLIMIT_RESALE: $l_rev\\nDAYS_RESALE: $d_rev\\n◈──────────────────◈\\n\" >/etc/bot/revenda/\"$u_rev\"/$u_rev\n    sed -i '$d' $file_rev\n    echo -e \"Due date: $(date \"+%d/%m/%Y\" -d \"+$d_rev days\")\" >>$file_rev\n}\n\nfun_del_rev() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"🗑 REMOVE DEALER 🗑\\n\\nInform his username [Ex: @Dragon_vps_manager]:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\ndel_rev() {\n    _cli_rev=$1\n    [[ -z \"$_cli_rev\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"Erro\")\"\n        return 0\n    }\n    [[ \"${message_from_id[$id]}\" == \"$id_admin\" ]] && {\n        [[ \"$(grep -wc \"$_cli_rev\" $ativos)\" != '0' ]] && {\n            [[ -e \"/etc/bot/revenda/$_cli_rev/$_cli_rev\" ]] && _dirsts='revenda' || _dirsts='suspensos'\n            [[ \"$(grep -wc 'SUBREVENDA' /etc/bot/$_dirsts/$_cli_rev/$_cli_rev)\" != '0' ]] && {\n                while read _listsub2; do\n                    _usub=\"$(echo $_listsub2 | awk '{print $2}')\"\n                    [[ -e \"/etc/bot/revenda/$_usub/$_usub\" ]] && _dirsts2='revenda' || _dirsts2='suspensos'\n                    _dir_users=\"/etc/bot/$_dirsts2/$_usub/usuarios\"\n                    [[ \"$(ls $_dir_users | wc -l)\" != '0' ]] && {\n                        for _user in $(ls $_dir_users); do\n                            piduser=$(ps -u \"$_user\" | grep sshd | cut -d? -f1)\n                            kill -9 $piduser >/dev/null 2>&1\n                            userdel --force \"$_user\" 2>/dev/null\n                            grep -v ^$_user[[:space:]] /root/usuarios.db >/tmp/ph\n                            cat /tmp/ph >/root/usuarios.db\n                            rm /etc/bot/info-users/$_user\n                        done\n                    }\n                    [[ -d /etc/bot/$_dirsts2/$_usub ]] && rm -rf /etc/bot/$_dirsts2/$_usub >/dev/null 2>&1\n                    sed -i \"/\\b$_usub\\b/d\" $ativos\n                    [[ $(grep -wc \"$_usub\" $suspensos) != '0' ]] && {\n                        sed -i \"/\\b$_usub\\b/d\" $suspensos\n                    }\n                done <<<\"$(grep -w 'SUBREVENDA' /etc/bot/$_dirsts/$_cli_rev/$_cli_rev)\"\n            }\n            [[ \"$(ls /etc/bot/$_dirsts/$_cli_rev/usuarios | wc -l)\" != '0' ]] && {\n                for _user in $(ls /etc/bot/$_dirsts/$_cli_rev/usuarios); do\n                    piduser=$(ps -u \"$_user\" | grep sshd | cut -d? -f1)\n                    kill -9 $piduser >/dev/null 2>&1\n                    userdel --force \"$_user\" 2>/dev/null\n                    grep -v ^$_user[[:space:]] /root/usuarios.db >/tmp/ph\n                    cat /tmp/ph >/root/usuarios.db\n                    rm /etc/bot/info-users/$_user\n                done\n            }\n            [[ -d /etc/bot/$_dirsts/$_cli_rev ]] && rm -rf /etc/bot/$_dirsts/$_cli_rev >/dev/null 2>&1\n            sed -i \"/\\b$_cli_rev\\b/d\" $ativos\n            [[ $(grep -wc \"$_cli_rev\" $suspensos) != '0' ]] && {\n                sed -i \"/\\b$_cli_rev\\b/d\" $suspensos\n            }\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"SUCCESSFULLY REMOVED\")\" \\\n                --parse_mode html\n            return 0\n        } || {\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e ❌ DEALER DOES NOT EXIST ❌)\"\n            return 0\n        }\n    } || {\n        [[ \"$(grep -wc \"$_cli_rev\" /etc/bot/revenda/${message_from_username}/${message_from_username})\" != '0' ]] && {\n            [[ -d /etc/bot/revenda/$_cli_rev ]] && {\n                [[ \"$(ls /etc/bot/revenda/$_cli_rev/usuarios | wc -l)\" != '0' ]] && {\n                    for _user in $(ls /etc/bot/revenda/$_cli_rev/usuarios); do\n                        piduser=$(ps -u \"$_user\" | grep sshd | cut -d? -f1)\n                        kill -9 $piduser >/dev/null 2>&1\n                        userdel --force \"$_user\" 2>/dev/null\n                        grep -v ^$_user[[:space:]] /root/usuarios.db >/tmp/ph\n                        cat /tmp/ph >/root/usuarios.db\n                        rm /etc/bot/info-users/$_user\n                    done\n                }\n                [[ -d /etc/bot/revenda/$_cli_rev ]] && rm -rf /etc/bot/revenda/$_cli_rev >/dev/null 2>&1\n                sed -i \"/\\b$_cli_rev\\b/d\" $ativos\n                sed -i \"/\\b$_cli_rev\\b/d\" /etc/bot/revenda/${message_from_username}/${message_from_username}\n            }\n            [[ -d /etc/bot/suspensos/$_cli_rev ]] && {\n                [[ \"$(ls /etc/bot/suspensos/$_cli_rev/usuarios | wc -l)\" != '0' ]] && {\n                    for _user in $(ls /etc/bot/suspensos/$_cli_rev/usuarios); do\n                        piduser=$(ps -u \"$_user\" | grep sshd | cut -d? -f1)\n                        kill -9 $piduser >/dev/null 2>&1\n                        userdel --force \"$_user\" 2>/dev/null\n                        grep -v ^$_user[[:space:]] /root/usuarios.db >/tmp/ph\n                        cat /tmp/ph >/root/usuarios.db\n                        rm /etc/bot/info-users/$_user\n                    done\n                }\n                [[ -d /etc/bot/suspensos/$_cli_rev ]] && rm -rf /etc/bot/suspensos/$_cli_rev >/dev/null 2>&1\n                sed -i \"/\\b$_cli_rev\\b/d\" $ativos\n                sed -i \"/\\b$_cli_rev\\b/d\" $suspensos\n                sed -i \"/\\b$_cli_rev\\b/d\" /etc/bot/revenda/${message_from_username}/${message_from_username}\n            }\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"SUCCESSFULLY REMOVED\")\" \\\n                --parse_mode html\n            return 0\n        } || {\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e ❌ DEALER DOES NOT EXIST ❌)\"\n            return 0\n        }\n    }\n}\n\nfun_lim_rev() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"♾ CHANGE RESALE LIMIT ♾\\n\\nInform his username [Ex: @Dragon_vps_manager]:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\nlim_rev() {\n    _file_lim=$1\n    [[ -z \"$_file_lim\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"Erro\")\"\n        return 0\n    }\n    _rev_usern=$(grep -w 'Revendedor' $_file_lim | awk -F '@' {'print $2'})\n    new_l=$(grep -w 'Limite' $_file_lim | awk {'print $2'})\n    [[ -d /etc/bot/revenda/$_rev_usern ]] && {\n        l_old=$(grep -w 'LIMITE_REVENDA' /etc/bot/revenda/$_rev_usern/$_rev_usern | awk {'print $2'})\n        sed -i \"/LIMITE_REVENDA/ s/$l_old/$new_l/g\" /etc/bot/revenda/$_rev_usern/$_rev_usern\n        sed -i \"/$_rev_usern/ s/LIMITE: $l_old/LIMITE: $new_l/\" $ativos\n        [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n            sed -i \"/\\b$_rev_usern\\b/ s/$l_old/$new_l/g\" /etc/bot/revenda/${message_from_username}/${message_from_username}\n        }\n        echo $_rev_usern\n    } || {\n        l_old=$(grep -w 'LIMITE_REVENDA' /etc/bot/suspensos/$_rev_usern/$_rev_usern | awk {'print $2'})\n        sed -i \"/LIMITE_REVENDA/ s/$l_old/$new_l/g\" /etc/bot/suspensos/$_rev_usern/$_rev_usern\n        sed -i \"/\\b$_rev_usern\\b/ s/LIMITE: $l_old/LIMITE: $new_l/\" $ativos\n        sed -i \"/\\b$_rev_usern\\b/ s/LIMITE: $l_old/LIMITE: $new_l/\" $suspensos\n        [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n            sed -i \"/\\b$_rev_usern\\b/ s/$l_old/$new_l/\" /etc/bot/revenda/${message_from_username}/${message_from_username}\n        }\n        echo $_rev_usern\n    }\n}\n\nfun_dat_rev() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"📆 CHANGE RESALE DATE 📆\\n\\nInform his username [Ex: @Dragon_vps_manager]:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\ndat_rev() {\n    _datfile=$1\n    [[ -z \"$_datfile\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"Error\")\"\n        _erro='1'\n        return 0\n    }\n    _revd=$(grep -w 'Revendedor' $_datfile | cut -d'@' -f2)\n    new_d=$(grep -w 'Data' $_datfile | awk '{print $NF}')\n    [[ -d \"/etc/bot/suspensos/$_revd\" ]] && {\n        [[ \"$(ls /etc/bot/suspensos/$_revd/usuarios | wc -l)\" != '0' ]] && {\n            for _user in $(ls /etc/bot/suspensos/$_revd/usuarios); do\n                usermod -U $_user\n            done\n        }\n        d_old=$(grep -w 'DIAS_REVENDA' /etc/bot/suspensos/$_revd/$_revd | awk {'print $2'})\n        sed -i \"/\\b$_revd\\b/ s/DIAS: $d_old/DIAS: $new_d/\" $ativos\n        sed -i \"/DIAS_REVENDA/ s/$d_old/$new_d/\" /etc/bot/suspensos/$_revd/$_revd\n        [[ \"$(grep -wc 'SUBREVENDA' /etc/bot/suspensos/$_revd/$_revd)\" != '0' ]] && {\n            while read _listsub; do\n                _usub=\"$(echo $_listsub | awk '{print $2}')\"\n                [[ \"$(ls /etc/bot/suspensos/$_usub/usuarios | wc -l)\" != '0' ]] && {\n                    for _user in $(ls /etc/bot/suspensos/$_usub/usuarios); do\n                        usermod -U $_user\n                    done\n                }\n                mv /etc/bot/suspensos/$_usub /etc/bot/revenda/$_usub\n                sed -i \"/\\b$_usub\\b/d\" $suspensos\n            done <<<\"$(grep -w 'SUBREVENDA' /etc/bot/suspensos/$_revd/$_revd)\"\n        }\n        mv /etc/bot/suspensos/$_revd /etc/bot/revenda/$_revd\n        sed -i \"/\\b$_revd\\b/d\" $suspensos\n        sed -i \"s;$new_d;$(date \"+%d/%m/%Y\" -d \"+$new_d days\");\" $_datfile\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"⚠️ $_revd IT WAS SUSPENDED AND WAS REACTIVATED !\")\" \\\n            --parse_mode html\n    } || {\n        d_old=$(grep -w 'DIAS_REVENDA' /etc/bot/revenda/$_revd/$_revd | awk {'print $2'})\n        sed -i \"/\\b$_revd\\b/ s/DIAS: $d_old/DIAS: $new_d/\" $ativos\n        sed -i \"/DIAS_REVENDA/ s/$d_old/$new_d/\" /etc/bot/revenda/$_revd/$_revd\n        sed -i \"s;$new_d;$(date \"+%d/%m/%Y\" -d \"+$new_d days\");\" $_datfile\n    }\n}\n\nfun_list_rev() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    if [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]]; then\n        local msg1\n        msg1=\"◈──────────────────◈\\n📃 RESELLERS LIST !\\n◈──────────────────◈\\n\"\n        [[ \"$(grep -wc 'revenda' $ativos)\" != '0' ]] && {\n            while read _atvs; do\n                _uativ=\"$(echo $_atvs | awk '{print $2}')\"\n                [[ \"$(grep -wc \"$_uativ\" $suspensos)\" == '0' ]] && _stsrev='ATIVO' || _stsrev='SUSPENSO'\n                msg1+=\"• @$_uativ - $_stsrev\\n\"\n            done <<<\"$(grep -w 'revenda' /etc/bot/lista_ativos)\"\n            ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n                --text \"$(echo -e \"$msg1\")\" \\\n                --parse_mode html\n            return 0\n        } || {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"YOU DO NOT HAVE RESELLERS\"\n            return 0\n        }\n    elif [[ \"$(grep -w ${callback_query_from_username} $ativos | awk '{print $NF}')\" == 'revenda' ]]; then\n        _patch=\"/etc/bot/revenda\"\n        local msg1\n        msg1=\"◈──────────────────◈\\n📃 LIST OF SUBSELLERS !\\n◈──────────────────◈\\n\"\n        [[ \"$(grep -wc \"SUBREVENDA\" $_patch/${callback_query_from_username}/${callback_query_from_username})\" != '0' ]] && {\n            while read _listsub; do\n                _usub=\"$(echo $_listsub | awk '{print $2}')\"\n                [[ \"$(grep -wc \"$_usub\" $suspensos)\" == '0' ]] && _usts='ACTIVE' || _usts='SUSPENDED'\n                msg1+=\"• @$_usub - $_usts\\n\"\n            done <<<\"$(grep -w 'SUBREVENDA' $_patch/${callback_query_from_username}/${callback_query_from_username})\"\n            ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n                --text \"$(echo -e \"$msg1\")\" \\\n                --parse_mode html\n            return 0\n        } || {\n            ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n                --text \"YOU DO NOT HAVE SUB RESELLERS\"\n            return 0\n        }\n    else\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    fi\n}\n\nfun_susp_rev() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} \\\n            --text \"🔒 SUSPEND DEALER 🔒\\n\\nInform his username [Ex: @Dragon_vps_manager]:\" \\\n            --reply_markup \"$(ShellBot.ForceReply)\"\n    } || {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"🚫 ACCESS DENIED 🚫\"\n        return 0\n    }\n}\n\nsusp_rev() {\n    _revs=$1\n    [[ -z \"$_revs\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"Error\")\"\n        return 0\n    }\n    [[ -d \"/etc/bot/suspensos/$_revs\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"THE USER IS ALREADY SUSPENDED !\")\" \\\n            --parse_mode html\n        return 0\n    }\n    [[ ! -d \"/etc/bot/revenda/$_revs\" ]] && {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"THE USER DOES NOT EXIST !\")\" \\\n            --parse_mode html\n        return 0\n    }\n    [[ \"${message_from_id[$id]}\" == \"$id_admin\" ]] && {\n        [[ \"$(grep -wc 'SUBREVENDA' /etc/bot/revenda/$_revs/$_revs)\" != '0' ]] && {\n            while read _listsub3; do\n                _usub3=\"$(echo $_listsub3 | awk '{print $2}')\"\n                _dir_users=\"/etc/bot/revenda/$_usub3/usuarios\"\n                [[ \"$(ls $_dir_users | wc -l)\" != '0' ]] && {\n                    for _user in $(ls $_dir_users); do\n                        usermod -L $_user\n                        pkill -f $_user\n                    done\n                }\n                mv /etc/bot/revenda/$_usub3 /etc/bot/suspensos/$_usub3\n                grep -w \"$_usub3\" $ativos >>$suspensos\n            done <<<\"$(grep -w 'SUBREVENDA' /etc/bot/revenda/$_revs/$_revs)\"\n        }\n        [[ \"$(ls /etc/bot/revenda/$_revs/usuarios | wc -l)\" != '0' ]] && {\n            for _user_ in $(ls /etc/bot/revenda/$_revs/usuarios); do\n                usermod -L $_user_\n                pkill -f $_user_\n            done\n        }\n        mv /etc/bot/revenda/$_revs /etc/bot/suspensos/$_revs\n        grep -w \"$_revs\" $ativos >>$suspensos\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"SUCCESSFULLY SUSPENDED\")\" \\\n            --parse_mode html\n        return 0\n    } || {\n        [[ \"$(grep -wc \"$_revs\" /etc/bot/revenda/${message_from_username}/${message_from_username})\" != '0' ]] && {\n            [[ \"$(ls /etc/bot/revenda/$_revs/usuarios | wc -l)\" != '0' ]] && {\n                for _user_ in $(ls /etc/bot/revenda/$_revs/usuarios); do\n                    usermod -L $_user_\n                    pkill -f $_user_\n                done\n            }\n            mv /etc/bot/revenda/$_revs /etc/bot/suspensos/$_revs\n            grep -w \"$_revs\" $ativos >>$suspensos\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"SUCCESSFULLY SUSPENDED\")\" \\\n                --parse_mode html\n            return 0\n        } || {\n            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                --text \"$(echo -e \"THE SUB DEALER DOES NOT EXIST\")\" \\\n                --parse_mode html\n            return 0\n        }\n    }\n}\n\ninfouserbot() {\n    [[ $(grep -wc ${message_from_username} $ativos) != '0' ]] && {\n        _cont_limite=$(grep -w ${message_from_username} $ativos | awk '{print $4}')\n        fun_verif_limite_rev ${message_from_username}\n        _cont_disp=$(echo $_cont_limite - $_result | bc)\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"<b>NAME: </> ${message_from_first_name[$(ShellBot.ListUpdates)]}\\n<b>USERNAME:</>\" \"@${message_from_username[$(ShellBot.ListUpdates)]:-null}\")\\n<b>ID:</> ${message_from_id[$(ShellBot.ListUpdates)]}\\nACCESS: RESALE\\n<b>TOTAL LIMIT:</b> $_cont_limite\\n<b>REMAINING LIMIT:</b> $_cont_disp\" \\\n            --parse_mode html\n        return 0\n    } || {\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n            --text \"$(echo -e \"<b>NAME: </> ${message_from_first_name[$(ShellBot.ListUpdates)]}\\n<b>USERNAME:</>\" \"@${message_from_username[$(ShellBot.ListUpdates)]:-null}\")\\n<b>ID:</> ${message_from_id[$(ShellBot.ListUpdates)]} \" \\\n            --parse_mode html\n\tShellBot.sendSticker --chat_id ${message_chat_id[$id]} \\\n            --sticker \"CAACAgIAAxkBAAEDbJdhrlMi5WT2IvHUwY_3V9t-HQ_tUQACFgADwDZPE2Ah1y2iBLZnIgQ\"\n        return 0\n    }\n}\n\nfun_menurevenda() {\n    [[ \"$(grep -wc ${callback_query_from_username} $suspensos)\" != '0' ]] && {\n        ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} \\\n            --text \"⚠️ YOU ARE SUSPENDED! CONTACT THE ADMINISTRATOR\"\n        return 0\n    }\n    [[ \"${callback_query_from_id[$id]}\" == \"$id_admin\" ]] || [[ \"$(grep -wc ${callback_query_from_username} $ativos)\" != '0' ]] && {\n        ShellBot.editMessageText --chat_id ${callback_query_message_chat_id[$id]} \\\n            --message_id ${callback_query_message_message_id[$id]} \\\n            --text \"SELECT AN OPTION BELOW:\" \\\n            --reply_markup \"$(ShellBot.InlineKeyboardMarkup --button 'menu4')\"\n        return 0\n    }\n}\n\n# LISTA MENU ADMIN\nunset menu1\nmenu1=''\nShellBot.InlineKeyboardButton --button 'menu1' --line 1 --text 'CREATE USER' --callback_data '_criaruser'\nShellBot.InlineKeyboardButton --button 'menu1' --line 2 --text 'CREATE TEST' --callback_data '_criarteste'\nShellBot.InlineKeyboardButton --button 'menu1' --line 3 --text 'REMOVE USER' --callback_data '_deluser'\nShellBot.InlineKeyboardButton --button 'menu1' --line 4 --text 'CHANGE PASSWORD' --callback_data '_altsenha'\nShellBot.InlineKeyboardButton --button 'menu1' --line 5 --text 'CHANGE LIMIT' --callback_data '_altlimite'\nShellBot.InlineKeyboardButton --button 'menu1' --line 6 --text 'CHANGE DATE' --callback_data '_altdata'\nShellBot.InlineKeyboardButton --button 'menu1' --line 7 --text 'ONLINE USERS' --callback_data '_monitor'\nShellBot.InlineKeyboardButton --button 'menu1' --line 8 --text 'INFO USERS' --callback_data '_verusers'\nShellBot.InlineKeyboardButton --button 'menu1' --line 9 --text 'EXPIRED' --callback_data '_expirados'\nShellBot.InlineKeyboardButton --button 'menu1' --line 1 --text 'INFO VPS' --callback_data '_infovps'\nShellBot.InlineKeyboardButton --button 'menu1' --line 2 --text 'OTIMIZAR' --callback_data '_otimizar'\nShellBot.InlineKeyboardButton --button 'menu1' --line 3 --text 'FILES' --callback_data '_arqdown'\nShellBot.InlineKeyboardButton --button 'menu1' --line 4 --text 'RESALE' --callback_data '_opcoesrev'\nShellBot.InlineKeyboardButton --button 'menu1' --line 5 --text 'SPEEDTEST' --callback_data '_speedteste'\nShellBot.InlineKeyboardButton --button 'menu1' --line 6 --text 'BACKUP USERS' --callback_data '_backupusers'\nShellBot.InlineKeyboardButton --button 'menu1' --line 7 --text \"AUTO BACKUP\" --callback_data '_autobkp'\nShellBot.InlineKeyboardButton --button 'menu1' --line 8 --text 'REPORT' --callback_data '_relatorio'\nShellBot.InlineKeyboardButton --button 'menu1' --line 9 --text 'HELP' --callback_data '_ajuda'\nShellBot.regHandleFunction --function fun_adduser --callback_data _criaruser\nShellBot.regHandleFunction --function fun_add_teste --callback_data _criarteste\nShellBot.regHandleFunction --function fun_deluser --callback_data _deluser\nShellBot.regHandleFunction --function alterar_senha --callback_data _altsenha\nShellBot.regHandleFunction --function alterar_limite --callback_data _altlimite\nShellBot.regHandleFunction --function alterar_data --callback_data _altdata\nShellBot.regHandleFunction --function fun_down --callback_data _arqdown\nShellBot.regHandleFunction --function monitor_ssh --callback_data _monitor\nShellBot.regHandleFunction --function ver_users --callback_data _verusers\nShellBot.regHandleFunction --function fun_exp_user --callback_data _expirados\nShellBot.regHandleFunction --function otimizer --callback_data _otimizar\nShellBot.regHandleFunction --function speed_test --callback_data _speedteste\nShellBot.regHandleFunction --function infovps --callback_data _infovps\nShellBot.regHandleFunction --function backup_users --callback_data _backupusers\nShellBot.regHandleFunction --function fun_backauto --callback_data _autobkp\nShellBot.regHandleFunction --function relatorio_rev --callback_data _relatorio\nShellBot.regHandleFunction --function fun_ajuda --callback_data _ajuda\nShellBot.regHandleFunction --function fun_menurevenda --callback_data _opcoesrev\nunset keyboard1\nkeyboard1=\"$(ShellBot.InlineKeyboardMarkup -b 'menu1')\"\n\n# LISTA MENU REVENDEDOR\nunset menu2\nmenu2=''\nShellBot.InlineKeyboardButton --button 'menu2' --line 1 --text 'CREATE USER' --callback_data '_criaruser2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 1 --text 'CREATE TEST' --callback_data '_criarteste2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 2 --text 'REMOVE USER' --callback_data '_deluser2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 2 --text 'ONLINE USERS' --callback_data '_monitor2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 3 --text 'CHANGE LIMIT' --callback_data '_altlimite2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 3 --text 'USER INFO' --callback_data '_verusers2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 4 --text 'CHANGE PASSWORD' --callback_data '_altsenha2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 4 --text 'EXPIRED' --callback_data '_expirados2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 5 --text 'CHANGE DATE' --callback_data '_altdata2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 5 --text 'RESALE' --callback_data '_opcoesrev2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 6 --text 'REPORT' --callback_data '_relatorio2'\nShellBot.InlineKeyboardButton --button 'menu2' --line 6 --text 'HELP' --callback_data '_ajuda2'\nShellBot.regHandleFunction --function fun_adduser --callback_data _criaruser2\nShellBot.regHandleFunction --function fun_add_teste --callback_data _criarteste2\nShellBot.regHandleFunction --function fun_deluser --callback_data _deluser2\nShellBot.regHandleFunction --function alterar_senha --callback_data _altsenha2\nShellBot.regHandleFunction --function alterar_limite --callback_data _altlimite2\nShellBot.regHandleFunction --function alterar_data --callback_data _altdata2\nShellBot.regHandleFunction --function monitor_ssh --callback_data _monitor2\nShellBot.regHandleFunction --function ver_users --callback_data _verusers2\nShellBot.regHandleFunction --function fun_exp_user --callback_data _expirados2\nShellBot.regHandleFunction --function relatorio_rev --callback_data _relatorio2\nShellBot.regHandleFunction --function fun_menurevenda --callback_data _opcoesrev2\nShellBot.regHandleFunction --function fun_ajuda --callback_data _ajuda2\nunset keyboard2\nkeyboard2=\"$(ShellBot.InlineKeyboardMarkup -b 'menu2')\"\n\n#LISTA MUNU SUB REVENDEDOR\nunset menu3\nmenu3=''\nShellBot.InlineKeyboardButton --button 'menu3' --line 1 --text 'CREATE USER' --callback_data '_criaruser3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 1 --text 'CREATE TEST' --callback_data '_criarteste3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 2 --text 'REMOVE USER' --callback_data '_deluser3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 2 --text 'ONLINE USERS' --callback_data '_monitor3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 3 --text 'CHANGE LIMIT' --callback_data '_altlimite3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 3 --text 'USER INFO' --callback_data '_verusers3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 4 --text 'CHANGE PASSWORD' --callback_data '_altsenha3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 4 --text 'EXPIRED' --callback_data '_expirados3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 5 --text 'CHANGE DATE' --callback_data '_altdata3'\nShellBot.InlineKeyboardButton --button 'menu3' --line 5 --text 'HELP' --callback_data '_ajuda3'\nShellBot.regHandleFunction --function fun_adduser --callback_data _criaruser3\nShellBot.regHandleFunction --function fun_add_teste --callback_data _criarteste3\nShellBot.regHandleFunction --function fun_deluser --callback_data _deluser3\nShellBot.regHandleFunction --function alterar_senha --callback_data _altsenha3\nShellBot.regHandleFunction --function alterar_limite --callback_data _altlimite3\nShellBot.regHandleFunction --function alterar_data --callback_data _altdata3\nShellBot.regHandleFunction --function monitor_ssh --callback_data _monitor3\nShellBot.regHandleFunction --function ver_users --callback_data _verusers3\nShellBot.regHandleFunction --function fun_exp_user --callback_data _expirados3\nShellBot.regHandleFunction --function fun_ajuda --callback_data _ajuda3\nunset keyboard3\nkeyboard3=\"$(ShellBot.InlineKeyboardMarkup -b 'menu3')\"\n\n#LISTA MENU OPCOES REVENDA\nunset menu4\nmenu4=''\nShellBot.InlineKeyboardButton --button 'menu4' --line 1 --text 'ADD RESALE' --callback_data '_addrev'\nShellBot.InlineKeyboardButton --button 'menu4' --line 2 --text 'REMOVE RESALE' --callback_data '_delrev'\nShellBot.InlineKeyboardButton --button 'menu4' --line 3 --text 'CHANGE RESALE LIMIT' --callback_data '_limrev'\nShellBot.InlineKeyboardButton --button 'menu4' --line 4 --text 'CHANGE RESALE DATE' --callback_data '_datrev'\nShellBot.InlineKeyboardButton --button 'menu4' --line 5 --text 'LIST RESALE' --callback_data '_listrev'\nShellBot.InlineKeyboardButton --button 'menu4' --line 6 --text 'SUSPEND RESALE' --callback_data '_susprevendas'\nShellBot.regHandleFunction --function fun_add_revenda --callback_data _addrev\nShellBot.regHandleFunction --function fun_del_rev --callback_data _delrev\nShellBot.regHandleFunction --function fun_lim_rev --callback_data _limrev\nShellBot.regHandleFunction --function fun_dat_rev --callback_data _datrev\nShellBot.regHandleFunction --function fun_list_rev --callback_data _listrev\nShellBot.regHandleFunction --function fun_susp_rev --callback _susprevendas\nunset keyboard4\nkeyboard4=\"$(ShellBot.InlineKeyboardMarkup -b 'menu4')\"\n\nwhile :; do\n    [[ -e \"/etc/VPSManager/backups/backup.vps\" ]] && {\n        backup_auto\n    }\n    #Obtem as atualizações\n    ShellBot.getUpdates --limit 100 --offset $(ShellBot.OffsetNext) --timeout 35\n    #Lista o índice das atualizações\n    for id in $(ShellBot.ListUpdates); do\n        #Inicio thread\n        (\n            ShellBot.watchHandle --callback_data ${callback_query_data[$id]}\n            # Requisições somente no privado.\n            [[ ${message_chat_type[$id]} != 'private' ]] && continue\n            [[ ${message_text[$id]} ]] || restaure_backup\n            CAD_ARQ=/tmp/cad.${message_from_id[$id]}\n            if [[ ${message_entities_type[$id]} == bot_command ]]; then\n                #Verifica se a mensagem enviada pelo usuário é um comando válido.\n                case ${message_text[$id]} in\n                *)\n                    :\n                    #comandos\n                    comando=(${message_text[$id]})\n                    [[ \"${comando[0]}\" = \"/start\" ]] && msg_bem_vindo\n                    [[ \"${comando[0]}\" = \"/menu\" ]] && fun_menu\n                    [[ \"${comando[0]}\" = \"/info\" ]] && infouserbot\n                    [[ \"${comando[0]}\" = \"/help\" || \"${comando[0]}\" = \"/ajuda\" ]] && fun_ajuda\n                    [[ \"${comando[0]}\" = \"/bot\" || \"${comando[0]}\" = \"/sobre\" ]] && sobremim\n                    ;;\n                esac\n            fi\n            if [[ ${message_reply_to_message_message_id[$id]} ]]; then\n                # Analisa a interface de resposta.\n                case ${message_reply_to_message_text[$id]} in\n                '👤 CREATE USER 👤\\n\\nUsername:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ \"$(awk -F : '$3 >= 1000 { print $1 }' /etc/passwd | grep -w ${message_text[$id]} | wc -l)\" != '0' ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error! INVALID USER ❌\\n\\n⚠️ Enter Another Name..\")\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    [ \"${message_text[$id]}\" == 'root' ] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error! INVALID USER ❌\\n\\n⚠️ Enter Another Name..\")\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    sizemin=$(echo -e ${#message_text[$id]})\n                    [[ \"$sizemin\" -lt '4' ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error !\\n\\nUse at least 4 characters\\n[EX: test]\")\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    sizemax=$(echo -e ${#message_text[$id]})\n                    [[ \"$sizemax\" -gt '10' ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error !\\n\\nUse a maximum of 8 characters\\n[EX: abcdefgh]\")\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    echo \"Nome: ${message_text[$id]}\" >$CAD_ARQ\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'Senha:' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\" # Força a resposta.\n                    ;;\n                'Senha:')\n                    sizepass=$(echo -e ${#message_text[$id]})\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ \"$sizepass\" -lt '4' ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error !\\n\\nUse at least 4 characters\\n[EX: 1234]\")\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    echo \"Senha: ${message_text[$id]}\" >>$CAD_ARQ\n                    # Próximo campo.\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'Limite:' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\"\n                    ;;\n                'Limite:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\nuse only numbers [EX: 1]\")\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n                        _limTotal=$(grep -w \"${message_from_username}\" $ativos | awk '{print $4}')\n                        fun_verif_limite_rev ${message_from_username}\n                        _limsomarev2=$(echo \"$_result + ${message_text[$id]}\" | bc)\n                        [[ \"$_limsomarev2\" -gt \"$_limTotal\" ]] && {\n                            _restant1=$(($_limTotal - $_result))\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ you don't have enough limit\\n\\nAvailable limit: $_restant1 \")\" \\\n                                --parse_mode html\n                            >$CAD_ARQ\n                            break\n                        }\n                    }\n                    echo \"Limite: ${message_text[$id]}\" >>$CAD_ARQ\n                    # Próximo campo.\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'Validity in days: ' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\"\n                    ;;\n\n                'Validity in days:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\nuse only numbers [EX: 30]\")\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    info_data=$(date '+%d/%m/%C%y' -d \" +${message_text[$id]} days\")\n                    echo \"Validade: $info_data\" >>$CAD_ARQ\n                    criar_user $CAD_ARQ\n                    [[ \"(grep -w ${message_text[$id]} /etc/passwd)\" = '0' ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e ❌ Error creating user !)\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    [[ \"$(ls /etc/bot/arquivos | wc -l)\" != '0' ]] && {\n                        ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                            --text '📥 AVAILABLE FILES 📥\\n\\nDo you want to download? Yes or no?:' \\\n                            --reply_markup \"$(ShellBot.ForceReply)\"\n                    } || {\n                        ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                            --text \"<b>====================================</b>\\n<b>               🐉 DRAGON VPS MANAGER 🐉   </b>\\n<b>====================================</b>\\n\\n<b>◈─────⪧ IMPORTANT ⪦──────◈</b>\\n\\n◈⪧ 🚫 NO SPAM\\n◈⪧ ⚠️ NO DDOS\\n◈⪧ 🎭 NO Hacking\\n◈⪧ ⛔️ NO Carding\\n◈⪧ 🙅‍♂️ NO Torrent\\n◈⪧ ❌ NO MultiLogin\\n◈⪧ 🤷‍♂️ NO Illegal Activities\\n\\n<b>◈─────⪧ SSH ACCOUNT ⪦─────◈</b>\\n\\n<b>◈ Host / IP       :⪧</b>  <code>$(cat /etc/IP)</code>\\n<b>◈ Username    :⪧</b>  <code>$(awk -F \" \" '/Nome/ {print $2}' $CAD_ARQ)</code>\\n<b>◈ Password     :⪧</b>  <code>$(awk -F \" \" '/Senha/ {print $2}' $CAD_ARQ)</code>\\n<b>◈ Login Limit   :⪧</b> $(awk -F \" \" '/Limite/ {print $2}' $CAD_ARQ)\\n<b>◈ Expire Date  :⪧</b> $(awk -F \" \" '/Validade/ {print $2}' $CAD_ARQ)\\n\\n<b>◈──────⪧ PORTS ⪦ ───────◈</b>\\n\\n◈ SSH            ⌁   22\\n◈ SSL             ⌁  443\\n◈ Squid         ⌁  8080\\n◈ DropBear ⌁  80\\n◈ BadVPN    ⌁  7300\\n\\n<b>◈───⪧ONLINE USER COUNT⪦────◈ </b>\\n\\nhttp://$(cat /etc/IP):8888/server/online\\n\\n<b>◈──────────────────◈</b>\\n\\n<b>©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉</b>\\n<b>◈──────────────────◈</b>\" \\\n                            --parse_mode html\n                        break\n                    }\n                    ;;\n                '📥 AVAILABLE FILES 📥\\n\\nDo you want to download? Yes or no?:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([A-Za-z]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Invalid option ❌\\n\\n⚠️ use only letters [EX: Yes or No]\")\" \\\n                            --parse_mode html\n                        ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                            --text \"<b>====================================</b>\\n<b>               🐉 DRAGON VPS MANAGER 🐉   </b>\\n<b>====================================</b>\\n\\n<b>◈─────⪧ IMPORTANT ⪦──────◈</b>\\n\\n◈⪧ 🚫 NO SPAM\\n◈⪧ ⚠️ NO DDOS\\n◈⪧ 🎭 NO Hacking\\n◈⪧ ⛔️ NO Carding\\n◈⪧ 🙅‍♂️ NO Torrent\\n◈⪧ ❌ NO MultiLogin\\n◈⪧ 🤷‍♂️ NO Illegal Activities\\n\\n<b>◈─────⪧ SSH ACCOUNT ⪦─────◈</b>\\n\\n<b>◈ Host / IP       :⪧</b>  <code>$(cat /etc/IP)</code>\\n<b>◈ Username    :⪧</b>  <code>$(awk -F \" \" '/Nome/ {print $2}' $CAD_ARQ)</code>\\n<b>◈ Password     :⪧</b>  <code>$(awk -F \" \" '/Senha/ {print $2}' $CAD_ARQ)</code>\\n<b>◈ Login Limit   :⪧</b> $(awk -F \" \" '/Limite/ {print $2}' $CAD_ARQ)\\n<b>◈ Expire Date  :⪧</b> $(awk -F \" \" '/Validade/ {print $2}' $CAD_ARQ)\\n\\n<b>◈──────⪧ PORTS ⪦ ───────◈</b>\\n\\n◈ SSH            ⌁   22\\n◈ SSL             ⌁  443\\n◈ Squid         ⌁  8080\\n◈ DropBear ⌁  80\\n◈ BadVPN    ⌁  7300\\n\\n<b>◈───⪧ONLINE USER COUNT⪦────◈ </b>\\n\\nhttp://$(cat /etc/IP):8888/server/online\\n\\n<b>◈──────────────────◈</b>\\n\\n<b>©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉</b>\\n<b>◈──────────────────◈</b>\" \\\n                            --parse_mode html\n                        break\n                    }\n                    [[ \"${message_text[$id]}\" = @(Sim|sim|SIM) ]] && {\n                        msg_cli=\"◈──────────────────◈\\n\"\n                        msg_cli+=\"<b>PRE-CONFIGURED FILES </b>❗\\n\"\n                        msg_cli+=\"◈──────────────────◈\\n\\n\"\n                        for _file in $(ls /etc/bot/arquivos); do\n                            i=$(($i + 1))\n                            msg_cli+=\"<b>[$i]</b> - $_file\\n\"\n                        done\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"$msg_cli\")\" \\\n                            --parse_mode html\n                        ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                            --text 'Enter the File Number:' \\\n                            --reply_markup \"$(ShellBot.ForceReply)\"\n                    } || {\n                        ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                            --text \"<b>====================================</b>\\n<b>               🐉 DRAGON VPS MANAGER 🐉   </b>\\n<b>====================================</b>\\n\\n<b>◈─────⪧ IMPORTANT ⪦──────◈</b>\\n\\n◈⪧ 🚫 NO SPAM\\n◈⪧ ⚠️ NO DDOS\\n◈⪧ 🎭 NO Hacking\\n◈⪧ ⛔️ NO Carding\\n◈⪧ 🙅‍♂️ NO Torrent\\n◈⪧ ❌ NO MultiLogin\\n◈⪧ 🤷‍♂️ NO Illegal Activities\\n\\n<b>◈─────⪧ SSH ACCOUNT ⪦─────◈</b>\\n\\n<b>◈ Host / IP       :⪧  <code>$(cat /etc/IP)</code>\\n<b>◈ Username    :⪧</b>  <code>$(awk -F \" \" '/Nome/ {print $2}' $CAD_ARQ)</code>\\n<b>◈ Password     :⪧</b>  <code>$(awk -F \" \" '/Senha/ {print $2}' $CAD_ARQ)</code>\\n<b>◈ Login Limit   :⪧</b> $(awk -F \" \" '/Limite/ {print $2}' $CAD_ARQ)\\n<b>◈ Expire Date  :⪧</b> $(awk -F \" \" '/Validade/ {print $2}' $CAD_ARQ)\\n\\n<b>◈──────⪧ PORTS ⪦ ───────◈</b>\\n\\n◈ SSH            ⌁   22\\n◈ SSL             ⌁  443\\n◈ Squid         ⌁  8080\\n◈ DropBear ⌁  80\\n◈ BadVPN    ⌁  7300\\n\\n<b>◈───⪧ONLINE USER COUNT⪦────◈ </b>\\n\\nhttp://$(cat /etc/IP):8888/server/online\\n\\n<b>◈──────────────────◈</b>\\n\\n<b>©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉</b>\\n<b>◈──────────────────◈</b>\" \\\n                            --parse_mode html\n                    }\n                    ;;\n                'Enter the File Number:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Invalid option ❌ \\n\\n⚠️ use only numbers [EX: 1]\")\" \\\n                            --parse_mode html\n                        ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                            --text \"<b>====================================</b>\\n<b>               🐉 DRAGON VPS MANAGER 🐉   </b>\\n<b>====================================</b>\\n\\n<b>◈─────⪧ IMPORTANT ⪦──────◈</b>\\n\\n◈⪧ 🚫 NO SPAM\\n◈⪧ ⚠️ NO DDOS\\n◈⪧ 🎭 NO Hacking\\n◈⪧ ⛔️ NO Carding\\n◈⪧ 🙅‍♂️ NO Torrent\\n◈⪧ ❌ NO MultiLogin\\n◈⪧ 🤷‍♂️ NO Illegal Activities\\n\\n<b>◈─────⪧ SSH ACCOUNT ⪦─────◈</b>\\n\\n<b>◈ Host / IP       :⪧  <code>$(cat /etc/IP)</code>\\n<b>◈ Username    :⪧</b>  <code>$(awk -F \" \" '/Nome/ {print $2}' $CAD_ARQ)</code>\\n<b>◈ Password     :⪧</b>  <code>$(awk -F \" \" '/Senha/ {print $2}' $CAD_ARQ)</code>\\n<b>◈ Login Limit   :⪧</b> $(awk -F \" \" '/Limite/ {print $2}' $CAD_ARQ)\\n<b>◈ Expire Date  :⪧</b> $(awk -F \" \" '/Validade/ {print $2}' $CAD_ARQ)\\n\\n<b>◈──────⪧ PORTS ⪦ ───────◈</b>\\n\\n◈ SSH            ⌁   22\\n◈ SSL             ⌁  443\\n◈ Squid         ⌁  8080\\n◈ DropBear ⌁  80\\n◈ BadVPN    ⌁  7300\\n\\n<b>◈───⪧ONLINE USER COUNT⪦────◈ </b>\\n\\nhttp://$(cat /etc/IP):8888/server/online\\n\\n<b>◈──────────────────◈</b>\\n\\n<b>©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉</b>\\n<b>◈──────────────────◈</b>\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    fun_download ${message_text[$id]} $CAD_ARQ\n                    # Limpa o arquivo temporário.\n                    >$CAD_ARQ\n                    break\n                    ;;\n                '🗑 REMOVE USER 🗑\\n\\nUsername:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    fun_del_user ${message_text[$id]}\n                    [[ \"$_erro\" == '1' ]] && break\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text \"✅ *Successfully removed.* 🚮\" \\\n                        --parse_mode markdown\n                    ;;\n                '🔐 Change Password 🔐\\n\\nUsername:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    fun_verif_user ${message_text[$id]}\n                    echo \"$_erro\"\n                    [[ \"$_erro\" == '1' ]] && break\n                    echo \"${message_text[$id]}\" >/tmp/name-s\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'new password:' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\"\n                    ;;\n                'new password:')\n                    sizepass=$(echo -e ${#message_text[$id]})\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ \"$sizepass\" -lt '4' ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error !\\n\\n⚠️ Use at least 4 characters [EX: 1234]\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    alterar_senha_user $(cat /tmp/name-s) ${message_text[$id]}\n                    [[ \"$_erro\" == '1' ]] && break\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text \"$(echo -e \"◈──────────────────◈\\n<b>✅ PASSWORD CHANGED !</b> !\\n◈──────────────────◈\\n\\n<b>User:</b> $(cat /tmp/name-s)\\n<b>New Password:</b> ${message_text[$id]}\")\" \\\n                        --parse_mode html\n                    rm /tmp/name-s >/dev/null 2>&1\n                    ;;\n                '👥 Change Limit 👥\\n\\nUsername:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    echo $_erro segundo\n                    fun_verif_user ${message_text[$id]}\n                    echo \"$_erro\"\n                    [[ \"$_erro\" == '1' ]] && break\n                    echo \"${message_text[$id]}\" >/tmp/name-l\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'new limit:' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\"\n                    ;;\n                'new limit:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\n⚠️ use only numbers [EX: 1]\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    alterar_limite_user $(cat /tmp/name-l) ${message_text[$id]}\n                    [[ \"$_erro\" == '1' ]] && break\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text \"$(echo -e \"◈──────────────────◈\\n<b>✅ Limit CHANGED !</b> !\\n◈──────────────────◈\\n\\n<b>User:</b> $(cat /tmp/name-l)\\n<b>New Limit:</b> ${message_text[$id]}\")\" \\\n                        --parse_mode html\n                    rm /tmp/name-l >/dev/null 2>&1\n                    ;;\n                '⏳ Change Date ⏳\\n\\nUsername:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    fun_verif_user ${message_text[$id]}\n                    [[ \"$_erro\" == '1' ]] && break\n                    echo \"${message_text[$id]}\" >/tmp/name-d\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'inform the days or date:' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\"\n                    ;;\n                'inform the days or date:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9/]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error! follow the example\\n\\nformat days [EX: 30]\\nDate format [EX: 30/12/2019]\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    alterar_data_user $(cat /tmp/name-d) ${message_text[$id]}\n                    [[ \"$_erro\" == '1' ]] && break\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text \"$(echo -e \"◈──────────────────◈\\n<b>✅ DATE CHANGED !</b> !\\n◈──────────────────◈\\n\\n<b>User:</b> $(cat /tmp/name-d)\\n<b>New Date:</b> $udata\")\" \\\n                        --parse_mode html\n                    rm /tmp/name-d >/dev/null 2>&1\n                    ;;\n                '[1] - ADD FILE\\n[2] - DELETE FILE\\n\\nInform the option [1-2]:')\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\n⚠️ use only numbers [EX: 1 or 2]\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    if [[ \"${message_text[$id]}\" = '1' ]]; then\n                        ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                            --text \"📤 HOST FILES 📤\\n\\nsend me the file:\" \\\n                            --reply_markup \"$(ShellBot.ForceReply)\"\n                    elif [[ \"${message_text[$id]}\" = '2' ]]; then\n                        [[ $(ls /etc/bot/arquivos | wc -l) != '0' ]] && {\n                            msg_cli1=\"◈──────────────────◈\\n\"\n                            msg_cli1+=\"🚀<b> HOSTED FILES </b>\\n\"\n                            msg_cli1+=\"◈──────────────────◈\\n\\n\"\n                            for _file in $(ls /etc/bot/arquivos); do\n                                i=$(($i + 1))\n                                msg_cli1+=\"<b>[$i]</b> - $_file\\n\"\n                            done\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"$msg_cli1\")\" \\\n                                --parse_mode html\n                            ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                                --text \"🗑Delete File\\nEnter the File Number:\" \\\n                                --reply_markup \"$(ShellBot.ForceReply)\"\n                        } || {\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"There are no files available\")\" \\\n                                --parse_mode html\n                            break\n                        }\n                    else\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Invalid option\")\" \\\n                            --parse_mode html\n                        break\n                    fi\n                    ;;\n                '🗑Delete File\\nEnter the File Number:')\n                    [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && break\n                    Opc1=${message_text[$id]}\n                    echo $Opc1\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error Deleting File ! \\n\\n⚠️ use only numbers [EX: 1]\")\" \\\n                            --parse_mode html\n                        break\n                    } || {\n                        echo \"opcao $Opc1\"\n                        _DirArq=$(ls /etc/bot/arquivos)\n                        i=0\n                        unset _Pass\n                        while read _Arq; do\n                            i=$(expr $i + 1)\n                            _oP=$i\n                            [[ $i == [1-9] ]] && i=0$i && oP+=\" 0$i\"\n                            echo -e \"[$i] - $_Arq\"\n                            _Pass+=\"\\n${_oP}:${_Arq}\"\n                        done <<<\"${_DirArq}\"\n                        _file=$(echo -e \"${_Pass}\" | grep -E \"\\b$Opc1\\b\" | cut -d: -f2)\n                        [[ -e /etc/bot/arquivos/$_file ]] && {\n                            rm /etc/bot/arquivos/$_file\n                            ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                                --text \"✅ *successfully deleted* ✅\" \\\n                                --parse_mode markdown\n                            break\n                        } || {\n                            ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                                --text \"$(echo -e \"❌ Invalid option\")\"\n                            break\n                        }\n                    }\n                    ;;\n                '📤 HOST FILES 📤\\n\\nsend me the file:')\n                    if [ \"${update_id[$id]}\" ]; then\n                        # Monitora o envio de arquivos\n                        [[ ${message_document_file_id[$id]} ]] && file_id=${message_document_file_id[$id]} && download_file=1\n                        # Verifica se o download está ativado.\n                        [[ $download_file -eq 1 ]] && {\n                            file_id=($file_id)\n                            ShellBot.getFile --file_id \"${file_id[0]}\"\n                            ShellBot.downloadFile --file_path ${return[file_path]} --dir \"/tmp/file\" && {\n                                msg='*✅ Successfully hosted file.*\\n\\n'\n                                msg+=\"*📤 Information*\\n\\n\"\n                                msg+=\"*Name*: ${message_document_file_name}\\n\"\n                                msg+=\"*Saved in*: /etc/bot/arquivos\"\n                                ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                    --text \"$(echo -e \"$msg\")\" \\\n                                    --parse_mode markdown\n                                mv /tmp/file/$(ls -1rt /tmp/file | tail -n1) /etc/bot/arquivos/${message_document_file_name}\n                                break\n                            }\n                        } || {\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ Error receiving file ❌\")\" \\\n                                --parse_mode markdown\n                            break\n                        }\n                    fi\n                    ;;\n                'Deseja restaurar ? [sim | nao]')\n                    Resp=${message_text[$id]}\n                    [[ ${message_from_id[$id]} != ${id_admin} ]] && break\n                    [[ $Resp != ?(+|-)+([a-z]) ]] && {\n                        ShellBot.sendMessage --chat_id ${id_admin} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\n⚠️ Use only yes or no\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    [[ \"$Resp\" = @(Sim|sim|SIM) ]] && {\n                        filebkp=$(ls /tmp | grep '.vps')\n                        [[ -e /tmp/$filebkp ]] && {\n                            mv /tmp/$filebkp /backup.vps\n                            cd /\n                            tar -xvf backup.vps\n                            rm /backup.vps\n                            ShellBot.sendMessage --chat_id ${id_admin} \\\n                                --text \"$(echo -e \"✅ Backup restored\\nsuccessfully!\")\" \\\n                                --parse_mode html\n                            break\n                        }\n                    }\n                    break\n                    ;;\n                    # FUNCOES DE GESTAO REVENDA\n                    #\n                    # Adicionar, remover, limite, data, suspencao, relatorio\n                    #\n                '👥 ADD DEALER 👥\\n\\nEnter the name:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    echo \"Nome: ${message_text[$id]}\" >$CAD_ARQ\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'Inform his username [Ex: @Dragon_vps_manager]:' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\"\n                    ;;\n                'Inform his username [Ex: @Dragon_vps_manager]:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    _VAR1=$(echo -e ${message_text[$id]} | awk -F '@' {'print $2'})\n                    [[ -z $_VAR1 ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error \\n\\n⚠️ inform the username [EX: @Dragon_vps_manager]\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    [[ -d /etc/bot/revenda/$_VAR1 ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ the dealer ${message_text[$id]} already exists\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    echo \"User: ${message_text[$id]}\" >>$CAD_ARQ\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'How many SSH can it create:' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\"\n                    ;;\n                'How many SSH can it create:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\n⚠️ use only numbers [EX: 10]\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n                        _limTotal=$(grep -w \"${message_from_username}\" $ativos | awk '{print $4}')\n                        fun_verif_limite_rev ${message_from_username}\n                        _limsomarev=$(echo \"$_result + ${message_text[$id]}\" | bc)\n                        [[ \"$_limsomarev\" -gt \"$_limTotal\" ]] && {\n                            _restant1=$(($_limTotal - $_result))\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ you don't have enough limit\\n\\nLimite disponivel: $_restant1 \")\" \\\n                                --parse_mode html\n                            break\n                        }\n                    }\n                    echo \"Limite: ${message_text[$id]}\" >>$CAD_ARQ\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text 'how many days of access:' \\\n                        --reply_markup \"$(ShellBot.ForceReply)\"\n                    ;;\n                'how many days of access:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    echo \"Validade: ${message_text[$id]}\" >>$CAD_ARQ\n                    _clientrev=$(cat $CAD_ARQ)\n                    criar_rev $CAD_ARQ\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text \"✅ successfully created. ✅\\n\\n$(<$CAD_ARQ)\\n\\nBOT: @${message_reply_to_message_from_username}\" \\\n                        --parse_mode html\n                    ;;\n                    # REMOVE REVENDEDOR\n                '🗑 REMOVE DEALER 🗑\\n\\nInform his username [Ex: @Dragon_vps_manager]:')\n                    echo -e \"${message_text[$id]}\" >$CAD_ARQ\n                    _Var=$(sed -n '1 p' $CAD_ARQ | awk -F '@' {'print $2'})\n                    [[ -z $_Var ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ invalid user\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    del_rev $_Var\n                    break\n                    ;;\n                    # ALTERAR LIMITE\n                '♾ CHANGE RESALE LIMIT ♾\\n\\nInform his username [Ex: @Dragon_vps_manager]:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    echo -e \"Dealer: ${message_text[$id]}\" >$CAD_ARQ\n                    _Var1=$(sed -n '1 p' $CAD_ARQ | awk -F '@' {'print $2'})\n                    [[ -z $_Var1 ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Invalid name !\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    [[ \"${message_from_id[$id]}\" == \"$id_admin\" ]] && {\n                        [[ $(grep -wc $_Var1 $ativos) != '0' ]] && {\n                            ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                                --text 'Enter the SSH Limit:' \\\n                                --reply_markup \"$(ShellBot.ForceReply)\"\n                        } || {\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ Dealer ${message_text[$id]} does not exist\")\" \\\n                                --parse_mode html\n                            break\n                        }\n                    }\n                    [[ $(grep -w ${message_from_username} $ativos | awk '{print $NF}') == 'revenda' ]] && {\n                        [[ \"$(grep -wc \"$_Var1\" /etc/bot/revenda/${message_from_username}/${message_from_username})\" != '0' ]] && {\n                            ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                                --text 'Enter the SSH Limit:' \\\n                                --reply_markup \"$(ShellBot.ForceReply)\"\n                        } || {\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ Sub-dealer does not exist\")\" \\\n                                --parse_mode html\n                            break\n                        }\n                    }\n                    ;;\n                'Informe o Limite SSH:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\nuse only numbers [EX: 1]\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n                        _limTotal=$(grep -w \"${message_from_username}\" $ativos | awk '{print $4}')\n                        fun_verif_limite_rev ${message_from_username}\n                        _limsomarev=$(echo \"$_result + ${message_text[$id]}\" | bc)\n\n                        [[ $(grep -wc 'SUBREVENDA' /etc/bot/revenda/${message_from_username}/${message_from_username}) != '0' ]] && {\n                            _limsomarev2=$(echo \"$(grep -w 'SUBREVENDA' /etc/bot/revenda/${message_from_username}/${message_from_username} | awk {'print $4'} | paste -s -d + | bc)\" + \"${message_text[$id]}\" | bc)\n                        } || {\n                            _limsomarev2='0'\n                        }\n                        [[ \"$_limsomarev2\" -ge \"$_limTotal\" ]] && {\n                            echo $_limsomarev2\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ you don't have enough limit\")\" \\\n                                --parse_mode html\n                            break\n                        }\n                        [[ \"$_limsomarev\" -gt \"$_limTotal\" ]] && {\n                            [[ \"$_limTotal\" == \"$(($_limTotal - $_result))\" ]] && _restant1='0' || _restant1=$(($_limTotal - $_result))\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ you don't have enough limit\\n\\nLimite restante: $_restant1 \")\" \\\n                                --parse_mode html\n                            break\n                        }\n                    }\n                    echo -e \"Limite: ${message_text[$id]}\" >>$CAD_ARQ\n                    lim_rev $CAD_ARQ\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text \"$(echo -e \"◈──────────────────◈\\n<b>✅ CHANGED RESALE LIMIT !</b> !\\n◈──────────────────◈\\n\\n$(<$CAD_ARQ)\")\" \\\n                        --parse_mode html\n                    # ALTERAR DATA\n                    ;;\n                '📆 CHANGE RESALE DATE 📆\\n\\nInform his username [Ex: @Dragon_vps_manager]:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    _VAR1=$(echo -e ${message_text[$id]} | awk -F '@' {'print $2'})\n                    [[ -z $_VAR1 ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"Dealer ${message_text[$id]} does not exist\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    [[ \"${message_from_id[$id]}\" == \"$id_admin\" ]] && {\n                        [[ $(grep -wc $_VAR1 $ativos) != '0' ]] && {\n                            echo -e \"Dealer: ${message_text[$id]}\" >$CAD_ARQ\n                            ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                                --text 'Access days [Ex: 30]:' \\\n                                --reply_markup \"$(ShellBot.ForceReply)\"\n                        } || {\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ The Reseller ${message_text[$id]} does not exist\")\" \\\n                                --parse_mode html\n                            break\n                        }\n                    } || {\n                        [[ $(grep -w ${message_from_username} $ativos | awk '{print $NF}') == 'revenda' ]] && {\n                            [[ \"$(grep -wc \"$_VAR1\" /etc/bot/revenda/${message_from_username}/${message_from_username})\" != '0' ]] && {\n                                echo -e \"Dealer: ${message_text[$id]}\" >$CAD_ARQ\n                                ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                                    --text 'Access days [Ex: 30]:' \\\n                                    --reply_markup \"$(ShellBot.ForceReply)\"\n                            } || {\n                                ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                    --text \"$(echo -e \"❌ The SubReseller ${message_text[$id]} does not exist\")\" \\\n                                    --parse_mode html\n                                break\n                            }\n                        }\n                    }\n                    ;;\n                'Access days [Ex: 30]:')\n                    verifica_acesso\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\nuse only numbers [EX: 30]\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    echo -e \"Data: ${message_text[$id]}\" >>$CAD_ARQ\n                    dat_rev $CAD_ARQ\n                    [[ \"$_erro\" == '1' ]] && break\n                    ShellBot.sendMessage --chat_id ${message_from_id[$id]} \\\n                        --text \"$(echo -e \"◈──────────────────◈\\n<b>✅ CHANGED RESALE DATE!</b> !\\n◈──────────────────◈\\n\\n$(<$CAD_ARQ)\")\" \\\n                        --parse_mode html\n                    ;;\n                    # SUSPENDER REVENDEDOR\n                '🔒 SUSPEND DEALER 🔒\\n\\nInform his username [Ex: @Dragon_vps_manager]:')\n                    _VAR1=$(echo -e ${message_text[$id]} | awk -F '@' {'print $2'})\n                    [[ -z $_VAR1 ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Dealer ${message_text[$id]} does not exist\")\" \\\n                            --parse_mode html\n                        break\n                    }\n                    susp_rev $_VAR1\n                    break\n                    ;;\n                '👤 CREATE TEST 👤\\n\\nhow many hours should it last EX: 1:')\n                    verifica_acesso\n                    echo $_erro\n                    [[ \"$_erro\" == '1' ]] && break\n                    [[ ${message_text[$id]} != ?(+|-)+([0-9]) ]] && {\n                        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                            --text \"$(echo -e \"❌ Error ! \\n\\nuse only numbers [EX: 1]\")\" \\\n                            --parse_mode html\n                        >$CAD_ARQ\n                        break\n                    }\n                    [[ \"${message_from_id[$id]}\" != \"$id_admin\" ]] && {\n                        _limTotal=$(grep -w \"${message_from_username}\" $ativos | awk '{print $4}')\n                        fun_verif_limite_rev ${message_from_username}\n                        _limsomarev2=$(echo \"$_result + 1\" | bc)\n                        [[ \"$_limsomarev2\" -gt \"$_limTotal\" ]] && {\n                            ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n                                --text \"$(echo -e \"❌ you don't have enough limit\")\" \\\n                                --parse_mode html\n                            >$CAD_ARQ\n                            break\n                        }\n                    }\n                    fun_teste ${message_text[$id]}\n                    ;;\n                esac\n            fi\n        ) &\n    done\ndone\n#FIM\n"
  },
  {
    "path": "Modulos/botgen",
    "content": "#!/bin/bash\n[[ $(screen -list| grep -c 'bot_gen') == '0' ]] && {\n    clear\n    echo -e \"\\E[44;1;37m     ㅤ🐉ㅤDRAGON VPS MANAGER TELE BOT ACTIVATIONㅤ🐉ㅤ     \\E[0m\"\n    echo \"\"\n    echo -ne \"\\033[1;32m◇ INFORM YOUR BOT TOKEN FROM @BotFather\\033[1;37m: \"; read token\n    echo \"\"\n    echo -ne \"\\033[1;32m◇ INFORM YOUR TELEGRAM ID\\033[1;37m: \"; read idtelegram\n    cd /etc/VPSManager\n    screen -dmS bot_gen ./botgerador $token $idtelegram > /dev/null 2>&1\n    [[ $(grep -wc \"bot_gen\" /etc/autostart) = '0' ]] && {\n                echo -e \"ps x | grep 'bot_gen' | grep -v 'grep' || cd /etc/VPSManager && sudo screen -dmS bot_gen ./botgerador $token $idtelegram && cd $HOME\" >>/etc/autostart\n            } || {\n                sed -i '/bot_gen/d' /etc/autostart\n                echo -e \"ps x | grep 'bot_gen' | grep -v 'grep' || cd /etc/VPSManager && sudo screen -dmS bot_gen ./botgerador $token $idtelegram && cd $HOME\" >>/etc/autostart\n            }  \n    clear && echo \"◇ BOT ACTIVATED!\"\n} || {\n    screen -r -S \"bot_gen\" -X quit\n    clear && echo \"◇ BOT DISABLED!\"\n}\n"
  },
  {
    "path": "Modulos/botgerador",
    "content": "#!/bin/bash\nclear\nsource ShellBot.sh\napi_bot=$1\nid_admin=$2\nShellBot.init --token \"$api_bot\" --monitor --flush\nShellBot.username\n\n# - Funcao menu\nmenu() {\n\n[[ \"${message_from_id[$id]}\" == \"$id_admin\" ]] && {\n\n    local msg\n        msg=\"◇──────────────────◇\\n\"\n        msg+=\"<b>•🔹•ㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ•🔹•</b>\\n\"\n        msg+=\"◇──────────────────◇\\n\\n\"\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n        --text \"$(echo -e $msg)\" \\\n        --reply_markup \"$keyboard1\" \\\n        --parse_mode html\n        return 0\n       \n\n  } \n   ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n    --text \"$(echo -e 🚫 ACCESS DENIED 🚫)\"\n    return 0\n    \n}\n\n# - funcao criar ssh\ncriarssh30() {\n    \n    usuario=$(echo BR$(( RANDOM% + 999999)))\n    senha=$((RANDOM% + 99999))\n    limite='1'\n    tempo='31'\n    final=$(date \"+%Y-%m-%d\" -d \"+$tempo days\")\n    gui=$(date \"+%d/%m/%Y\" -d \"+$tempo days\")\n    pass=$(perl -e 'print crypt($ARGV[0], \"password\")' $senha)\n    \n  if [[ \"$(grep -wc $usuario /etc/passwd)\" != '0' ]]; then\n      ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \\\n        --text \"◇ GENERATED ACCOUNT ALREADY EXISTS! TRY AGAIN\"\n      return 0\n    \n  else\n     useradd -e $final -M -s /bin/false -p $pass $usuario >/dev/null 2>&1\n    (echo \"$senha\";echo \"$senha\") | passwd $usuario > /dev/null 2>&1\n    echo \"$senha\" > /etc/VPSManager/senha/$usuario\n    echo \"$usuario $limite\" >> /root/usuarios.db\n\n    # - ENVIA O SSH\n    ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \\\n    --text \"$(echo -e \"✅ <b>successfully created</b> ✅\\n\\n<b>SERVER</b>: $(cat /etc/IP) \\n<b>USERNAME</b>: <code>$usuario</code>\\n<b>PASSWORD</b>: <code>$senha</code>\\n<b>EXPIRE</b>: 01\\n\\n⏳ Expira em: $gui \")\" \\\n    --parse_mode html\n    return 0\n  fi\n}\n\n# - funcao criar ssh\ncriarssh15() {\n    \n    usuario=$(echo BR$(( RANDOM% + 999999)))\n    senha=$((RANDOM% + 99999))\n    limite='1'\n    tempo='16'\n    final=$(date \"+%Y-%m-%d\" -d \"+$tempo days\")\n    gui=$(date \"+%d/%m/%Y\" -d \"+$tempo days\")\n    pass=$(perl -e 'print crypt($ARGV[0], \"password\")' $senha)\n    \n  if [[ \"$(grep -wc $usuario /etc/passwd)\" != '0' ]]; then\n      ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \\\n        --text \"◇ GENERATED ACCOUNTALREADY EXISTS! TRY AGAIN\"\n      return 0\n    \n  else\n     useradd -e $final -M -s /bin/false -p $pass $usuario >/dev/null 2>&1\n    (echo \"$senha\";echo \"$senha\") | passwd $usuario > /dev/null 2>&1\n    echo \"$senha\" > /etc/VPSManager/senha/$usuario\n    echo \"$usuario $limite\" >> /root/usuarios.db\n\n    # - ENVIA O SSH\n    ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \\\n    --text \"$(echo -e \"✅ <b>pt7gtpgt7pgt7pgt7phpuygypu7o</b> ✅\\n\\n<b>SERVIDOR</b>: $(cat /etc/IP) \\n<b>USUARIO</b>: <code>$usuario</code>\\n<b>SENHA</b>: <code>$senha</code>\\n<b>ACESSO</b>: 01\\n\\n⏳ Expira em: $gui \")\" \\\n    --parse_mode html\n    return 0\n  fi\n}\n\n#informacoes usuario\ninfouser () {\n\tShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n\t--text \"$(echo -e \"Nome:  ${message_from_first_name[$(ShellBot.ListUpdates)]}\\nUser: @${message_from_username[$(ShellBot.ListUpdates)]:-null}\")\\nID: ${message_from_id[$(ShellBot.ListUpdates)]} \" \\\n\t--parse_mode html\n\treturn 0\n}\n\nunset botao1\nbotao1=''\nShellBot.InlineKeyboardButton --button 'botao1' --line 1 --text '30 DAYS SSH ACCOUNT' --callback_data 'gerarssh30'\nShellBot.InlineKeyboardButton --button 'botao1' --line 2 --text '15 DAYS SSH ACCOUNT' --callback_data 'gerarssh15'\n\nShellBot.regHandleFunction --function criarssh30 --callback_data gerarssh30\nShellBot.regHandleFunction --function criarssh15 --callback_data gerarssh15\n\nunset keyboard1\nkeyboard1=\"$(ShellBot.InlineKeyboardMarkup -b 'botao1')\"\nwhile :; do\n  \n ShellBot.getUpdates --limit 100 --offset $(ShellBot.OffsetNext) --timeout 30\n  for id in $(ShellBot.ListUpdates); do\n    (\n      ShellBot.watchHandle --callback_data ${callback_query_data[$id]}\n      comando=(${message_text[$id]})\n      [[ \"${comando[0]}\" = \"/menu\"  || \"${comando[0]}\" = \"/start\" ]] && menu\n      [[ \"${comando[0]}\" = \"/id\"  ]] && infouser\n    ) &\n  done\ndone\n"
  },
  {
    "path": "Modulos/botssh",
    "content": "#!/bin/bash\n\nclear\nfun_bar() {\n    comando[0]=\"$1\"\n    comando[1]=\"$2\"\n    (\n        [[ -e $HOME/fim ]] && rm $HOME/fim\n        ${comando[0]} -y >/dev/null 2>&1\n        ${comando[1]} -y >/dev/null 2>&1\n        touch $HOME/fim\n    ) >/dev/null 2>&1 &\n    tput civis\n    echo -ne \"\\033[1;33m[\"\n    while true; do\n        for ((i = 0; i < 18; i++)); do\n            echo -ne \"\\033[1;31m#\"\n            sleep 0.1s\n        done\n        [[ -e $HOME/fim ]] && rm $HOME/fim && break\n        echo -e \"\\033[1;33m]\"\n        sleep 1s\n        tput cuu1\n        tput dl1\n        echo -ne \"\\033[1;33m[\"\n    done\n    echo -e \"\\033[1;33m]\\033[1;37m -\\033[1;32m OK !\\033[1;37m\"\n    tput cnorm\n}\n\nfun_botOnOff() {\n    [[ $(ps x | grep \"bot_plus\" | grep -v grep | wc -l) = '0' ]] && {\n        clear\n        echo -e \"\\E[44;1;37mㅤ🐉ㅤDRAGON VPS MANAGERㅤTELE BOT INSTALLERㅤ🐉ㅤ\\E[0m\\n\"\n        echo -ne \"\\033[1;32m◇ INFORM YOUR BOT TOKEN:\\033[1;37m \"\n        read tokenbot\n        echo \"\"\n        echo -ne \"\\033[1;32m◇ INFORM YOUR TELEGRAM ID:\\033[1;37m \"\n        read iduser\n        clear\n        echo -e \"\\033[1;32mㅤ🐉ㅤDRAGON VPS MANAGERㅤTELE BOT STARTING...ㅤ🐉ㅤ\\033[0m\\n\"\n        fun_bot1() {\n        \t[[ \"$(grep -wc '16' /etc/issue.net)\" != '0' ]] && {\n        \t\twget -qO- https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/ShellBot.sh > /etc/VPSManager/ShellBot.sh\n        \t}\n            [[ ! -e \"/etc/VPSManager/ShellBot.sh\" ]] && {\n\t\t\t\twget -qO- https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/ShellBot.sh >/etc/VPSManager/ShellBot.sh\n\t\t\t}\n            cd /etc/VPSManager\n            screen -dmS bot_plus ./bot $tokenbot $iduser >/dev/null 2>&1\n            [[ $(grep -wc \"bot_plus\" /etc/autostart) = '0' ]] && {\n                echo -e \"ps x | grep 'bot_plus' | grep -v 'grep' || cd /etc/VPSManager && sudo screen -dmS bot_plus ./bot $tokenbot $iduser && cd $HOME\" >>/etc/autostart\n            } || {\n                sed -i '/bot_plus/d' /etc/autostart\n                echo -e \"ps x | grep 'bot_plus' | grep -v 'grep' || cd /etc/VPSManager && sudo screen -dmS bot_plus ./bot $tokenbot $iduser && cd $HOME\" >>/etc/autostart\n            }\n            [[ $(crontab -l | grep -c \"verifbot\") = '0' ]] && (\n                crontab -l 2>/dev/null\n                echo \"@daily /bin/verifbot\"\n            ) | crontab -\n            cd $HOME\n        }\n        fun_bar 'fun_bot1'\n        [[ $(ps x | grep \"bot_plus\" | grep -v grep | wc -l) != '0' ]] && echo -e \"\\n\\033[1;32m🐉ㅤDRAGON VPS MANAGERㅤTELE BOT ENABLED!ㅤ🐉\\033[0m\" || echo -e \"\\n\\033[1;31m◇ MISTAKE! REANALYZE YOUR INFORMATION\\033[0m\"\n        sleep 2\n        menu\n    } || {\n        clear\n        echo -e \"\\033[1;32m🐉ㅤDRAGON VPS MANAGERㅤTELE BOT STOPPING...ㅤ🐉\\033[0m\\n\"\n        fun_bot2() {\n            screen -r -S \"bot_plus\" -X quit\n            screen -wipe 1>/dev/null 2>/dev/null\n            [[ $(grep -wc \"bot_plus\" /etc/autostart) != '0' ]] && {\n                sed -i '/bot_plus/d' /etc/autostart\n            }\n            [[ $(crontab -l | grep -c \"verifbot\") != '0' ]] && crontab -l | grep -v 'verifbot' | crontab -\n            sleep 1\n        }\n        fun_bar 'fun_bot2'\n        echo -e \"\\n\\033[1;32m \\033[1;31m🐉ㅤDRAGON VPS MANAGERㅤTELE BOT STOPPED!ㅤ🐉\\033[0m\"\n        sleep 2\n        menu\n    }\n}\n\nfun_instbot() {\n    echo -e \"\\E[44;1;37mㅤ🐉ㅤDRAGON VPS MANAGERㅤTELE BOT INSTALLERㅤ🐉ㅤ\\E[0m\\n\"\n    echo -e \"                 \\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[1;31mATTENTION! \\033[1;33m[\\033[1;31m!\\033[1;33m]\\033[0m\"\n    echo -e \"\\n\\033[1;32m1° \\033[1;37m- \\033[1;33mTHROUGH YOUR TELEGRAM ACCOUNT, ACCESS THE FOLLOWING BOT\\033[1;37m:\\033[0m\"\n    echo -e \"\\n\\033[1;32m2° \\033[1;37m- \\033[1;33mBOT \\033[1;37m@BotFather \\033[1;33mCREATE YOUR BOT \\033[1;31mSEND TO @Botfather: \\033[1;37m/newbot\\033[0m\"\n    echo -e \"\\n\\033[1;32m3° \\033[1;37m- \\033[1;33mBOT \\033[1;37m@TwincyBot \\033[1;33mAND GET YOUR ID \\033[1;31mSEND TO @TwincyBot: \\033[1;37m/id\\033[0m\"\n    echo -e \"\\033[0;34m◇────────────────────────────────────────────────◇\\033[1;32m\"\n    echo \"\"\n    read -p \"◇ DO YOU WISH TO CONTINUE ? [s/n]: \" -e -i s resposta\n    [[ \"$resposta\" = 's' ]] && {\n        fun_botOnOff\n    } || {\n        echo -e \"\\n\\033[1;31m◇ Returning...\\033[0m\"\n        sleep 2\n        menu\n    }\n}\n[[ -f \"/etc/VPSManager/ShellBot.sh\" ]] && fun_botOnOff || fun_instbot\n#fim\n"
  },
  {
    "path": "Modulos/botsshteste",
    "content": "#!/bin/bash\nclear\nsource ShellBot.sh\ntouch lista\n\n[[ ! -e RESET ]] && touch RESET\napi_bot=$1\nShellBot.init --token \"$api_bot\" --monitor --flush\nShellBot.username\n\n# - Funcao menu\nmenu() {\n    local msg\n        msg=\"◇──────────────────◇\\n\"\n        msg+=\"<b>•🔹• HELLO WELCOME •🔹•</b>\\n\"\n        msg+=\"◇──────────────────◇\\n\\n\"\n        msg+=\"ssh account R$ 10/Month\"\n        ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n        --text \"$(echo -e $msg)\" \\\n        --reply_markup \"$keyboard1\" \\\n        --parse_mode html\n        return 0\n}\n\n# - funcao criar ssh\ncriarteste() {\n    [[ $(grep -wc ${callback_query_from_id} lista) != '0' ]] && {\n      ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \\\n        --text \"YOU HAVE ALREADY CREATED YOUR TEST!\"\n      return 0\n    }\n    usuario=$(echo TESTE$(( RANDOM% + 250 )))\n    senha=$((RANDOM% + 99999))\n    limite='1'\n    tempo='1'\n    tuserdate=$(date '+%C%y/%m/%d' -d \" +1 days\")\n    useradd -M -N -s /bin/false $usuario -e $tuserdate > /dev/null 2>&1\n    (echo \"$senha\";echo \"$senha\") | passwd $usuario > /dev/null 2>&1\n    echo \"$senha\" > /etc/VPSManager/senha/$usuario\n    echo \"$usuario $limite\" >> /root/usuarios.db\n    echo \"#!/bin/bash\npkill -f \"$usuario\"\nuserdel --force $usuario\ngrep -v ^$usuario[[:space:]] /root/usuarios.db > /tmp/ph ; cat /tmp/ph > /root/usuarios.db\nrm /etc/VPSManager/senha/$usuario > /dev/null 2>&1\nrm -rf /etc/VPSManager/userteste/$usuario.sh\" > /etc/VPSManager/userteste/$usuario.sh\n    chmod +x /etc/VPSManager/userteste/$usuario.sh\n    at -f /etc/VPSManager/userteste/$usuario.sh now + $tempo hour > /dev/null 2>&1\n    echo ${callback_query_from_id} >> lista\n    # - ENVIA O SSH\n    ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \\\n    --text \"$(echo -e \"✅ <b>successfully created</b> ✅\\n\\nSERVER: $(cat /etc/IP) \\n\\nUSER: <code>$usuario</code>\\nPASSWORD: <code>$senha</code>\\n\\n⏳ Expires in: $tempo Hora\")\" \\\n    --parse_mode html\n    return 0\n}\n\n#informacoes usuario\ninfouser () {\n\tShellBot.sendMessage --chat_id ${message_chat_id[$id]} \\\n\t--text \"$(echo -e \"Nome:  ${message_from_first_name[$(ShellBot.ListUpdates)]}\\nUser: @${message_from_username[$(ShellBot.ListUpdates)]:-null}\")\\nID: ${message_from_id[$(ShellBot.ListUpdates)]} \" \\\n\t--parse_mode html\n\treturn 0\n}\n\n#informacoes usuario\npix () {\n\t ShellBot.sendMessage --chat_id ${callback_query_message_chat_id} \\\n\t--text \"$(echo -e \"<b>ssh account R$ 10/Month \\n\\nCOPY THE RANDOM PIX KEY</b>\\n <code>b54bc1c3-c892-4b3a-a7ac-73a46f9eefa3</code>\")\" \\\n\t--parse_mode html\n\treturn 0\n}\n\nunset botao1\nbotao1=''\nShellBot.InlineKeyboardButton --button 'botao1' --line 1 --text 'CREATE TEST' --callback_data 'gerarssh'\nShellBot.InlineKeyboardButton --button 'botao1' --line 2 --text 'TELEGRAM CONTACT' --callback_data '2' --url 'https://https://t.me/SD_VPS_MANAGER' \nShellBot.InlineKeyboardButton --button 'botao1' --line 3 --text 'TELEGRAM CONTACT' --callback_data '3' --url 'https://https://t.me/SD_VPS_MANAGER' \nShellBot.InlineKeyboardButton --button 'botao1' --line 4 --text 'TELEGRAM CONTACT' --callback_data 'pay'\nShellBot.InlineKeyboardButton --button 'botao1' --line 4 --text 'TELEGRAM CONTACT' --callback_data '4' --url 'https://https://t.me/SD_VPS_MANAGER' \nShellBot.regHandleFunction --function criarteste --callback_data gerarssh\nShellBot.regHandleFunction --function pix --callback_data pay\n\nunset keyboard1\nkeyboard1=\"$(ShellBot.InlineKeyboardMarkup -b 'botao1')\"\nwhile :; do\n   [[ \"$(date +%d +5days)\" != \"$(cat RESET)\" ]] && {\n   \techo $(date +%d +5days) > RESET\n   \techo ' ' > lista\n   }\n  ShellBot.getUpdates --limit 100 --offset $(ShellBot.OffsetNext) --timeout 30\n  for id in $(ShellBot.ListUpdates); do\n    (\n      ShellBot.watchHandle --callback_data ${callback_query_data[$id]}\n      comando=(${message_text[$id]})\n      [[ \"${comando[0]}\" = \"/menu\"  || \"${comando[0]}\" = \"/start\" ]] && menu\n      [[ \"${comando[0]}\" = \"/id\"  ]] && infouser\n    ) &\n  done\ndone\n"
  },
  {
    "path": "Modulos/botteste",
    "content": "#!/bin/bash\n[[ $(screen -list| grep -c 'bot_teste') == '0' ]] && {\n    clear\n    echo -e \"\\E[44;1;37m◇    BOT SSH TEST ACTIVATION     \\E[0m\"\n    echo \"\"\n    echo -ne \"\\033[1;32m◇ INFORM THE TELEGRAM BOT TOKEN\\033[1;37m: \"; read token\n    cd /etc/VPSManager\n    screen -dmS bot_teste ./botsshteste $token > /dev/null 2>&1\n    [[ $(grep -wc \"bot_teste\" /etc/autostart) = '0' ]] && {\n                echo -e \"ps x | grep 'bot_teste' | grep -v 'grep' || cd /etc/VPSManager && sudo screen -dmS bot_teste ./botsshteste $token && cd $HOME\" >>/etc/autostart\n            } || {\n                sed -i '/bot_teste/d' /etc/autostart\n                echo -e \"ps x | grep 'bot_teste' | grep -v 'grep' || cd /etc/VPSManager && sudo screen -dmS bot_teste ./botsshteste $token && cd $HOME\" >>/etc/autostart\n            }  \n    clear && echo \"◇ BOT ACTIVATED!\"\n} || {\n    screen -r -S \"bot_teste\" -X quit\n    clear && echo \"◇ BOT DEACTIVATED!\"\n}\n"
  },
  {
    "path": "Modulos/cabecalho",
    "content": "#!/bin/bash\nclear"
  },
  {
    "path": "Modulos/conexao",
    "content": "#!/bin/bash\n\ncor1='\\033[41;1;37m'\ncor2='\\033[44;1;37m'\nscor='\\033[0m'\nGREEN='\\033[1;32m'\nYELLOW='\\033[1;33m'\nSCOLOR='\\033[0m'\n[[ $(awk -F\" \" '{print $2}' /usr/lib/licence) == \"@DRAGON_VPS_MANAGER\" ]] && {\n\tram1=$(free -h | grep -i mem | awk {'print $2'})\n\tram2=$(free -h | grep -i mem | awk {'print $4'})\n\tram3=$(free -h | grep -i mem | awk {'print $3'})\n\tuso=$(top -bn1 | awk '/Cpu/ { cpu = \"\" 100 - $8 \"%\" }; END { print cpu }')\n\tsystem=$(cat /etc/issue.net)\n\tfun_bar() {\n\t\tcomando[0]=\"$1\"\n\t\tcomando[1]=\"$2\"\n\t\t(\n\t\t\t[[ -e $HOME/fim ]] && rm $HOME/fim\n\t\t\t[[ ! -d /etc/VPSManager ]] && rm -rf /bin/menu\n\t\t\t${comando[0]} >/dev/null 2>&1\n\t\t\t${comando[1]} >/dev/null 2>&1\n\t\t\ttouch $HOME/fim\n\t\t) >/dev/null 2>&1 &\n\t\ttput civis\n\t\techo -ne \"\\033[1;33mPLEASE WAIT... \\033[1;37m- \\033[1;33m[\"\n\t\twhile true; do\n\t\t\tfor ((i = 0; i < 18; i++)); do\n\t\t\t\techo -ne \"\\033[1;31m#\"\n\t\t\t\tsleep 0.1s\n\t\t\tdone\n\t\t\t[[ -e $HOME/fim ]] && rm $HOME/fim && break\n\t\t\techo -e \"\\033[1;33m]\"\n\t\t\tsleep 1s\n\t\t\ttput cuu1\n\t\t\ttput dl1\n\t\t\techo -ne \"\\033[1;33mPLEASE WAIT... \\033[1;37m- \\033[1;33m[\"\n\t\tdone\n\t\techo -e \"\\033[1;33m]\\033[1;37m -\\033[1;32m DONE !\\033[1;37m\"\n\t\ttput cnorm\n\t}\n\n\tverif_ptrs() {\n\t\tporta=$1\n\t\tPT=$(lsof -V -i tcp -P -n | grep -v \"ESTABLISHED\" | grep -v \"COMMAND\" | grep \"LISTEN\")\n\t\tfor pton in $(echo -e \"$PT\" | cut -d: -f2 | cut -d' ' -f1 | uniq); do\n\t\t\tsvcs=$(echo -e \"$PT\" | grep -w \"$pton\" | awk '{print $1}' | uniq)\n\t\t\t[[ \"$porta\" = \"$pton\" ]] && {\n\t\t\t\techo -e \"\\n\\033[1;31mPORT \\033[1;33m$porta \\033[1;31mIN USE BY \\033[1;37m$svcs\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\tdone\n\t}\n\n\tinst_sqd() {\n\t\tif netstat -nltp | grep 'squid' 1>/dev/null 2>/dev/null; then\n\t\t\techo -e \"\\E[41;1;37m            REMOVE SQUID PROXY              \\E[0m\"\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;32mREALLY WANT TO REMOVE SQUID \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"\n\t\t\tread resp\n\t\t\t[[ \"$resp\" = 's' ]] && {\n\t\t\t\techo -e \"\\n\\033[1;32mREMOVING THE SQUID PROXY !\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\trem_sqd() {\n\t\t\t\t\t[[ -d \"/etc/squid\" ]] && {\n\t\t\t\t\t\tapt-get remove squid -y >/dev/null 2>&1\n\t\t\t\t\t\tapt-get purge squid -y >/dev/null 2>&1\n\t\t\t\t\t\trm -rf /etc/squid >/dev/null 2>&1\n\t\t\t\t\t}\n\t\t\t\t\t[[ -d \"/etc/squid3\" ]] && {\n\t\t\t\t\t\tapt-get remove squid3 -y >/dev/null 2>&1\n\t\t\t\t\t\tapt-get purge squid3 -y >/dev/null 2>&1\n\t\t\t\t\t\trm -rf /etc/squid3 >/dev/null 2>&1\n\t\t\t\t\t\tapt autoremove -y >/dev/null 2>&1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfun_bar 'rem_sqd'\n\t\t\t\techo -e \"\\n\\033[1;32mSQUID SUCCESSFULLY REMOVED !\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\t} || {\n\t\t\t\techo -e \"\\n\\033[1;31mreturning...\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\telse\n\t\t\tclear\n\t\t\techo -e \"\\E[44;1;37m              SQUID INSTALLER                \\E[0m\"\n\t\t\techo \"\"\n\t\t\tIP=$(wget -qO- ipv4.icanhazip.com)\n\t\t\techo -ne \"\\033[1;32mTO CONTINUE CONFIRM YOUR IP: \\033[1;37m\"\n\t\t\tread -e -i $IP ipdovps\n\t\t\t[[ -z \"$ipdovps\" ]] && {\n\t\t\t\techo -e \"\\n\\033[1;31mInvalid IP\\033[1;32m\"\n\t\t\t\techo \"\"\n\t\t\t\tread -p \"Digite seu IP: \" IP\n\t\t\t}\n\t\t\techo -e \"\\n\\033[1;33mWHICH DOORS DO YOU WANT TO USE ON THE SQUID \\033[1;31m?\"\n\t\t\techo -e \"\\n\\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[1;32mDEFINE THE PORTS IN SEQUENCE \\033[1;33mEX: \\033[1;37m80 8080\"\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;32mINFORM THE PORTS\\033[1;37m: \"\n\t\t\tread portass\n\t\t\t[[ -z \"$portass\" ]] && {\n\t\t\t\techo -e \"\\n\\033[1;31mINVALID PORT!\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\t\tfor porta in $(echo -e $portass); do\n\t\t\t\tverif_ptrs $porta\n\t\t\tdone\n\t\t\t[[ $(grep -wc '14' /etc/issue.net) != '0' ]] || [[ $(grep -wc '8' /etc/issue.net) != '0' ]] && {\n\t\t\t\techo -e \"\\n\\033[1;32mINSTALLING SQUID PROXY\\033[0m\\n\"\n\t\t\t\tfun_bar 'apt update -y' \"apt install squid3 -y\"\n\t\t\t} || {\n\t\t\t\techo -e \"\\n\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mSQUID VERSION 3.3.X\\n\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mSQUID VERSION 3.5.X\\033[0m\\n\"\n\t\t\t\tread -p \"$(echo -e \"\\033[1;32mENTER AN OPTION \\033[1;37m: \")\" -e -i 1 opc\n\t\t\t\t[[ -z \"$opc\" ]] && {\n\t\t\t\t\techo -e \"\\n\\033[1;31mInvalid option!\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\t[[ \"$opc\" != '1' ]] && {\n\t\t\t\t\t[[ \"$opc\" != '2' ]] && {\n\t\t\t\t\t\techo -e \"\\n\\033[1;31mInvalid option !\"\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\tfun_conexao\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo -e \"\\n\\033[1;32mINSTALLING SQUID PROXY\\033[0m\\n\"\n\t\t\t\tfun_bar 'apt update -y' \"instsqd $opc\"\n\t\t\t}\n\t\t\tif [[ -d \"/etc/squid/\" ]]; then\n\t\t\t\tvar_sqd=\"/etc/squid/squid.conf\"\n\t\t\t\tvar_pay=\"/etc/squid/payload.txt\"\n\t\t\telif [[ -d \"/etc/squid3/\" ]]; then\n\t\t\t\tvar_sqd=\"/etc/squid3/squid.conf\"\n\t\t\t\tvar_pay=\"/etc/squid3/payload.txt\"\n\t\t\telse\n\t\t\t\techo -e \"\\n\\033[1;33m[\\033[1;31mERROR!\\033[1;33m]\\033[1;37m: \\033[1;33mSQUID PROXY CORRUPT\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\tfi\n\t\t\tcat <<-EOF >$var_pay\n\t\t\t\t.whatsapp.net/\n\t\t\t\t.facebook.net/\n\t\t\t\t.twitter.com/\n\t\t\t\t.speedtest.net/\n\t\t\tEOF\n\t\t\tcat <<-EOF >$var_sqd\n\t\t\t\tacl url1 dstdomain -i 127.0.0.1\n\t\t\t\tacl url2 dstdomain -i localhost\n\t\t\t\tacl url3 dstdomain -i $ipdovps\n\t\t\t\tacl url4 dstdomain -i /VPSMANAGER?\n\t\t\t\tacl payload url_regex -i \"$var_pay\"\n\t\t\t\tacl all src 0.0.0.0/0\n\n\t\t\t\thttp_access allow url1\n\t\t\t\thttp_access allow url2\n\t\t\t\thttp_access allow url3\n\t\t\t\thttp_access allow url4\n\t\t\t\thttp_access allow payload\n\t\t\t\thttp_access deny all\n\t\t\t\t \n\t\t\t\t#Portas\n\t\t\tEOF\n\t\t\tfor Pts in $(echo -e $portass); do\n\t\t\t\techo -e \"http_port $Pts\" >>$var_sqd\n\t\t\t\t[[ -f \"/usr/sbin/ufw\" ]] && ufw allow $Pts/tcp\n\t\t\tdone\n\t\t\tcat <<-EOF >>$var_sqd\n\t\t\t\t#Nome squid\n\t\t\t\tvisible_hostname VPSMANAGER \n\t\t\t\tvia off\n\t\t\t\tforwarded_for off\n\t\t\t\tpipeline_prefetch off\n\t\t\tEOF\n\t\t\tsqd_conf() {\n\t\t\t\t[[ -d \"/etc/squid/\" ]] && {\n\t\t\t\t\tservice ssh restart\n\t\t\t\t\t/etc/init.d/squid restart\n\t\t\t\t\tservice squid restart\n\t\t\t\t}\n\t\t\t\t[[ -d \"/etc/squid3/\" ]] && {\n\t\t\t\t\tservice ssh restart\n\t\t\t\t\t/etc/init.d/squid3 restart\n\t\t\t\t\tservice squid3 restart\n\t\t\t\t}\n\t\t\t}\n\t\t\techo -e \"\\n\\033[1;32mSETTING SQUID PROXY\\033[0m\"\n\t\t\techo \"\"\n\t\t\tfun_bar 'sqd_conf'\n\t\t\techo -e \"\\n\\033[1;32mSQUID INSTALLED SUCCESSFULLY!\\033[0m\"\n\t\t\tsleep 2.5s\n\t\t\tfun_conexao\n\t\tfi\n\t}\n\n\taddpt_sqd() {\n\t\techo -e \"\\E[44;1;37m         ADD PORT TO SQUID         \\E[0m\"\n\t\techo -e \"\\n\\033[1;33mPORTS IN USE: \\033[1;32m$sqdp\\n\"\n\t\tif [[ -f \"/etc/squid/squid.conf\" ]]; then\n\t\t\tvar_sqd=\"/etc/squid/squid.conf\"\n\t\telif [[ -f \"/etc/squid3/squid.conf\" ]]; then\n\t\t\tvar_sqd=\"/etc/squid3/squid.conf\"\n\t\telse\n\t\t\techo -e \"\\n\\033[1;31mSQUID IS NOT INSTALLED!\\033[0m\"\n\t\t\techo -e \"\\n\\033[1;31mreturning...\\033[0m\"\n\t\t\tsleep 2\n\t\t\tclear\n\t\t\tfun_squid\n\t\tfi\n\t\techo -ne \"\\033[1;32mWHICH PORT DO YOU WANT TO ADD \\033[1;33m?\\033[1;37m \"\n\t\tread pt\n\t\t[[ -z \"$pt\" ]] && {\n\t\t\techo -e \"\\n\\033[1;31mInvalid port!\"\n\t\t\tsleep 2\n\t\t\tclear\n\t\t\tfun_conexao\n\t\t}\n\t\tverif_ptrs $pt\n\t\techo -e \"\\n\\033[1;32mADDING PORT TO SQUID!\"\n\t\techo \"\"\n\t\tsed -i \"s/#Portas/#Portas\\nhttp_port $pt/g\" $var_sqd\n\t\tfun_bar 'sleep 2'\n\t\techo -e \"\\n\\033[1;32mRESETTING THE SQUID!\"\n\t\techo \"\"\n\t\tfun_bar 'service squid restart' 'service squid3 restart'\n\t\techo -e \"\\n\\033[1;32mSUCCESSFULLY ADDED PORT!\"\n\t\tsleep 3\n\t\tclear\n\t\tfun_squid\n\t}\n\n\trempt_sqd() {\n\t\techo -e \"\\E[41;1;37m        REMOVE PORT FROM SQUID        \\E[0m\"\n\t\techo -e \"\\n\\033[1;33mPORTAS EM USO: \\033[1;32m$sqdp\\n\"\n\t\tif [[ -f \"/etc/squid/squid.conf\" ]]; then\n\t\t\tvar_sqd=\"/etc/squid/squid.conf\"\n\t\telif [[ -f \"/etc/squid3/squid.conf\" ]]; then\n\t\t\tvar_sqd=\"/etc/squid3/squid.conf\"\n\t\telse\n\t\t\techo -e \"\\n\\033[1;31mSQUID IS NOT INSTALLED!\\033[0m\"\n\t\t\techo -e \"\\n\\033[1;31mreturning...\\033[0m\"\n\t\t\tsleep 2\n\t\t\tclear\n\t\t\tfun_squid\n\t\tfi\n\t\techo -ne \"\\033[1;32mWHICH PORT DO YOU WANT TO REMOVE \\033[1;33m?\\033[1;37m \"\n\t\tread pt\n\t\t[[ -z \"$pt\" ]] && {\n\t\t\techo -e \"\\n\\033[1;31mInvalid port!\"\n\t\t\tsleep 2\n\t\t\tclear\n\t\t\tfun_conexao\n\t\t}\n\t\tif grep -E \"$pt\" $var_sqd >/dev/null 2>&1; then\n\t\t\techo -e \"\\n\\033[1;32mREMOVING SQUID PORT!\"\n\t\t\techo \"\"\n\t\t\tsed -i \"/http_port $pt/d\" $var_sqd\n\t\t\tfun_bar 'sleep 3'\n\t\t\techo -e \"\\n\\033[1;32mRESETTING THE SQUID!\"\n\t\t\techo \"\"\n\t\t\tfun_bar 'service squid restart' 'service squid3 restart'\n\t\t\techo -e \"\\n\\033[1;32mPORT SUCCESSFULLY REMOVED!\"\n\t\t\tsleep 3.5s\n\t\t\tclear\n\t\t\tfun_squid\n\t\telse\n\t\t\techo -e \"\\n\\033[1;31mPORT \\033[1;32m$pt \\033[1;31mNOT FOUND!\"\n\t\t\tsleep 3.5s\n\t\t\tclear\n\t\t\tfun_squid\n\t\tfi\n\t}\n\n\tfun_squid() {\n\t\t[[ \"$(netstat -nplt | grep -c 'squid')\" = \"0\" ]] && inst_sqd\n\t\techo -e \"\\E[44;1;37m          MANAGE SQUID PROXY           \\E[0m\"\n\t\t[[ \"$(netstat -nplt | grep -c 'squid')\" != \"0\" ]] && {\n\t\t\tsqdp=$(netstat -nplt | grep 'squid' | awk -F \":\" {'print $4'} | xargs)\n\t\t\techo -e \"\\n\\033[1;33mPORTS\\033[1;37m: \\033[1;32m$sqdp\"\n\t\t\tVarSqdOn=\"REMOVER SQUID PROXY\"\n\t\t} || {\n\t\t\tVarSqdOn=\"INSTALAR SQUID PROXY\"\n\t\t}\n\t\techo -e \"\\n\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33m$VarSqdOn \\033[1;31m\n[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mADD PORT \\033[1;31m\n[\\033[1;36m3\\033[1;31m] \\033[1;37m• \\033[1;33mREMOVE PORT\\033[1;31m\n[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[0m\"\n\t\techo \"\"\n\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;31m?\\033[1;37m \"\n\t\tread x\n\t\tclear\n\t\tcase $x in\n\t\t1 | 01)\n\t\t\tinst_sqd\n\t\t\t;;\n\t\t2 | 02)\n\t\t\taddpt_sqd\n\t\t\t;;\n\t\t3 | 03)\n\t\t\trempt_sqd\n\t\t\t;;\n\t\t0 | 00)\n\t\t\techo -e \"\\033[1;31mreturning...\\033[0m\"\n\t\t\tsleep 1\n\t\t\tfun_conexao\n\t\t\t;;\n\t\t*)\n\t\t\techo -e \"\\033[1;31mInvalid option...\\033[0m\"\n\t\t\tsleep 2\n\t\t\tfun_conexao\n\t\t\t;;\n\t\tesac\n\t}\n\n\tfun_drop() {\n\t\tif netstat -nltp | grep 'dropbear' 1>/dev/null 2>/dev/null; then\n\t\t\tclear\n\t\t\t[[ $(netstat -nltp | grep -c 'dropbear') != '0' ]] && dpbr=$(netstat -nplt | grep 'dropbear' | awk -F \":\" {'print $4'} | xargs) || sqdp=\"\\033[1;31mINDISPONIVEL\"\n\t\t\tif ps x | grep \"limiter\" | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\tstats='\\033[1;32m♦ '\n\t\t\telse\n\t\t\t\tstats='\\033[1;31m○ '\n\t\t\tfi\n\t\t\techo -e \"\\E[44;1;37m              MANAGE DROPBEAR               \\E[0m\"\n\t\t\techo -e \"\\n\\033[1;33mPORTAS\\033[1;37m: \\033[1;32m$dpbr\"\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mDROPBEAR LIMITER $stats\\033[0m\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mCHANGE DROPBEAR PORT\\033[0m\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m] \\033[1;37m• \\033[1;33mREMOVE DROPBEAR\\033[0m\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[0m\"\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;37m \"\n\t\t\tread resposta\n\t\t\tif [[ \"$resposta\" = '1' ]]; then\n\t\t\t\tclear\n\t\t\t\tif ps x | grep \"limiter\" | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\t\techo -e \"\\033[1;32mstopping the limiter... \\033[0m\"\n\t\t\t\t\techo \"\"\n\t\t\t\t\tfun_stplimiter() {\n\t\t\t\t\t\tpidlimiter=$(ps x | grep \"limiter\" | awk -F \"pts\" {'print $1'})\n\t\t\t\t\t\tkill -9 $pidlimiter\n\t\t\t\t\t\tscreen -wipe\n\t\t\t\t\t}\n\t\t\t\t\tfun_bar 'fun_stplimiter' 'sleep 2'\n\t\t\t\t\techo -e \"\\n\\033[1;31m LIMIT DISABLED \\033[0m\"\n\t\t\t\t\tsleep 3\n\t\t\t\t\tfun_drop\n\t\t\t\telse\n\t\t\t\t\techo -e \"\\n\\033[1;32mStarting the limiter... \\033[0m\"\n\t\t\t\t\techo \"\"\n\t\t\t\t\tfun_bar 'screen -d -m -t limiter droplimiter' 'sleep 3'\n\t\t\t\t\techo -e \"\\n\\033[1;32m  LIMITER ENABLED \\033[0m\"\n\t\t\t\t\tsleep 3\n\t\t\t\t\tfun_drop\n\t\t\t\tfi\n\t\t\telif [[ \"$resposta\" = '2' ]]; then\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT YOU WANT TO USE \\033[1;33m?\\033[1;37m \"\n\t\t\t\tread pt\n\t\t\t\techo \"\"\n\t\t\t\tverif_ptrs $pt\n\t\t\t\tvar1=$(grep 'DROPBEAR_PORT=' /etc/default/dropbear | cut -d'=' -f2)\n\t\t\t\techo -e \"\\033[1;32mCHANGING DROPBEAR PORT!\"\n\t\t\t\tsed -i \"s/\\b$var1\\b/$pt/g\" /etc/default/dropbear >/dev/null 2>&1\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'sleep 2'\n\t\t\t\techo -e \"\\n\\033[1;32mRESTARTING DROPBEAR!\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'service dropbear restart' '/etc/init.d/dropbear restart'\n\t\t\t\techo -e \"\\n\\033[1;32mSUCCESSFULLY CHANGED PORT!\"\n\t\t\t\tsleep 3\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\telif [[ \"$resposta\" = '3' ]]; then\n\t\t\t\techo -e \"\\n\\033[1;32mREMOVING THE DROPBEAR!\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_dropunistall() {\n\t\t\t\t\tservice dropbear stop && /etc/init.d/dropbear stop\n\t\t\t\t\tapt-get autoremove dropbear -y\n\t\t\t\t\tapt-get remove dropbear-run -y\n\t\t\t\t\tapt-get remove dropbear -y\n\t\t\t\t\tapt-get purge dropbear -y\n\t\t\t\t\trm -rf /etc/default/dropbear\n\t\t\t\t}\n\t\t\t\tfun_bar 'fun_dropunistall'\n\t\t\t\techo -e \"\\n\\033[1;32mSUCCESSFULLY REMOVED DROPBEAR !\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\telif [[ \"$resposta\" = '0' ]]; then\n\t\t\t\techo -e \"\\n\\033[1;31mReturning...\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\telse\n\t\t\t\techo -e \"\\n\\033[1;31mInvalid option...\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\tfi\n\t\telse\n\t\t\tclear\n\t\t\techo -e \"\\E[44;1;37m           DROPBEAR INSTALLER              \\E[0m\"\n\t\t\techo -e \"\\n\\033[1;33mVC ARE ABOUT TO INSTALL DROPBEAR !\\033[0m\\n\"\n\t\t\techo -ne \"\\033[1;32mDO YOU WISH TO CONTINUE \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"\n\t\t\tread resposta\n\t\t\t[[ \"$resposta\" = 's' ]] && {\n\t\t\t\techo -e \"\\n\\033[1;33mDEFINE A PORT FOR DROPBEAR !\\033[0m\\n\"\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT \\033[1;33m?\\033[1;37m \"\n\t\t\t\tread porta\n\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\techo -e \"\\n\\033[1;31mInvalid port!\"\n\t\t\t\t\tsleep 3\n\t\t\t\t\tclear\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\tverif_ptrs $porta\n\t\t\t\techo -e \"\\n\\033[1;32mINSTALLING DROPBEAR ! \\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_instdrop() {\n\t\t\t\t\tapt-get update -y\n\t\t\t\t\tapt-get install dropbear -y\n\t\t\t\t}\n\t\t\t\tfun_bar 'fun_instdrop'\n\t\t\t\tfun_ports() {\n\t\t\t\t\tsed -i 's/NO_START=1/NO_START=0/g' /etc/default/dropbear >/dev/null 2>&1\n\t\t\t\t\tsed -i \"s/DROPBEAR_PORT=22/DROPBEAR_PORT=$porta/g\" /etc/default/dropbear >/dev/null 2>&1\n\t\t\t\t\tsed -i 's/DROPBEAR_EXTRA_ARGS=/DROPBEAR_EXTRA_ARGS=\"-p 110\"/g' /etc/default/dropbear >/dev/null 2>&1\n\t\t\t\t}\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSETTING PORT DROPBEAR!\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_ports'\n\t\t\t\tgrep -v \"^PasswordAuthentication yes\" /etc/ssh/sshd_config >/tmp/passlogin && mv /tmp/passlogin /etc/ssh/sshd_config\n\t\t\t\techo \"PasswordAuthentication yes\" >>/etc/ssh/sshd_config\n\t\t\t\tgrep -v \"^PermitTunnel yes\" /etc/ssh/sshd_config >/tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config\n\t\t\t\techo \"PermitTunnel yes\" >>/etc/ssh/sshd_config\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mFINISHING INSTALLATION !\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_ondrop() {\n\t\t\t\t\tservice dropbear start\n\t\t\t\t\t/etc/init.d/dropbear restart\n\t\t\t\t}\n\t\t\t\tfun_bar 'fun_ondrop' 'sleep 1'\n\t\t\t\techo -e \"\\n\\033[1;32mINSTALLATION COMPLETED \\033[1;33mPORT: \\033[1;37m$porta\\033[0m\"\n\t\t\t\t[[ $(grep -c \"/bin/false\" /etc/shells) = '0' ]] && echo \"/bin/false\" >>/etc/shells\n\t\t\t\tsleep 2\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\t} || {\n\t\t\t\techo\"\"\n\t\t\t\techo -e \"\\033[1;31mReturning...\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\tfi\n\t}\n    fun_chisel() {\n\t\tclear\n\t\techo -e \"\\E[44;1;37m            MANAGE CHISEL             \\E[0m\"\n\t\techo \"\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mACTIVATE CHISEL\\033[0m\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mRESET CHISEL\\033[0m\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[0m\"\n\t\techo \"\"\n\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;37m \"\n\t\tread resposta\n\t\tif [[ \"$resposta\" = '1' ]]; then\n\t\t\tif netstat -nltp | grep 'docker' 1>/dev/null 2>/dev/null; then\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[41;1;37m             CHISEL              \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_chiseloff() {\n\t\t\t\t\tdocker stop chisel\n                    docker rm chisel\n\t\t\t\t\tdocker.io stop chisel\n                    docker.io rm chisel\n\n\t\t\t\t}\n\t\t\t\techo -e \"\\033[1;32mDISABLING CHISEL\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_chiseloff'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mCHISEL SUCCESSFULLY DISABLED!\\033[1;33m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_chisel\n\t\t\telse\n                clear\n                fun_installdocker() {\n                    _pacotes=(\"docker\" \"docker.io\")\n                    for _prog in ${_pacotes[@]}; do\n                    apt install $_prog -y\n                    done\n                }\n                echo -e \"\\n${YELLOW}BE AWARE THAT THIS METHOD IS UNSTABLE\\nMAY OR MAY NOT WORK ON YOUR MACHINE\\nBE AWARE OF THE RISKS ! ${SCOLOR}\\n\"\n                echo -ne \"${GREEN}WISH TO CONTINUE INSTALLATION ? ${YELLOW}[s/n]:${SCOLOR} \"\n                read resp\n                [[ \"$resp\" != @(s|sim|S|SIM) ]] && {\n                    echo -e \"\\n${RED}Returning...${SCOLOR}\"\n                    sleep 2\n                    conexao\n                }\n                echo -e \"\\n\\033[1;32mSupported Ubuntu 16+\\033[1;33m\"\n                echo -e \"\\n\\033[1;32mINSTALLING CHISEL !\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_installdocker'\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[44;1;37m             CHISEL              \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT DO YOU WANT TO USE \\033[1;33m?\\033[1;37m: \"\n\t\t\t\tread porta\n\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31mInvalid port!\"\n\t\t\t\t\tsleep 3\n\t\t\t\t\tclear\n\t\t\t\t\tfun_chisel\n\t\t\t\t}\n\t\t\t\tverif_ptrs $porta\n                clear\n                echo -ne \"\\033[1;32mUsername:\\033[1;37m \";read username\n                [[ -z $username ]] && {\n                    echo -e \"\\n${cor1}Empty or invalid username!${scor}\\n\"\n                    fun_chisel\n                }\n                [[ ${username} != ?(+|-)+([a-zA-Z0-9]) ]] && {\n                    echo -e \"\\n${cor1}You entered an invalid username!${scor}\"\n                    echo -e \"${cor1}Do not use spaces, accents or special characters!${scor}\\n\"\n                    fun_chisel\n                }\n                sizemin=$(echo ${#username})\n                [[ $sizemin -lt 2 ]] && {\n                    echo -e \"\\n${cor1}You entered too short a username${scor}\"\n                    echo -e \"${cor1}use at least two characters!${scor}\\n\"\n                    fun_chisel\n                }\n                sizemax=$(echo ${#username})\n                [[ $sizemax -gt 10 ]] && {\n                    echo -e \"\\n${cor1}You entered a very large username\"\n                    echo -e \"${cor1}use a maximum of 10 characters!${scor}\\n\"\n                    fun_chisel\n                }\n                echo -ne \"\\033[1;32mPassword:\\033[1;37m \";read password\n                [[ -z $password ]] && {\n                    echo -e \"\\n${cor1}Empty or invalid password!${scor}\\n\"\n                    fun_chisel \n                }\n                sizepass=$(echo ${#password})\n                [[ $sizepass -lt 4 ]] && {\n                    echo -e \"\\n${cor1}Short password!, use at least 4 characters${scor}\\n\"\n                    fun_chisel        \n                }\n                echo -e \"\\n\\033[1;32mSETTING CHISEL !\\033[0m\"\n\t\t\t\techo \"\"\n                fun_inichisel() {\n                    docker run --name chisel -p $porta:$porta -d --restart always jpillora/chisel server -p $porta --socks5 --key supersecret --auth \"$username:$password\"\n                    docker.io run --name chisel -p $porta:$porta -d --restart always jpillora/chisel server -p $porta --socks5 --key supersecret --auth \"$username:$password\"\n                }\n                fun_bar 'fun_inichisel'\n                clear\n                echo -e \"\\n\\033[1;32mSUCCESSFULLY INSTALLED CHISEL!\\033[1;31m PORT: \\033[1;33m${porta}\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tclear\n\t\t\t\tfun_chisel\n            fi\n        elif [[ \"$resposta\" = '2' ]]; then\n            clear\n            echo -e \"\\n\\033[1;32mRESETTING CHISEL !\\033[1;33m\"\n\t\t\techo \"\"\n            fun_attchisel() {\n                docker restart chisel\n                docker.io restart chisel\n            }\n            fun_attchisel\n            clear\n            echo -e \"\\n\\033[1;32mCHISEL RESTARTING SUCCESSFULLY !\\033[1;33m\"\n            sleep 1\n            fun_chisel\n        elif [[ \"$resposta\" = '0' ]]; then\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31mreturning...\\033[0m\"\n\t\t\tsleep 1\n\t\t\tfun_conexao\n\t\telse\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31mInvalid option !\\033[0m\"\n\t\t\tsleep 1\n\t\t\tfun_socks\n\t\tfi\n    }\n\tinst_ssl() {\n\t\tif netstat -nltp | grep 'stunnel4' 1>/dev/null 2>/dev/null; then\n\t\t\t[[ $(netstat -nltp | grep 'stunnel4' | wc -l) != '0' ]] && sslt=$(netstat -nplt | grep stunnel4 | awk {'print $4'} | awk -F \":\" {'print $2'} | xargs) || sslt=\"\\033[1;31mINDISPONIVEL\"\n\t\t\techo -e \"\\E[44;1;37m              MANAGE SSL TUNNEL               \\E[0m\"\n\t\t\techo -e \"\\n\\033[1;33mPORTAS\\033[1;37m: \\033[1;32m$sslt\"\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mCHANGE PORT SSL TUNNEL\\033[0m\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mREMOVE SSL TUNNEL\\033[0m\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[0m\"\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;37m \"\n\t\t\tread resposta\n\t\t\techo \"\"\n\t\t\t[[ \"$resposta\" = '1' ]] && {\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT YOU WANT TO USE \\033[1;33m?\\033[1;37m \"\n\t\t\t\tread porta\n\t\t\t\techo \"\"\n\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31mInvalid port!\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tclear\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\tverif_ptrs $porta\n\t\t\t\techo -e \"\\033[1;32mCHANGING PORT SSL TUNNEL!\"\n\t\t\t\tvar2=$(grep 'accept' /etc/stunnel/stunnel.conf | awk '{print $NF}')\n\t\t\t\tsed -i \"s/\\b$var2\\b/$porta/g\" /etc/stunnel/stunnel.conf >/dev/null 2>&1\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'sleep 2'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mRESETTING SSL TUNNEL!\\n\"\n\t\t\t\tfun_bar 'service stunnel4 restart' '/etc/init.d/stunnel4 restart'\n\t\t\t\techo \"\"\n\t\t\t\tnetstat -nltp | grep 'stunnel4' >/dev/null && echo -e \"\\033[1;32mSUCCESSFULLY CHANGED PORT!\" || echo -e \"\\033[1;31mUNEXPECTED ERROR!\"\n\t\t\t\tsleep 3.5s\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\t\t[[ \"$resposta\" = '2' ]] && {\n\t\t\t\techo -e \"\\033[1;32mREMOVING SSL TUNNEL !\\033[0m\"\n\t\t\t\tdel_ssl() {\n\t\t\t\t\tservice stunnel4 stop\n\t\t\t\t\tapt-get remove stunnel4 -y\n\t\t\t\t\tapt-get autoremove stunnel4 -y\n\t\t\t\t\tapt-get purge stunnel4 -y\n\t\t\t\t\trm -rf /etc/stunnel/stunnel.conf\n\t\t\t\t\trm -rf /etc/default/stunnel4\n\t\t\t\t\trm -rf /etc/stunnel/stunnel.pem\n\t\t\t\t}\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'del_ssl'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSSL TUNNEL SUCCESSFULLY REMOVED!\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_conexao\n\t\t\t} || {\n\t\t\t\techo -e \"\\033[1;31mReturning...\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\telse\n\t\t\tclear\n\t\t\techo -e \"\\E[44;1;37m              INSTALL SSL TUNNEL               \\E[0m\"\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mINSTALL SSL TUNNEL STANDARD\\033[0m\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mINSTALL SSL TUNNEL WEBSOCKET\\033[0m\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[0m\"\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;37m \"\n\t\t\tread resposta\n\t\t\techo \"\"\n            if [[ \"$resposta\" = '1' ]]; then\n                portssl='22'\n            elif [[ \"$resposta\" = '2' ]]; then     \n                portssl='80'\n            elif [[ \"$resposta\" = '0' ]]; then\n\t\t\t\techo -e \"\\033[1;31mReturning...\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_conexao\n            else\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31mInvalid option !\\033[0m\"\n\t\t\tsleep 1\n\t\t\tinst_ssl\n\t\tfi\n            clear\n\t\t\techo -e \"\\E[44;1;37m           SSL TUNNEL INSTALLER             \\E[0m\"\n\t\t\techo -e \"\\n\\033[1;33mVC ARE ABOUT TO INSTALL SSL TUNNEL !\\033[0m\"\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;32mDO YOU WISH TO CONTINUE \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"\n\t\t\tread resposta\n\t\t\t[[ \"$resposta\" = 's' ]] && {\n\t\t\t\techo -e \"\\n\\033[1;33mDEFINE A PORT FOR SSL TUNNEL !\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT YOU WANT TO USE \\033[1;33m?\\033[1;37m \"\n                read porta\n\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31mInvalid port!\"\n\t\t\t\t\tsleep 3\n\t\t\t\t\tclear\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\tverif_ptrs $porta\n\t\t\t\techo -e \"\\n\\033[1;32mINSTALLING SSL TUNNEL !\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'apt-get update -y' 'apt-get install stunnel4 -y'\n\t\t\t\techo -e \"\\n\\033[1;32mCONFIGURING SSL TUNNEL !\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tssl_conf() {\n\t\t\t\t\techo -e \"cert = /etc/stunnel/stunnel.pem\\nclient = no\\nsocket = a:SO_REUSEADDR=1\\nsocket = l:TCP_NODELAY=1\\nsocket = r:TCP_NODELAY=1\\n\\n[stunnel]\\nconnect = 127.0.0.1:$portssl\\naccept = ${porta}\" >/etc/stunnel/stunnel.conf\n\t\t\t\t}\n\t\t\t\tfun_bar 'ssl_conf'\n\t\t\t\techo -e \"\\n\\033[1;32mCREATING CERTIFICATE!\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tssl_certif() {\n\t\t\t\t\t#crt='EC'\n\t\t\t\t\t#openssl genrsa -out key.pem 2048 >/dev/null 2>&1\n\t\t\t\t\t#(\n\t\t\t\t\t#echo $crt\n\t\t\t\t\t#echo $crt\n\t\t\t\t\t#echo $crt\n\t\t\t\t\t#echo $crt\n\t\t\t\t\t#echo $crt\n\t\t\t\t\t#echo $crt\n\t\t\t\t\t#echo $crt\n\t\t\t\t\t#) | openssl req -new -x509 -key key.pem -out cert.pem -days 1050 >/dev/null 2>&1\n\t\t\t\t\t#cat cert.pem key.pem >>/etc/stunnel/stunnel.pem\n\t\t\t\t\t#rm key.pem cert.pem >/dev/null 2>&1\n\t\t\t\t\tsed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/stunnel4\n\t\t\t\t\tcd /etc/stunnel && wget https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Sistema/script/stunnel.pem && cd $HOME\n\t\t\t\t}\n\t\t\t\tfun_bar 'ssl_certif'\n\t\t\t\techo -e \"\\n\\033[1;32mSTARTING SSL TUNNEL !\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_finssl() {\n\t\t\t\t\tservice stunnel4 restart\n\t\t\t\t\tservice ssh restart\n\t\t\t\t\t/etc/init.d/stunnel4 restart\n\t\t\t\t}\n\t\t\t\tfun_bar 'fun_finssl' 'service stunnel4 restart'\n\t\t\t\techo -e \"\\n\\033[1;32mSSL TUNNEL SUCCESSFULLY INSTALLED !\\033[1;31m PORT: \\033[1;33m$porta\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\t} || {\n\t\t\t\techo -e \"\\n\\033[1;31mReturning...\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tclear\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\tfi\n\t}\n\n\tfun_openvpn() {\n\t\tif readlink /proc/$$/exe | grep -qs \"dash\"; then\n\t\t\techo \"This script needs to be run with bash, not sh\"\n\t\t\texit 1\n\t\tfi\n\t\t[[ \"$EUID\" -ne 0 ]] && {\n\t\t\tclear\n\t\t\techo \"run as root\"\n\t\t\texit 2\n\t\t}\n\t\t[[ ! -e /dev/net/tun ]] && {\n\t\t\techo -e \"\\033[1;31mTUN TAP NOT AVAILABLE\\033[0m\"\n\t\t\tsleep 2\n\t\t\texit 3\n\t\t}\n\t\tif grep -qs \"CentOS release 5\" \"/etc/redhat-release\"; then\n\t\t\techo \"CentOS 5 is too old and not supported\"\n\t\t\texit 4\n\t\tfi\n\t\tif [[ -e /etc/debian_version ]]; then\n\t\t\tOS=debian\n\t\t\tGROUPNAME=nogroup\n\t\t\tRCLOCAL='/etc/rc.local'\n\t\telif [[ -e /etc/centos-release || -e /etc/redhat-release ]]; then\n\t\t\tOS=centos\n\t\t\tGROUPNAME=nobody\n\t\t\tRCLOCAL='/etc/rc.d/rc.local'\n\t\telse\n\t\t\techo -e \"SYSTEM NOT SUPPORTED\"\n\t\t\texit 5\n\t\tfi\n\t\tnewclient() {\n\t\t\t# gerar client.ovpn\n\t\t\tcp /etc/openvpn/client-common.txt ~/$1.ovpn\n\t\t\techo \"<ca>\" >>~/$1.ovpn\n\t\t\tcat /etc/openvpn/easy-rsa/pki/ca.crt >>~/$1.ovpn\n\t\t\techo \"</ca>\" >>~/$1.ovpn\n\t\t\techo \"<cert>\" >>~/$1.ovpn\n\t\t\tcat /etc/openvpn/easy-rsa/pki/issued/$1.crt >>~/$1.ovpn\n\t\t\techo \"</cert>\" >>~/$1.ovpn\n\t\t\techo \"<key>\" >>~/$1.ovpn\n\t\t\tcat /etc/openvpn/easy-rsa/pki/private/$1.key >>~/$1.ovpn\n\t\t\techo \"</key>\" >>~/$1.ovpn\n\t\t\techo \"<tls-auth>\" >>~/$1.ovpn\n\t\t\tcat /etc/openvpn/ta.key >>~/$1.ovpn\n\t\t\techo \"</tls-auth>\" >>~/$1.ovpn\n\t\t}\n\t\tIP1=$(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)\n\t\tIP2=$(wget -4qO- \"http://whatismyip.akamai.com/\")\n\t\t[[ \"$IP1\" = \"\" ]] && {\n\t\t\tIP1=$(hostname -I | cut -d' ' -f1)\n\t\t}\n\t\t[[ \"$IP1\" != \"$IP2\" ]] && {\n\t\t\tIP=\"$IP1\"\n\t\t} || {\n\t\t\tIP=\"$IP2\"\n\t\t}\n\t\t[[ $(netstat -nplt | grep -wc 'openvpn') != '0' ]] && {\n\t\t\twhile :; do\n\t\t\t\tclear\n\n\t\t\t\topnp=$(cat /etc/openvpn/server.conf | grep \"port\" | awk {'print $2'})\n\t\t\t\t[[ -d /var/www/html/openvpn ]] && {\n\t\t\t\t\tovpnweb=$(echo -e \"\\033[1;32m♦ \")\n\t\t\t\t} || {\n\t\t\t\t\tovpnweb=$(echo -e \"\\033[1;31m○ \")\n\t\t\t\t}\n\t\t\t\tif grep \"duplicate-cn\" /etc/openvpn/server.conf >/dev/null; then\n\t\t\t\t\tmult=$(echo -e \"\\033[1;32m♦ \")\n\t\t\t\telse\n\t\t\t\t\tmult=$(echo -e \"\\033[1;31m○ \")\n\t\t\t\tfi\n\t\t\t\techo -e \"\\E[44;1;37m          MANAGE OPENVPN           \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;33mPORT\\033[1;37m: \\033[1;32m$opnp\"\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mCHANGE PORT\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mREMOVE OPENVPN\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m] \\033[1;37m• \\033[1;33mOVPN VIA LINK $ovpnweb\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m4\\033[1;31m] \\033[1;37m• \\033[1;33mMULTILOGIN OVPN $mult\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m5\\033[1;31m] \\033[1;37m• \\033[1;33mCHANGE HOST DNS\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;31m?\\033[1;37m \"\n\t\t\t\tread option\n\t\t\t\tcase $option in\n\t\t\t\t1)\n\t\t\t\t\tclear\n\t\t\t\t\techo -e \"\\E[44;1;37m         CHANGE PORT OPENVPN         \\E[0m\"\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;33mPORT IN USE: \\033[1;32m$opnp\"\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -ne \"\\033[1;32mWHICH PORT DO YOU WANT TO USE \\033[1;33m?\\033[1;37m \"\n\t\t\t\t\tread porta\n\t\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;31mInvalid port!\"\n\t\t\t\t\t\tsleep 3\n\t\t\t\t\t\tfun_conexao\n\t\t\t\t\t}\n\t\t\t\t\tverif_ptrs\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;32mCHANGING THE PORT OPENVPN!\\033[1;33m\"\n\t\t\t\t\techo \"\"\n\t\t\t\t\tfun_opn() {\n\t\t\t\t\t\tvar_ptovpn=$(sed -n '1 p' /etc/openvpn/server.conf)\n\t\t\t\t\t\tsed -i \"s/\\b$var_ptovpn\\b/port $porta/g\" /etc/openvpn/server.conf\n\t\t\t\t\t\tsleep 1\n\t\t\t\t\t\tvar_ptovpn2=$(sed -n '7 p' /etc/openvpn/client-common.txt | awk {'print $NF'})\n\t\t\t\t\t\tsed -i \"s/\\b$var_ptovpn2/\\b$porta/g\" /etc/openvpn/client-common.txt\n\t\t\t\t\t\tsleep 1\n\t\t\t\t\t\tservice openvpn restart\n\t\t\t\t\t}\n\t\t\t\t\tfun_bar 'fun_opn'\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;32mSUCCESSFULLY CHANGED PORT!\\033[1;33m\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tfun_conexao\n\t\t\t\t\t;;\n\t\t\t\t2)\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -ne \"\\033[1;32mWANT TO REMOVE OPENVPN \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"\n\t\t\t\t\tread REMOVE\n\t\t\t\t\t[[ \"$REMOVE\" = 's' ]] && {\n\t\t\t\t\t\trmv_open() {\n\t\t\t\t\t\t\tPORT=$(grep '^port ' /etc/openvpn/server.conf | cut -d \" \" -f 2)\n\t\t\t\t\t\t\tPROTOCOL=$(grep '^proto ' /etc/openvpn/server.conf | cut -d \" \" -f 2)\n\t\t\t\t\t\t\tIP=$(grep 'iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to ' $RCLOCAL | cut -d \" \" -f 11)\n\t\t\t\t\t\t\tif pgrep firewalld; then\n\t\t\t\t\t\t\t\tfirewall-cmd --zone=public --remove-port=$PORT/$PROTOCOL\n\t\t\t\t\t\t\t\tfirewall-cmd --zone=trusted --remove-source=10.8.0.0/24\n\t\t\t\t\t\t\t\tfirewall-cmd --permanent --zone=public --remove-port=$PORT/$PROTOCOL\n\t\t\t\t\t\t\t\tfirewall-cmd --permanent --zone=trusted --remove-source=10.8.0.0/24\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tif iptables -L -n | grep -qE 'REJECT|DROP|ACCEPT'; then\n\t\t\t\t\t\t\t\tiptables -D INPUT -p $PROTOCOL --dport $PORT -j ACCEPT\n\t\t\t\t\t\t\t\tiptables -D FORWARD -s 10.8.0.0/24 -j ACCEPT\n\t\t\t\t\t\t\t\tiptables -D FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT\n\t\t\t\t\t\t\t\tsed -i \"/iptables -I INPUT -p $PROTOCOL --dport $PORT -j ACCEPT/d\" $RCLOCAL\n\t\t\t\t\t\t\t\tsed -i \"/iptables -I FORWARD -s 10.8.0.0\\/24 -j ACCEPT/d\" $RCLOCAL\n\t\t\t\t\t\t\t\tsed -i \"/iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT/d\" $RCLOCAL\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tiptables -t nat -D POSTROUTING -s 10.8.0.0/24 -j SNAT --to $IP\n\t\t\t\t\t\t\tsed -i '/iptables -t nat -A POSTROUTING -s 10.8.0.0\\/24 -j SNAT --to /d' $RCLOCAL\n\t\t\t\t\t\t\tif hash sestatus 2>/dev/null; then\n\t\t\t\t\t\t\t\tif sestatus | grep \"Current mode\" | grep -qs \"enforcing\"; then\n\t\t\t\t\t\t\t\t\tif [[ \"$PORT\" != '1194' || \"$PROTOCOL\" = 'tcp' ]]; then\n\t\t\t\t\t\t\t\t\t\tsemanage port -d -t openvpn_port_t -p $PROTOCOL $PORT\n\t\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t[[ \"$OS\" = 'debian' ]] && {\n\t\t\t\t\t\t\t\tapt-get remove --purge -y openvpn openvpn-blacklist\n\t\t\t\t\t\t\t\tapt-get autoremove openvpn -y\n\t\t\t\t\t\t\t\tapt-get autoremove -y\n\t\t\t\t\t\t\t} || {\n\t\t\t\t\t\t\t\tyum remove openvpn -y\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trm -rf /etc/openvpn\n\t\t\t\t\t\t\trm -rf /usr/share/doc/openvpn*\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;32mREMOVING OPENVPN!\\033[0m\"\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\tfun_bar 'rmv_open'\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;32mOPENVPN SUCCESSFULLY REMOVED!\\033[0m\"\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\tfun_conexao\n\t\t\t\t\t} || {\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;31mReturning...\\033[0m\"\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\tfun_conexao\n\t\t\t\t\t}\n\t\t\t\t\t;;\n\t\t\t\t3)\n\t\t\t\t\t[[ -d /var/www/html/openvpn ]] && {\n\t\t\t\t\t\tclear\n\t\t\t\t\t\tfun_spcr() {\n\t\t\t\t\t\t\tapt-get remove apache2 -y\n\t\t\t\t\t\t\tapt-get autoremove -y\n\t\t\t\t\t\t\trm -rf /var/www/html/openvpn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction aguarde() {\n\t\t\t\t\t\t\thelice() {\n\t\t\t\t\t\t\t\tfun_spcr >/dev/null 2>&1 &\n\t\t\t\t\t\t\t\ttput civis\n\t\t\t\t\t\t\t\twhile [ -d /proc/$! ]; do\n\t\t\t\t\t\t\t\t\tfor i in / - \\\\ \\|; do\n\t\t\t\t\t\t\t\t\t\tsleep .1\n\t\t\t\t\t\t\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\t\ttput cnorm\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo -ne \"\\033[1;31mDISABLING\\033[1;32m.\\033[1;33m.\\033[1;31m. \\033[1;33m\"\n\t\t\t\t\t\t\thelice\n\t\t\t\t\t\t\techo -e \"\\e[1DOk\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\taguarde\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\t} || {\n\t\t\t\t\t\tclear\n\t\t\t\t\t\tfun_apchon() {\n\t\t\t\t\t\t\tapt-get install apache2 zip -y\n\t\t\t\t\t\t\tsed -i \"s/Listen 80/Listen 81/g\" /etc/apache2/ports.conf\n\t\t\t\t\t\t\tservice apache2 restart\n\t\t\t\t\t\t\t[[ ! -d /var/www/html ]] && {\n\t\t\t\t\t\t\t\tmkdir /var/www/html\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t[[ ! -d /var/www/html/openvpn ]] && {\n\t\t\t\t\t\t\t\tmkdir /var/www/html/openvpn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttouch /var/www/html/openvpn/index.html\n\t\t\t\t\t\t\tchmod -R 755 /var/www\n\t\t\t\t\t\t\t/etc/init.d/apache2 restart\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction aguarde2() {\n\t\t\t\t\t\t\thelice() {\n\t\t\t\t\t\t\t\tfun_apchon >/dev/null 2>&1 &\n\t\t\t\t\t\t\t\ttput civis\n\t\t\t\t\t\t\t\twhile [ -d /proc/$! ]; do\n\t\t\t\t\t\t\t\t\tfor i in / - \\\\ \\|; do\n\t\t\t\t\t\t\t\t\t\tsleep .1\n\t\t\t\t\t\t\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\t\ttput cnorm\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo -ne \"\\033[1;32mACTIVATING\\033[1;32m.\\033[1;33m.\\033[1;31m. \\033[1;33m\"\n\t\t\t\t\t\t\thelice\n\t\t\t\t\t\t\techo -e \"\\e[1DOk\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\taguarde2\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\t}\n\t\t\t\t\t;;\n\t\t\t\t4)\n\t\t\t\t\tif grep \"duplicate-cn\" /etc/openvpn/server.conf >/dev/null; then\n\t\t\t\t\t\tclear\n\t\t\t\t\t\tfun_multon() {\n\t\t\t\t\t\t\tsed -i '/duplicate-cn/d' /etc/openvpn/server.conf\n\t\t\t\t\t\t\tsleep 1.5s\n\t\t\t\t\t\t\tservice openvpn restart >/dev/null\n\t\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfun_spinmult() {\n\t\t\t\t\t\t\thelice() {\n\t\t\t\t\t\t\t\tfun_multon >/dev/null 2>&1 &\n\t\t\t\t\t\t\t\ttput civis\n\t\t\t\t\t\t\t\twhile [ -d /proc/$! ]; do\n\t\t\t\t\t\t\t\t\tfor i in / - \\\\ \\|; do\n\t\t\t\t\t\t\t\t\t\tsleep .1\n\t\t\t\t\t\t\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\t\ttput cnorm\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\t\techo -ne \"\\033[1;31mMULTILOGIN BLOCK\\033[1;32m.\\033[1;33m.\\033[1;31m. \\033[1;33m\"\n\t\t\t\t\t\t\thelice\n\t\t\t\t\t\t\techo -e \"\\e[1DOk\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfun_spinmult\n\t\t\t\t\t\tsleep 1\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\telse\n\t\t\t\t\t\tclear\n\t\t\t\t\t\tfun_multoff() {\n\t\t\t\t\t\t\tgrep -v \"^duplicate-cn\" /etc/openvpn/server.conf >/tmp/tmpass && mv /tmp/tmpass /etc/openvpn/server.conf\n\t\t\t\t\t\t\techo \"duplicate-cn\" >>/etc/openvpn/server.conf\n\t\t\t\t\t\t\tsleep 1.5s\n\t\t\t\t\t\t\tservice openvpn restart >/dev/null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfun_spinmult2() {\n\t\t\t\t\t\t\thelice() {\n\t\t\t\t\t\t\t\tfun_multoff >/dev/null 2>&1 &\n\t\t\t\t\t\t\t\ttput civis\n\t\t\t\t\t\t\t\twhile [ -d /proc/$! ]; do\n\t\t\t\t\t\t\t\t\tfor i in / - \\\\ \\|; do\n\t\t\t\t\t\t\t\t\t\tsleep .1\n\t\t\t\t\t\t\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\t\ttput cnorm\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\t\techo -ne \"\\033[1;32mALLOWING MULTILOGIN\\033[1;32m.\\033[1;33m.\\033[1;31m. \\033[1;33m\"\n\t\t\t\t\t\t\thelice\n\t\t\t\t\t\t\techo -e \"\\e[1DOk\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfun_spinmult2\n\t\t\t\t\t\tsleep 1\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\t\t5)\n\t\t\t\t\tclear\n\t\t\t\t\techo -e \"\\E[44;1;37m         CHANGE DNS HOST           \\E[0m\"\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mADD HOST DNS\"\n\t\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mREMOVE HOST DNS\"\n\t\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m] \\033[1;37m• \\033[1;33mEDIT MANUALLY\"\n\t\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\"\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;31m?\\033[1;37m \"\n\t\t\t\t\tread resp\n\t\t\t\t\t[[ -z \"$resp\" ]] && {\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;31mInvalid option!\"\n\t\t\t\t\t\tsleep 3\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\t}\n\t\t\t\t\tif [[ \"$resp\" = '1' ]]; then\n\t\t\t\t\t\tclear\n\t\t\t\t\t\techo -e \"\\E[44;1;37m            Add DNS Host            \\E[0m\"\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;33mList of current hosts:\\033[0m \"\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\ti=0\n\t\t\t\t\t\tfor _host in $(grep -w \"127.0.0.1\" /etc/hosts | grep -v \"localhost\" | cut -d' ' -f2); do\n\t\t\t\t\t\t\techo -e \"\\033[1;32m$_host\"\n\t\t\t\t\t\tdone\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -ne \"\\033[1;33mEnter the host to be added\\033[1;37m : \"\n\t\t\t\t\t\tread host\n\t\t\t\t\t\tif [[ -z $host ]]; then\n\t\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\t\techo -e \"\\E[41;1;37m        Empty or invalid field !       \\E[0m\"\n\t\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif [[ \"$(grep -w \"$host\" /etc/hosts | wc -l)\" -gt \"0\" ]]; then\n\t\t\t\t\t\t\techo -e \"\\E[41;1;37m    This host is already added  !    \\E[0m\"\n\t\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tsed -i \"3i\\127.0.0.1 $host\" /etc/hosts\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\E[44;1;37m      Host added successfully!      \\E[0m\"\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\telif [[ \"$resp\" = '2' ]]; then\n\t\t\t\t\t\tclear\n\t\t\t\t\t\techo -e \"\\E[44;1;37m            DNS Host Remover            \\E[0m\"\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;33mList of current hosts:\\033[0m \"\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\ti=0\n\t\t\t\t\t\tfor _host in $(grep -w \"127.0.0.1\" /etc/hosts | grep -v \"localhost\" | cut -d' ' -f2); do\n\t\t\t\t\t\t\ti=$(expr $i + 1)\n\t\t\t\t\t\t\toP+=$i\n\t\t\t\t\t\t\t[[ $i == [1-9] ]] && oP+=\" 0$i\" && i=0$i\n\t\t\t\t\t\t\toP+=\":$_host\\n\"\n\t\t\t\t\t\t\techo -e \"\\033[1;33m[\\033[1;31m$i\\033[1;33m] \\033[1;37m- \\033[1;32m$_host\\033[0m\"\n\t\t\t\t\t\tdone\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -ne \"\\033[1;32mSelect the host to be removed \\033[1;33m[\\033[1;37m1\\033[1;31m-\\033[1;37m$i\\033[1;33m]\\033[1;37m: \"\n\t\t\t\t\t\tread option\n\t\t\t\t\t\tif [[ -z $option ]]; then\n\t\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\t\techo -e \"\\E[41;1;37m          Invalid option  !        \\E[0m\"\n\t\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\t\tfi\n\t\t\t\t\t\thost=$(echo -e \"$oP\" | grep -E \"\\b$option\\b\" | cut -d: -f2)\n\t\t\t\t\t\thst=$(grep -v \"127.0.0.1 $host\" /etc/hosts)\n\t\t\t\t\t\techo \"$hst\" >/etc/hosts\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\E[41;1;37m      Host removed successfully !      \\E[0m\"\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\telif [[ \"$resp\" = '3' ]]; then\n\t\t\t\t\t\techo -e \"\\n\\033[1;32mCHANGING FILE \\033[1;37m/etc/hosts\\033[0m\"\n\t\t\t\t\t\techo -e \"\\n\\033[1;31mATTENTION!\\033[0m\"\n\t\t\t\t\t\techo -e \"\\n\\033[1;33mTO SAVE USE KEYS \\033[1;32mctrl x y\\033[0m\"\n\t\t\t\t\t\tsleep 4\n\t\t\t\t\t\tclear\n\t\t\t\t\t\tnano /etc/hosts\n\t\t\t\t\t\techo -e \"\\n\\033[1;32mSUCCESSFULLY CHANGED!\\033[0m\"\n\t\t\t\t\t\tsleep 3\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\telif [[ \"$resp\" = '0' ]]; then\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;31mreturning...\\033[0m\"\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\tfun_conexao\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\techo -e \"\\033[1;31mInvalid option!\\033[0m\"\n\t\t\t\t\t\tsleep 2\n\t\t\t\t\t\tfun_openvpn\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\t\t0)\n\t\t\t\t\tfun_conexao\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31mInvalid option !\\033[0m\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tfun_openvpn\n\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\tdone\n\t\t} || {\n\t\t\tclear\n\t\t\techo -e \"\\E[44;1;37m              OPENVPN INSTALLER               \\E[0m\"\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;33mANSWER THE QUESTIONS TO START THE INSTALLATION\"\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;32mTO CONTINUE CONFIRM YOUR IP: \\033[1;37m\"\n\t\t\tread -e -i $IP IP\n\t\t\t[[ -z \"$IP\" ]] && {\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;31mInvalid IP!\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\t\techo \"\"\n\t\t\tread -p \"$(echo -e \"\\033[1;32mWHICH PORT DO YOU WANT TO USE? \\033[1;37m\")\" -e -i 1194 porta\n\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;31mInvalid port!\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;33mVERIFYING PORT...\"\n\t\t\tverif_ptrs $porta\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;33mSystem\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;33mGoogle (\\033[1;32mRecommended\\033[1;33m)\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m] \\033[1;33mOpenDNS\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m4\\033[1;31m] \\033[1;33mCloudflare\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m5\\033[1;31m] \\033[1;33mHurricane Electric\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m6\\033[1;31m] \\033[1;33mVerisign\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m7\\033[1;31m] \\033[1;33mDNS Performace\\033[0m\"\n\t\t\techo \"\"\n\t\t\tread -p \"$(echo -e \"\\033[1;32mWHICH DNS DO YOU WANT TO USE? \\033[1;37m\")\" -e -i 2 DNS\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;33mUDP\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;33mTCP (\\033[1;32mRecommended\\033[1;33m)\"\n\t\t\techo \"\"\n\t\t\tread -p \"$(echo -e \"\\033[1;32mWHICH PROTOCOL DO YOU WANT TO USE IN OPENVPN? \\033[1;37m\")\" -e -i 2 resp\n\t\t\tif [[ \"$resp\" = '1' ]]; then\n\t\t\t\tPROTOCOL=udp\n\t\t\telif [[ \"$resp\" = '2' ]]; then\n\t\t\t\tPROTOCOL=tcp\n\t\t\telse\n\t\t\t\tPROTOCOL=tcp\n\t\t\tfi\n\t\t\techo \"\"\n\t\t\t[[ \"$OS\" = 'debian' ]] && {\n\t\t\t\techo -e \"\\033[1;32mUPDATING THE SYSTEM\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_attos() {\n\t\t\t\t\tapt-get update-y\n\t\t\t\t}\n\t\t\t\tfun_bar 'fun_attos'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mINSTALLING DEPENDENCES\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_instdep() {\n\t\t\t\t\tapt-get install openvpn iptables openssl ca-certificates -y\n\t\t\t\t\tapt-get install zip -y\n\t\t\t\t}\n\t\t\t\tfun_bar 'fun_instdep'\n\t\t\t} || {\n\t\t\t\tfun_bar 'yum install epel-release -y'\n\t\t\t\tfun_bar 'yum install openvpn iptables openssl wget ca-certificates -y'\n\t\t\t}\n\t\t\t[[ -d /etc/openvpn/easy-rsa/ ]] && {\n\t\t\t\trm -rf /etc/openvpn/easy-rsa/\n\t\t\t}\n\t\t\t# Adquirindo easy-rsa\n\t\t\techo \"\"\n\t\t\tfun_dep() {\n\t\t\t\twget -O ~/EasyRSA-3.0.1.tgz \"https://github.com/januda-ui/DRAGON-VPS-MANAGER/raw/main/Install/EasyRSA-3.0.1.tgz\"\n\t\t\t\t[[ ! -e $HOME/EasyRSA-3.0.1.tgz ]] && {\n\t\t\t\t\twget -O ~/EasyRSA-3.0.1.tgz \"http://sshplus.xyz/script/EasyRSA-3.0.1.tgz\"\n\t\t\t\t}\n\t\t\t\ttar xzf ~/EasyRSA-3.0.1.tgz -C ~/\n\t\t\t\tmv ~/EasyRSA-3.0.1/ /etc/openvpn/\n\t\t\t\tmv /etc/openvpn/EasyRSA-3.0.1/ /etc/openvpn/easy-rsa/\n\t\t\t\tchown -R root:root /etc/openvpn/easy-rsa/\n\t\t\t\trm -rf ~/EasyRSA-3.0.1.tgz\n\t\t\t\tcd /etc/openvpn/easy-rsa/\n\t\t\t\t./easyrsa init-pki\n\t\t\t\t./easyrsa --batch build-ca nopass\n\t\t\t\t./easyrsa gen-dh\n\t\t\t\t./easyrsa build-server-full server nopass\n\t\t\t\t./easyrsa build-client-full VPSMANAGER nopass\n\t\t\t\t./easyrsa gen-crl\n\t\t\t\tcp pki/ca.crt pki/private/ca.key pki/dh.pem pki/issued/server.crt pki/private/server.key /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn\n\t\t\t\tchown nobody:$GROUPNAME /etc/openvpn/crl.pem\n\t\t\t\topenvpn --genkey --secret /etc/openvpn/ta.key\n\t\t\t\t# Generando server.conf\n\t\t\t\techo \"port $porta\nproto $PROTOCOL\ndev tun\nsndbuf 0\nrcvbuf 0\nca ca.crt\ncert server.crt\nkey server.key\ndh dh.pem\ntls-auth ta.key 0\ntopology subnet\nserver 10.8.0.0 255.255.255.0\nifconfig-pool-persist ipp.txt\" >/etc/openvpn/server.conf\n\t\t\t\techo 'push \"redirect-gateway def1 bypass-dhcp\"' >>/etc/openvpn/server.conf\n\t\t\t\t# DNS\n\t\t\t\tcase $DNS in\n\t\t\t\t1)\n\t\t\t\t\t# Obtain the resolvers from resolv.conf and use them for OpenVPN\n\t\t\t\t\tgrep -v '#' /etc/resolv.conf | grep 'nameserver' | grep -E -o '[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}' | while read line; do\n\t\t\t\t\t\techo \"push \\\"dhcp-option DNS $line\\\"\" >>/etc/openvpn/server.conf\n\t\t\t\t\tdone\n\t\t\t\t\t;;\n\t\t\t\t2)\n\t\t\t\t\techo 'push \"dhcp-option DNS 8.8.8.8\"' >>/etc/openvpn/server.conf\n\t\t\t\t\techo 'push \"dhcp-option DNS 8.8.4.4\"' >>/etc/openvpn/server.conf\n\t\t\t\t\t;;\n\t\t\t\t3)\n\t\t\t\t\techo 'push \"dhcp-option DNS 208.67.222.222\"' >>/etc/openvpn/server.conf\n\t\t\t\t\techo 'push \"dhcp-option DNS 208.67.220.220\"' >>/etc/openvpn/server.conf\n\t\t\t\t\t;;\n\t\t\t\t4)\n\t\t\t\t\techo 'push \"dhcp-option DNS 1.1.1.1\"' >>/etc/openvpn/server.conf\n\t\t\t\t\techo 'push \"dhcp-option DNS 1.0.0.1\"' >>/etc/openvpn/server.conf\n\t\t\t\t\t;;\n\t\t\t\t5)\n\t\t\t\t\techo 'push \"dhcp-option DNS 74.82.42.42\"' >>/etc/openvpn/server.conf\n\t\t\t\t\t;;\n\t\t\t\t6)\n\t\t\t\t\techo 'push \"dhcp-option DNS 64.6.64.6\"' >>/etc/openvpn/server.conf\n\t\t\t\t\techo 'push \"dhcp-option DNS 64.6.65.6\"' >>/etc/openvpn/server.conf\n\t\t\t\t\t;;\n\t\t\t\t7)\n\t\t\t\t\techo 'push \"dhcp-option DNS 189.38.95.95\"' >>/etc/openvpn/server.conf\n\t\t\t\t\techo 'push \"dhcp-option DNS 216.146.36.36\"' >>/etc/openvpn/server.conf\n\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\t\techo \"keepalive 10 120\nfloat\ncipher AES-256-CBC\ncomp-lzo yes\nuser nobody\ngroup $GROUPNAME\npersist-key\npersist-tun\nstatus openvpn-status.log\nmanagement localhost 7505\nverb 3\ncrl-verify crl.pem\nclient-to-client\nclient-cert-not-required\nusername-as-common-name\nplugin $(find /usr -type f -name 'openvpn-plugin-auth-pam.so') login\nduplicate-cn\" >>/etc/openvpn/server.conf\n\t\t\t\tsed -i '/\\<net.ipv4.ip_forward\\>/c\\net.ipv4.ip_forward=1' /etc/sysctl.conf\n\t\t\t\tif ! grep -q \"\\<net.ipv4.ip_forward\\>\" /etc/sysctl.conf; then\n\t\t\t\t\techo 'net.ipv4.ip_forward=1' >>/etc/sysctl.conf\n\t\t\t\tfi\n\t\t\t\techo 1 >/proc/sys/net/ipv4/ip_forward\n\t\t\t\tif [[ \"$OS\" = 'debian' && ! -e $RCLOCAL ]]; then\n\t\t\t\t\techo '#!/bin/sh -e\nexit 0' >$RCLOCAL\n\t\t\t\tfi\n\t\t\t\tchmod +x $RCLOCAL\n\t\t\t\tiptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to $IP\n\t\t\t\tsed -i \"1 a\\iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to $IP\" $RCLOCAL\n\t\t\t\tif pgrep firewalld; then\n\t\t\t\t\tfirewall-cmd --zone=public --add-port=$porta/$PROTOCOL\n\t\t\t\t\tfirewall-cmd --zone=trusted --add-source=10.8.0.0/24\n\t\t\t\t\tfirewall-cmd --permanent --zone=public --add-port=$porta/$PROTOCOL\n\t\t\t\t\tfirewall-cmd --permanent --zone=trusted --add-source=10.8.0.0/24\n\t\t\t\tfi\n\t\t\t\tif iptables -L -n | grep -qE 'REJECT|DROP'; then\n\t\t\t\t\tiptables -I INPUT -p $PROTOCOL --dport $porta -j ACCEPT\n\t\t\t\t\tiptables -I FORWARD -s 10.8.0.0/24 -j ACCEPT\n\t\t\t\t\tiptables -F\n\t\t\t\t\tiptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT\n\t\t\t\t\tsed -i \"1 a\\iptables -I INPUT -p $PROTOCOL --dport $porta -j ACCEPT\" $RCLOCAL\n\t\t\t\t\tsed -i \"1 a\\iptables -I FORWARD -s 10.8.0.0/24 -j ACCEPT\" $RCLOCAL\n\t\t\t\t\tsed -i \"1 a\\iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT\" $RCLOCAL\n\t\t\t\tfi\n\t\t\t\tif hash sestatus 2>/dev/null; then\n\t\t\t\t\tif sestatus | grep \"Current mode\" | grep -qs \"enforcing\"; then\n\t\t\t\t\t\tif [[ \"$porta\" != '1194' || \"$PROTOCOL\" = 'tcp' ]]; then\n\t\t\t\t\t\t\tif ! hash semanage 2>/dev/null; then\n\t\t\t\t\t\t\t\tyum install policycoreutils-python -y\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tsemanage port -a -t openvpn_port_t -p $PROTOCOL $porta\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t}\n\t\t\techo -e \"\\033[1;32mINSTALLING OPENVPN  \\033[1;31m(\\033[1;33mMAY TAKE TIME!\\033[1;31m)\"\n\t\t\techo \"\"\n\t\t\tfun_bar 'fun_dep > /dev/null 2>&1'\n\t\t\tfun_ropen() {\n\t\t\t\t[[ \"$OS\" = 'debian' ]] && {\n\t\t\t\t\tif pgrep systemd-journal; then\n\t\t\t\t\t\tsystemctl restart openvpn@server.service\n\t\t\t\t\telse\n\t\t\t\t\t\t/etc/init.d/openvpn restart\n\t\t\t\t\tfi\n\t\t\t\t} || {\n\t\t\t\t\tif pgrep systemd-journal; then\n\t\t\t\t\t\tsystemctl restart openvpn@server.service\n\t\t\t\t\t\tsystemctl enable openvpn@server.service\n\t\t\t\t\telse\n\t\t\t\t\t\tservice openvpn restart\n\t\t\t\t\t\tchkconfig openvpn on\n\t\t\t\t\tfi\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;32mRESTARTING OPENVPN\"\n\t\t\techo \"\"\n\t\t\tfun_bar 'fun_ropen'\n\t\t\tIP2=$(wget -4qO- \"http://whatismyip.akamai.com/\")\n\t\t\tif [[ \"$IP\" != \"$IP2\" ]]; then\n\t\t\t\tIP=\"$IP2\"\n\t\t\tfi\n\t\t\t[[ $(grep -wc 'open.py' /etc/autostart) != '0' ]] && pt_proxy=$(grep -w 'open.py' /etc/autostart| cut -d' ' -f6) || pt_proxy=80\n\t\t\tcat <<-EOF >/etc/openvpn/client-common.txt\n\t\t\t\t# OVPN_ACCESS_SERVER_PROFILE=[VPSMANAGER]\n\t\t\t\tclient\n\t\t\t\tdev tun\n\t\t\t\tproto $PROTOCOL\n\t\t\t\tsndbuf 0\n\t\t\t\trcvbuf 0\n\t\t\t\tremote /VPSMANAGER? $porta\n\t\t\t\t#payload \"HTTP/1.1 [lf]CONNECT HTTP/1.1[lf][lf]|[lf].\"\n\t\t\t\thttp-proxy $IP $pt_proxy\n\t\t\t\tresolv-retry 5\n\t\t\t\tnobind\n\t\t\t\tpersist-key\n\t\t\t\tpersist-tun\n\t\t\t\tremote-cert-tls server\n\t\t\t\tcipher AES-256-CBC\n\t\t\t\tcomp-lzo yes\n\t\t\t\tsetenv opt block-outside-dns\n\t\t\t\tkey-direction 1\n\t\t\t\tverb 3\n\t\t\t\tauth-user-pass\n\t\t\t\tkeepalive 10 120\n\t\t\t\tfloat\n\t\t\tEOF\n\t\t\t# gerar client.ovpn\n\t\t\tnewclient \"VPSMANAGER\"\n\t\t\t[[ \"$(netstat -nplt | grep -wc 'openvpn')\" != '0' ]] && echo -e \"\\n\\033[1;32mOPENVPN SUCCESSFULLY INSTALLED\\033[0m\" || echo -e \"\\n\\033[1;31mERROR ! THE INSTALLATION CORRUPTED\\033[0m\"\n\t\t}\n\t\tsed -i '$ i\\echo 1 > /proc/sys/net/ipv4/ip_forward' /etc/rc.local\n\t\tsed -i '$ i\\echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' /etc/rc.local\n\t\tsed -i '$ i\\iptables -A INPUT -p tcp --dport 25 -j DROP' /etc/rc.local\n\t\tsed -i '$ i\\iptables -A INPUT -p tcp --dport 110 -j DROP' /etc/rc.local\n\t\tsed -i '$ i\\iptables -A OUTPUT -p tcp --dport 25 -j DROP' /etc/rc.local\n\t\tsed -i '$ i\\iptables -A OUTPUT -p tcp --dport 110 -j DROP' /etc/rc.local\n\t\tsed -i '$ i\\iptables -A FORWARD -p tcp --dport 25 -j DROP' /etc/rc.local\n\t\tsed -i '$ i\\iptables -A FORWARD -p tcp --dport 110 -j DROP' /etc/rc.local\n\t\tsleep 3\n\t\tfun_conexao\n\t}\n\n\tfun_socks() {\n\t\tclear\n\t\techo -e \"\\E[44;1;37m            GERENCIAR PROXY SOCKS             \\E[0m\"\n\t\techo \"\"\n\t\t[[ $(netstat -nplt | grep -wc 'python') != '0' ]] && {\n\t\t\tsks='\\033[1;32mON'\n\t\t\techo -e \"\\033[1;33mPORTS\\033[1;37m: \\033[1;32m$(netstat -nplt | grep 'python' | awk {'print $4'} | cut -d: -f2 | xargs)\"\n\t\t} || {\n\t\t\tsks='\\033[1;31mOFF'\n\t\t}\n\t\t[[ $(screen -list | grep -wc 'proxy') != '0' ]] && var_sks1=\"\\033[1;32m♦\" || var_sks1=\"\\033[1;31m○\"\n\t\t[[ $(screen -list | grep -wc 'ws') != '0' ]] && var_sks2=\"\\033[1;32m♦\" || var_sks2=\"\\033[1;31m○\"\n\t\t[[ $(screen -list | grep -wc 'openpy') != '0' ]] && sksop=\"\\033[1;32m♦\" || sksop=\"\\033[1;31m○\"\n\t\techo \"\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mSOCKS SSH $var_sks1 \\033[0m\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mWEBSOCKET $var_sks2 \\033[0m\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m] \\033[1;37m• \\033[1;33mSOCKS OPENVPN $sksop \\033[0m\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m4\\033[1;31m] \\033[1;37m• \\033[1;33mOPEN PORT\\033[0m\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m5\\033[1;31m] \\033[1;37m• \\033[1;33mCHANGE SOCKS SSH STATUS\\033[0m\"\n        echo -e \"\\033[1;31m[\\033[1;36m6\\033[1;31m] \\033[1;37m• \\033[1;33mCHANGE WEBSOCKET STATUS\\033[0m\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[0m\"\n\t\techo \"\"\n\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;37m \"\n\t\tread resposta\n\t\tif [[ \"$resposta\" = '1' ]]; then\n\t\t\tif ps x | grep -w proxy.py | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[41;1;37m             PROXY SOCKS              \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_socksoff() {\n\t\t\t\t\tfor pidproxy in $(screen -ls | grep \".proxy\" | awk {'print $1'}); do\n\t\t\t\t\t\tscreen -r -S \"$pidproxy\" -X quit\n\t\t\t\t\tdone\n\t\t\t\t\t[[ $(grep -wc \"proxy.py\" /etc/autostart) != '0' ]] && {\n\t\t\t\t\t\tsed -i '/proxy.py/d' /etc/autostart\n\t\t\t\t\t}\n\t\t\t\t\tsleep 1\n\t\t\t\t\tscreen -wipe >/dev/null\n\t\t\t\t}\n\t\t\t\techo -e \"\\033[1;32mDISABLING PROXY SOCKS\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_socksoff'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mPROXY SOCKS SUCCESSFULLY DISABLED!\\033[1;33m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_socks\n\t\t\telse\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[44;1;37m             PROXY SOCKS              \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT YOU WANT TO USE \\033[1;33m?\\033[1;37m: \"\n\t\t\t\tread porta\n\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31mInvalid port!\"\n\t\t\t\t\tsleep 3\n\t\t\t\t\tclear\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\tverif_ptrs $porta\n\t\t\t\tfun_inisocks() {\n\t\t\t\t\tsleep 1\n\t\t\t\t\tscreen -dmS proxy python /etc/VPSManager/proxy.py $porta\n\t\t\t\t\t[[ $(grep -wc \"proxy.py\" /etc/autostart) = '0' ]] && {\n\t\t\t\t\t\techo -e \"netstat -tlpn | grep -w $porta > /dev/null || {  screen -r -S 'proxy' -X quit;  screen -dmS proxy python /etc/VPSManager/proxy.py $porta; }\" >>/etc/autostart\n\t\t\t\t\t} || {\n\t\t\t\t\t\tsed -i '/proxy.py/d' /etc/autostart\n\t\t\t\t\t\techo -e \"netstat -tlpn | grep -w $porta > /dev/null || {  screen -r -S 'proxy' -X quit;  screen -dmS proxy python /etc/VPSManager/proxy.py $porta; }\" >>/etc/autostart\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSTARTING PROXY SOCKS\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_inisocks'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSOCKS SUCCESSFULLY ACTIVATED\\033[1;33m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_socks\n\t\t\tfi\n        elif [[ \"$resposta\" = '2' ]]; then\n\t\t\tif ps x | grep -w wsproxy.py | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[41;1;37m             WEBSOCKET              \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_wssocksoff() {\n\t\t\t\t\tfor pidproxy in $(screen -ls | grep \".ws\" | awk {'print $1'}); do\n\t\t\t\t\t\tscreen -r -S \"$pidproxy\" -X quit\n\t\t\t\t\tdone\n\t\t\t\t\t[[ $(grep -wc \"wsproxy.py\" /etc/autostart) != '0' ]] && {\n\t\t\t\t\t\tsed -i '/wsproxy.py/d' /etc/autostart\n\t\t\t\t\t}\n\t\t\t\t\tsleep 1\n\t\t\t\t\tscreen -wipe >/dev/null\n\t\t\t\t}\n\t\t\t\techo -e \"\\033[1;32mDISABLING THE WEBSOCKET\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_wssocksoff'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mWEBSOCKET SUCCESSFULLY DISABLED!\\033[1;33m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_socks\n\t\t\telse\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[44;1;37m             WEBSOCKET              \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT YOU WANT TO USE \\033[1;33m?\\033[1;37m: \"\n\t\t\t\tread porta\n\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31mInvalid port!\"\n\t\t\t\t\tsleep 3\n\t\t\t\t\tclear\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\tverif_ptrs $porta\n\t\t\t\tfun_iniwssocks() {\n\t\t\t\t\tsleep 1\n\t\t\t\t\tscreen -dmS ws python /etc/VPSManager/wsproxy.py $porta\n\t\t\t\t\t[[ $(grep -wc \"wsproxy.py\" /etc/autostart) = '0' ]] && {\n\t\t\t\t\t\techo -e \"netstat -tlpn | grep -w $porta > /dev/null || {  screen -r -S 'ws' -X quit;  screen -dmS ws python /etc/VPSManager/wsproxy.py $porta; }\" >>/etc/autostart\n\t\t\t\t\t} || {\n\t\t\t\t\t\tsed -i '/wsproxy.py/d' /etc/autostart\n\t\t\t\t\t\techo -e \"netstat -tlpn | grep -w $porta > /dev/null || {  screen -r -S 'ws' -X quit;  screen -dmS ws python /etc/VPSManager/wsproxy.py $porta; }\" >>/etc/autostart\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSTARTING WEBSOCKET\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_iniwssocks'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSUCCESSFULLY ACTIVATED WEBSOCKET\\033[1;33m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_socks\n\t\t\tfi\n\t\telif [[ \"$resposta\" = '3' ]]; then\n\t\t\tif ps x | grep -w open.py | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[41;1;37m            SOCKS OPENVPN             \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_socksopenoff() {\n\t\t\t\t\tfor pidproxy in $(screen -list | grep -w \"openpy\" | awk {'print $1'}); do\n\t\t\t\t\t\tscreen -r -S \"$pidproxy\" -X quit\n\t\t\t\t\tdone\n\t\t\t\t\t[[ $(grep -wc \"open.py\" /etc/autostart) != '0' ]] && {\n\t\t\t\t\t\tsed -i '/open.py/d' /etc/autostart\n\t\t\t\t\t}\n\t\t\t\t\tsleep 1\n\t\t\t\t\tscreen -wipe >/dev/null\n\t\t\t\t}\n\t\t\t\techo -e \"\\033[1;32mDISABLING THE SOCKS OPEN\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_socksopenoff'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSOCKS SUCCESSFULLY DISABLED!\\033[1;33m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_socks\n\t\t\telse\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[41;1;37m            SOCKS OPENVPN             \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT YOU WANT TO USE \\033[1;33m?\\033[1;37m: \"\n\t\t\t\tread porta\n\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31mInvalid port!\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tclear\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\tverif_ptrs $porta\n\t\t\t\tfun_inisocksop() {\n\t\t\t\t\t[[ \"$(netstat -tlpn | grep 'openvpn' | wc -l)\" != '0' ]] && {\n\t\t\t\t\t\tlistoldop=$(grep -w 'DEFAULT_HOST =' /etc/VPSManager/open.py | cut -d\"'\" -f2 | cut -d: -f2)\n\t\t\t\t\t\tlistopen=$(netstat -tlpn | grep -w openvpn | grep -v 127.0.0.1 | awk {'print $4'} | cut -d: -f2)\n\t\t\t\t\t\tsed -i \"s/$listoldop/$listopen/\" /etc/VPSManager/open.py\n\t\t\t\t\t}\n\t\t\t\t\tsleep 1\n\t\t\t\t\tscreen -dmS openpy python /etc/VPSManager/open.py $porta\n\t\t\t\t\t[[ $(grep -wc \"open.py\" /etc/autostart) = '0' ]] && {\n\t\t\t\t\t\techo -e \"netstat -tlpn | grep -w $porta > /dev/null || {  screen -r -S 'openpy' -X quit;  screen -dmS openpy python /etc/VPSManager/open.py $porta; }\" >>/etc/autostart\n\t\t\t\t\t} || {\n\t\t\t\t\t\tsed -i '/open.py/d' /etc/autostart\n\t\t\t\t\t\techo -e \"netstat -tlpn | grep -w $porta > /dev/null || {  screen -r -S 'openpy' -X quit;  screen -dmS openpy python /etc/VPSManager/open.py $porta; }\" >>/etc/autostart\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSTARTING SOCKS OPENVPN\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_inisocksop'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSOCKS OPENVPN SUCCESSFULLY ACTIVATED\\033[1;33m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_socks\n\t\t\tfi\n\t\telif [[ \"$resposta\" = '4' ]]; then\n\t\t\tif ps x | grep proxy.py | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\tsockspt=$(netstat -nplt | grep 'python' | awk {'print $4'} | cut -d: -f2 | xargs)\n\t\t\t\tclear\n\t\t\t\techo -e \"\\E[44;1;37m            PROXY SOCKS             \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;33mPORT IN USE: \\033[1;32m$sockspt\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHICH PORT DO YOU WANT TO USE \\033[1;33m?\\033[1;37m: \"\n\t\t\t\tread porta\n\t\t\t\t[[ -z \"$porta\" ]] && {\n\t\t\t\t\techo \"\"\n\t\t\t\t\techo -e \"\\033[1;31mInvalid Port!\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tclear\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\tverif_ptrs $porta\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSTARTING PROXY SOCKS AT THE PORT\\033[1;31m$porta\\033[1;33m\"\n\t\t\t\techo \"\"\n\t\t\t\tabrirptsks() {\n\t\t\t\t\tsleep 1\n\t\t\t\t\tscreen -dmS proxy python /etc/VPSManager/proxy.py $porta\n\t\t\t\t\tsleep 1\n\t\t\t\t}\n\t\t\t\tfun_bar 'abrirptsks'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mPROXY SOCKS SUCCESSFULLY ACTIVATED!\\033[1;33m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_socks\n\t\t\telse\n\t\t\t\tclear\n\t\t\t\techo -e \"\\033[1;31mUNAVAILABLE FUNCTION\\n\\n\\033[1;33mACTIVATE SOCKS FIRST !\\033[1;33m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_socks\n\t\t\tfi\n\t\telif [[ \"$resposta\" = '5' ]]; then\n\t\t\tif ps x | grep -w proxy.py | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\tclear\n\t\t\t\tmsgsocks=$(cat /etc/VPSManager/proxy.py | grep -E \"MSG =\" | awk -F = '{print $2}' | cut -d \"'\" -f 2)\n\t\t\t\techo -e \"\\E[44;1;37m             PROXY SOCKS              \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;33mSTATUS: \\033[1;32m$msgsocks\"\n\t\t\t\techo\"\"\n\t\t\t\techo -ne \"\\033[1;32mINFORM YOUR STATUS\\033[1;31m:\\033[1;37m \"\n\t\t\t\tread msgg\n\t\t\t\t[[ -z \"$msgg\" ]] && {\n\t\t\t\t\techo -e \"\\n\\033[1;31minvalid status!\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\t[[ ${msgg} != ?(+|-)+([a-zA-Z0-9-. ]) ]] && {\n\t\t\t\t\techo -e \"\\n\\033[1;31m[\\033[1;33m!\\033[1;31m]\\033[1;33m AVOID SPECIAL CHARACTERS\\033[0m\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tfun_socks\n\t\t\t\t}\n\t\t\t\techo -e \"\\n\\033[1;31m[\\033[1;36m01\\033[1;31m]\\033[1;33m BLUE\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m02\\033[1;31m]\\033[1;33m GREEN\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m03\\033[1;31m]\\033[1;33m RED\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m04\\033[1;31m]\\033[1;33m YELLOW\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m05\\033[1;31m]\\033[1;33m PINK\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m06\\033[1;31m]\\033[1;33m CYAN\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m07\\033[1;31m]\\033[1;33m ORANGE\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m08\\033[1;31m]\\033[1;33m PURPLE\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m09\\033[1;31m]\\033[1;33m BLACK\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m10\\033[1;31m]\\033[1;33m NO COLOR\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mQUAL A COR\\033[1;31m ?\\033[1;37m : \"\n\t\t\t\tread sts_cor\n\t\t\t\tif [[ \"$sts_cor\" = \"1\" ]] || [[ \"$sts_cor\" = \"01\" ]]; then\n\t\t\t\t\tcor_sts='blue'\n\t\t\t\telif [[ \"$sts_cor\" = \"2\" ]] || [[ \"$sts_cor\" = \"02\" ]]; then\n\t\t\t\t\tcor_sts='green'\n\t\t\t\telif [[ \"$sts_cor\" = \"3\" ]] || [[ \"$sts_cor\" = \"03\" ]]; then\n\t\t\t\t\tcor_sts='red'\n\t\t\t\telif [[ \"$sts_cor\" = \"4\" ]] || [[ \"$sts_cor\" = \"04\" ]]; then\n\t\t\t\t\tcor_sts='yellow'\n\t\t\t\telif [[ \"$sts_cor\" = \"5\" ]] || [[ \"$sts_cor\" = \"05\" ]]; then\n\t\t\t\t\tcor_sts='#F535AA'\n\t\t\t\telif [[ \"$sts_cor\" = \"6\" ]] || [[ \"$sts_cor\" = \"06\" ]]; then\n\t\t\t\t\tcor_sts='cyan'\n\t\t\t\telif [[ \"$sts_cor\" = \"7\" ]] || [[ \"$sts_cor\" = \"07\" ]]; then\n\t\t\t\t\tcor_sts='#FF7F00'\n\t\t\t\telif [[ \"$sts_cor\" = \"8\" ]] || [[ \"$sts_cor\" = \"08\" ]]; then\n\t\t\t\t\tcor_sts='#9932CD'\n\t\t\t\telif [[ \"$sts_cor\" = \"9\" ]] || [[ \"$sts_cor\" = \"09\" ]]; then\n\t\t\t\t\tcor_sts='black'\n\t\t\t\telif [[ \"$sts_cor\" = \"10\" ]]; then\n\t\t\t\t\tcor_sts='null'\n\t\t\t\telse\n\t\t\t\t\techo -e \"\\n\\033[1;33mINVALID OPTION !\"\n\t\t\t\t\tcor_sts='null'\n\t\t\t\tfi\n\t\t\t\tfun_msgsocks() {\n\t\t\t\t\tmsgsocks2=$(cat /etc/VPSManager/proxy.py | grep \"MSG =\" | awk -F = '{print $2}')\n\t\t\t\t\tsed -i \"s/$msgsocks2/ '$msgg'/g\" /etc/VPSManager/proxy.py\n\t\t\t\t\tsleep 1\n\t\t\t\t\tcor_old=$(grep 'color=' /etc/VPSManager/proxy.py | cut -d '\"' -f2)\n\t\t\t\t\tsed -i \"s/\\b$cor_old\\b/$cor_sts/g\" /etc/VPSManager/proxy.py\n\t\t\t\t}\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mCHANGING STATUS!\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_msgsocks'\n\t\t\t\trestartsocks() {\n\t\t\t\t\tif ps x | grep proxy.py | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\t\t\techo -e \"$(netstat -nplt | grep 'python' | awk {'print $4'} | cut -d: -f2 | xargs)\" >/tmp/Pt_sks\n\t\t\t\t\t\tfor pidproxy in $(screen -ls | grep \".proxy\" | awk {'print $1'}); do\n\t\t\t\t\t\t\tscreen -r -S \"$pidproxy\" -X quit\n\t\t\t\t\t\tdone\n\t\t\t\t\t\tscreen -wipe >/dev/null\n\t\t\t\t\t\t_Ptsks=\"$(cat /tmp/Pt_sks)\"\n\t\t\t\t\t\tsleep 1\n\t\t\t\t\t\tscreen -dmS proxy python /etc/VPSManager/proxy.py $_Ptsks\n\t\t\t\t\t\trm /tmp/Pt_sks\n\t\t\t\t\tfi\n                }\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mRESETTING PROXY SOCKS!\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'restartsocks'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSTATUS SUCCESSFULLY CHANGED!\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_socks\n\t\t\telse\n\t\t\t\tclear\n\t\t\t\techo -e \"\\033[1;31mUNAVAILABLE FUNCTION\\n\\n\\033[1;33mACTIVATE SOCKS SSH FIRST !\\033[1;33m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_socks\n\t\t\tfi\n        \t\telif [[ \"$resposta\" = '6' ]]; then\n\t\t\tif ps x | grep -w wsproxy.py | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\tclear\n\t\t\t\tmsgsocks=$(cat /etc/VPSManager/wsproxy.py | grep -E \"MSG =\" | awk -F = '{print $2}' | cut -d \"'\" -f 2)\n\t\t\t\techo -e \"\\E[44;1;37m             WEBSOCKET              \\E[0m\"\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;33mSTATUS: \\033[1;32m$msgsocks\"\n\t\t\t\techo\"\"\n\t\t\t\techo -ne \"\\033[1;32mINFORM YOUR STATUS\\033[1;31m:\\033[1;37m \"\n\t\t\t\tread msgg\n\t\t\t\t[[ -z \"$msgg\" ]] && {\n\t\t\t\t\techo -e \"\\n\\033[1;31minvalid status!\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tfun_conexao\n\t\t\t\t}\n\t\t\t\t[[ ${msgg} != ?(+|-)+([a-zA-Z0-9-. ]) ]] && {\n\t\t\t\t\techo -e \"\\n\\033[1;31m[\\033[1;33m!\\033[1;31m]\\033[1;33m AVOID SPECIAL CHARACTERS\\033[0m\"\n\t\t\t\t\tsleep 2\n\t\t\t\t\tfun_socks\n\t\t\t\t}\n\t\t\t\techo -e \"\\n\\033[1;31m[\\033[1;36m01\\033[1;31m]\\033[1;33m BLUE\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m02\\033[1;31m]\\033[1;33m GREEN\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m03\\033[1;31m]\\033[1;33m RED\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m04\\033[1;31m]\\033[1;33m YELLOW\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m05\\033[1;31m]\\033[1;33m PINK\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m06\\033[1;31m]\\033[1;33m CYAN\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m07\\033[1;31m]\\033[1;33m ORANGE\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m08\\033[1;31m]\\033[1;33m PURPLE\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m09\\033[1;31m]\\033[1;33m BLACK\"\n\t\t\t\techo -e \"\\033[1;31m[\\033[1;36m10\\033[1;31m]\\033[1;33m NO COLOR\"\n\t\t\t\techo \"\"\n\t\t\t\techo -ne \"\\033[1;32mWHAT'S THE COLOR\\033[1;31m ?\\033[1;37m : \"\n\t\t\t\tread sts_cor\n\t\t\t\tif [[ \"$sts_cor\" = \"1\" ]] || [[ \"$sts_cor\" = \"01\" ]]; then\n\t\t\t\t\tcor_sts='blue'\n\t\t\t\telif [[ \"$sts_cor\" = \"2\" ]] || [[ \"$sts_cor\" = \"02\" ]]; then\n\t\t\t\t\tcor_sts='green'\n\t\t\t\telif [[ \"$sts_cor\" = \"3\" ]] || [[ \"$sts_cor\" = \"03\" ]]; then\n\t\t\t\t\tcor_sts='red'\n\t\t\t\telif [[ \"$sts_cor\" = \"4\" ]] || [[ \"$sts_cor\" = \"04\" ]]; then\n\t\t\t\t\tcor_sts='yellow'\n\t\t\t\telif [[ \"$sts_cor\" = \"5\" ]] || [[ \"$sts_cor\" = \"05\" ]]; then\n\t\t\t\t\tcor_sts='#F535AA'\n\t\t\t\telif [[ \"$sts_cor\" = \"6\" ]] || [[ \"$sts_cor\" = \"06\" ]]; then\n\t\t\t\t\tcor_sts='cyan'\n\t\t\t\telif [[ \"$sts_cor\" = \"7\" ]] || [[ \"$sts_cor\" = \"07\" ]]; then\n\t\t\t\t\tcor_sts='#FF7F00'\n\t\t\t\telif [[ \"$sts_cor\" = \"8\" ]] || [[ \"$sts_cor\" = \"08\" ]]; then\n\t\t\t\t\tcor_sts='#9932CD'\n\t\t\t\telif [[ \"$sts_cor\" = \"9\" ]] || [[ \"$sts_cor\" = \"09\" ]]; then\n\t\t\t\t\tcor_sts='black'\n\t\t\t\telif [[ \"$sts_cor\" = \"10\" ]]; then\n\t\t\t\t\tcor_sts='null'\n\t\t\t\telse\n\t\t\t\t\techo -e \"\\n\\033[1;33mINVALID OPTION !\"\n\t\t\t\t\tcor_sts='null'\n\t\t\t\tfi\n\t\t\t\tfun_msgsocks() {\n\t\t\t\t\tmsgsocks2=$(cat /etc/VPSManager/wsproxy.py | grep \"MSG =\" | awk -F = '{print $2}')\n\t\t\t\t\tsed -i \"s/$msgsocks2/ '$msgg'/g\" /etc/VPSManager/wsproxy.py\n\t\t\t\t\tsleep 1\n\t\t\t\t\tcor_old=$(grep 'color=' /etc/VPSManager/wsproxy.py | cut -d '\"' -f2)\n\t\t\t\t\tsed -i \"s/\\b$cor_old\\b/$cor_sts/g\" /etc/VPSManager/wsproxy.py\n\t\t\t\t}\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mCHANGING STATUS!\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'fun_msgsocks'\n                restartwssocks() {\n                    if ps x | grep wsproxy.py | grep -v grep 1>/dev/null 2>/dev/null; then\n\t\t\t\t\t\techo -e \"$(netstat -nplt | grep 'python' | awk {'print $4'} | cut -d: -f2 | xargs)\" >/tmp/Pt_wssks\n\t\t\t\t\t\tfor pidproxy in $(screen -ls | grep \".ws\" | awk {'print $1'}); do\n\t\t\t\t\t\t\tscreen -r -S \"$pidproxy\" -X quit\n\t\t\t\t\t\tdone\n\t\t\t\t\t\tscreen -wipe >/dev/null\n\t\t\t\t\t\t_Ptwssks=\"$(cat /tmp/Pt_wssks)\"\n\t\t\t\t\t\tsleep 1\n\t\t\t\t\t\tscreen -dmS ws python /etc/VPSManager/wsproxy.py $_Ptwssks\n\t\t\t\t\t\trm /tmp/Pt_wssks\n\t\t\t\t\tfi\n\t\t\t\t}\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mRESETTING WEBSOCKET!\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_bar 'restartwssocks'\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"\\033[1;32mSTATUS SUCCESSFULLY CHANGED!\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_socks\n\t\t\telse\n\t\t\t\tclear\n\t\t\t\techo -e \"\\033[1;31mUNAVAILABLE FUNCTION\\n\\n\\033[1;33mACTIVATE WEBSOCKET FIRST !\\033[1;33m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_socks\n\t\t\tfi\n\t\telif [[ \"$resposta\" = '0' ]]; then\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31mreturning...\\033[0m\"\n\t\t\tsleep 1\n\t\t\tfun_conexao\n\t\telse\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31mInvalid option !\\033[0m\"\n\t\t\tsleep 1\n\t\t\tfun_socks\n\t\tfi\n\n\t}\n\n\tfun_openssh() {\n\t\tclear\n\t\techo -e \"\\E[44;1;37m            OPENSSH             \\E[0m\\n\"\n\t\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mADD PORT\\033[1;31m\n[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mREMOVE PORT\\033[1;31m\n[\\033[1;36m3\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[0m\"\n\t\techo \"\"\n\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;37m \"\n\t\tread resp\n\t\tif [[ \"$resp\" = '1' ]]; then\n\t\t\tclear\n\t\t\techo -e \"\\E[44;1;37m         ADD PORT TO SSH         \\E[0m\\n\"\n\t\t\techo -ne \"\\033[1;32mWHICH PORT DO YOU WANT TO ADD \\033[1;33m?\\033[1;37m \"\n\t\t\tread pt\n\t\t\t[[ -z \"$pt\" ]] && {\n\t\t\t\techo -e \"\\n\\033[1;31mInvalid Port!\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\t\tverif_ptrs $pt\n\t\t\techo -e \"\\n\\033[1;32mADDING PORT TO SSH\\033[0m\"\n\t\t\techo \"\"\n\t\t\tfun_addpssh() {\n\t\t\t\techo \"Port $pt\" >>/etc/ssh/sshd_config\n\t\t\t\tservice ssh restart\n\t\t\t}\n\t\t\tfun_bar 'fun_addpssh'\n\t\t\techo -e \"\\n\\033[1;32mSUCCESSFULLY ADDED PORT\\033[0m\"\n\t\t\tsleep 3\n\t\t\tfun_conexao\n\t\telif [[ \"$resp\" = '2' ]]; then\n\t\t\tclear\n\t\t\techo -e \"\\E[41;1;37m         REMOVE SSH PORT         \\E[0m\"\n\t\t\techo -e \"\\n\\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[1;32mSTANDARD PORT \\033[1;37m22 \\033[1;33mCAUTION !\\033[0m\"\n\t\t\techo -e \"\\n\\033[1;33mPORTS IN USE: \\033[1;37m$(grep 'Port' /etc/ssh/sshd_config | cut -d' ' -f2 | grep -v 'no' | xargs)\\n\"\n\t\t\techo -ne \"\\033[1;32mWHICH PORT DO YOU WANT TO REMOVE\\033[1;33m?\\033[1;37m \"\n\t\t\tread pt\n\t\t\t[[ -z \"$pt\" ]] && {\n\t\t\t\techo -e \"\\n\\033[1;31mInvalid Port!\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\t\t[[ $(grep -wc \"$pt\" '/etc/ssh/sshd_config') != '0' ]] && {\n\t\t\t\techo -e \"\\n\\033[1;32mREMOVING SSH PORT\\033[0m\"\n\t\t\t\techo \"\"\n\t\t\t\tfun_delpssh() {\n\t\t\t\t\tsed -i \"/Port $pt/d\" /etc/ssh/sshd_config\n\t\t\t\t\tservice ssh restart\n\t\t\t\t}\n\t\t\t\tfun_bar 'fun_delpssh'\n\t\t\t\techo -e \"\\n\\033[1;32mSUCCESSFULLY REMOVED PORT\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\t} || {\n\t\t\t\techo -e \"\\n\\033[1;31mInvalid Port!\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\telif [[ \"$resp\" = '3' ]]; then\n\t\t\techo -e \"\\n\\033[1;31mreturning..\"\n\t\t\tsleep 2\n\t\t\tfun_conexao\n\t\telse\n\t\t\techo -e \"\\n\\033[1;31mInvalid option!\"\n\t\t\tsleep 2\n\t\t\tfun_conexao\n\t\tfi\n\t}\n\n\tfun_sslh() {\n\t\t[[ \"$(netstat -nltp | grep 'sslh' | wc -l)\" = '0' ]] && {\n\t\t\tclear\n\t\t\techo -e \"\\E[44;1;37m             SSLH INSTALLER               \\E[0m\\n\"\n\t\t\techo -e \"\\n\\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[1;32mA PORT \\033[1;37m443 \\033[1;32mWILL BE USED BY STANDARD\\033[0m\\n\"\n\t\t\techo -ne \"\\033[1;32mREALLY WANT TO INSTALL SSLH \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"\n\t\t\tread resp\n\t\t\t[[ \"$resp\" = 's' ]] && {\n\t\t\t\tverif_ptrs 443\n\t\t\t\tfun_instsslh() {\n\t\t\t\t\t[[ -e \"/etc/stunnel/stunnel.conf\" ]] && ptssl=\"$(netstat -nplt | grep 'stunnel' | awk {'print $4'} | cut -d: -f2 | xargs)\" || ptssl='3128'\n\t\t\t\t\t[[ -e \"/etc/openvpn/server.conf\" ]] && ptvpn=\"$(netstat -nplt | grep 'openvpn' | awk {'print $4'} | cut -d: -f2 | xargs)\" || ptvpn='1194'\n\t\t\t\t\tDEBIAN_FRONTEND=noninteractive apt-get -y install sslh\n\t\t\t\t\techo -e \"#standalone mode\\n\\nRUN=yes\\n\\nDAEMON=/usr/sbin/sslh\\n\\nDAEMON_OPTS='--user sslh --listen 0.0.0.0:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:$ptssl --http 127.0.0.1:80 --openvpn 127.0.0.1:$ptvpn --pidfile /var/run/sslh/sslh.pid'\" >/etc/default/sslh\n\t\t\t\t\t/etc/init.d/sslh start && service sslh start\n\t\t\t\t}\n\t\t\t\techo -e \"\\n\\033[1;32mINSTALLING SSLH !\\033[0m\\n\"\n\t\t\t\tfun_bar 'fun_instsslh'\n\t\t\t\techo -e \"\\n\\033[1;32mSTARTING SSLH !\\033[0m\\n\"\n\t\t\t\tfun_bar '/etc/init.d/sslh restart && service sslh restart'\n\t\t\t\t[[ $(netstat -nplt | grep -w 'sslh' | wc -l) != '0' ]] && echo -e \"\\n\\033[1;32mSUCCESSFULLY INSTALLED !\\033[0m\" || echo -e \"\\n\\033[1;31mUNEXPECTED ERROR !\\033[0m\"\n\t\t\t\tsleep 3\n\t\t\t\tfun_conexao\n\t\t\t} || {\n\t\t\t\techo -e \"\\n\\033[1;31mreturning..\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\t} || {\n\t\t\tclear\n\t\t\techo -e \"\\E[41;1;37m             REMOVE SSLH               \\E[0m\\n\"\n\t\t\techo -ne \"\\033[1;32mREALLY WANT TO REMOVE SSLH \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"\n\t\t\tread respo\n\t\t\t[[ \"$respo\" = \"s\" ]] && {\n\t\t\t\tfun_delsslh() {\n\t\t\t\t\t/etc/init.d/sslh stop && service sslh stop\n\t\t\t\t\tapt-get remove sslh -y\n\t\t\t\t\tapt-get purge sslh -y\n\t\t\t\t}\n\t\t\t\techo -e \"\\n\\033[1;32mREMOVING SSLH !\\033[0m\\n\"\n\t\t\t\tfun_bar 'fun_delsslh'\n\t\t\t\techo -e \"\\n\\033[1;32mSUCCESSFULLY REMOVED !\\033[0m\\n\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\t} || {\n\t\t\t\techo -e \"\\n\\033[1;31mreturning..\"\n\t\t\t\tsleep 2\n\t\t\t\tfun_conexao\n\t\t\t}\n\t\t}\n\t}\n\n\tx=\"ok\"\n\tfun_conexao() {\n\t\twhile true $x != \"ok\"; do\n\t\t\t[[ ! -e '/home/vpsmanager' ]] && exit 0\n\t\t\tclear\n\t\t\techo -e \"\\E[44;1;37m                CONNECTION MODE                 \\E[0m\\n\"\n\t\t\techo -e \"\\033[1;32mSERVICE: \\033[1;33mOPENSSH \\033[1;32mPORT: \\033[1;37m$(grep 'Port' /etc/ssh/sshd_config | cut -d' ' -f2 | grep -v 'no' | xargs)\" && sts6=\"\\033[1;32m♦ \"\n\t\t\t[[ \"$(netstat -tlpn | grep 'docker' | wc -l)\" != '0' ]] && {\n\t\t\t\techo -e \"\\033[1;32mSERVICE: \\033[1;33mCHISEL: \\033[1;32mPORT: \\033[1;37m$(netstat -nplt | grep 'docker' | awk {'print $4'} | cut -d: -f2 | xargs)\"\n\t\t\t\tsts8=\"\\033[1;32m♦ \"\n\t\t\t} || {\n\t\t\t\tsts8=\"\\033[1;31m○ \"\n\t\t\t}\n\t\t\t[[ \"$(ps x | grep 'slow_dns' | grep -v 'grep'|wc -l)\" != '0' ]] && {\n\t\t\t\tsts9=\"\\033[1;32m♦ \"\n\t\t\t} || {\n\t\t\t\tsts9=\"\\033[1;31m○ \"\n\t\t\t}            \n\t\t\t[[ \"$(netstat -tlpn | grep 'sslh' | wc -l)\" != '0' ]] && {\n\t\t\t\techo -e \"\\033[1;32mSERVICE: \\033[1;33mSSLH: \\033[1;32mPORT: \\033[1;37m$(netstat -nplt | grep 'sslh' | awk {'print $4'} | cut -d: -f2 | xargs)\"\n\t\t\t\tsts7=\"\\033[1;32m♦ \"\n\t\t\t} || {\n\t\t\t\tsts7=\"\\033[1;31m○ \"\n\t\t\t}\n\n\t\t\t[[ \"$(netstat -tlpn | grep 'openvpn' | wc -l)\" != '0' ]] && {\n\t\t\t\techo -e \"\\033[1;32mSERVICE: \\033[1;33mOPENVPN: \\033[1;32mPORT: \\033[1;37m$(netstat -nplt | grep 'openvpn' | awk {'print $4'} | cut -d: -f2 | xargs)\"\n\t\t\t\tsts5=\"\\033[1;32m♦ \"\n\t\t\t} || {\n\t\t\t\tsts5=\"\\033[1;31m○ \"\n\t\t\t}\n\n\t\t\t[[ \"$(netstat -tlpn | grep 'python' | wc -l)\" != '0' ]] && {\n\t\t\t\techo -e \"\\033[1;32mSERVICE: \\033[1;33mPROXY SOCKS \\033[1;32mPORT: \\033[1;37m$(netstat -nplt | grep 'python' | awk {'print $4'} | cut -d: -f2 | xargs)\"\n\t\t\t\tsts4=\"\\033[1;32m♦ \"\n\t\t\t} || {\n\t\t\t\tsts4=\"\\033[1;31m○ \"\n\t\t\t}\n\t\t\t[[ -e \"/etc/stunnel/stunnel.conf\" ]] && {\n\t\t\t\techo -e \"\\033[1;32mSERVICE: \\033[1;33mSSL TUNNEL \\033[1;32mPORT: \\033[1;37m$(netstat -nplt | grep 'stunnel' | awk {'print $4'} | cut -d: -f2 | xargs)\"\n\t\t\t\tsts3=\"\\033[1;32m♦ \"\n\t\t\t} || {\n\t\t\t\tsts3=\"\\033[1;31m○ \"\n\t\t\t}\n\t\t\t[[ \"$(netstat -tlpn | grep 'dropbear' | wc -l)\" != '0' ]] && {\n\t\t\t\techo -e \"\\033[1;32mSERVICE: \\033[1;33mDROPBEAR \\033[1;32mPORT: \\033[1;37m$(netstat -nplt | grep 'dropbear' | awk -F \":\" {'print $4'} | xargs)\"\n\t\t\t\tsts2=\"\\033[1;32m♦ \"\n\t\t\t} || {\n\t\t\t\tsts2=\"\\033[1;31m○ \"\n\t\t\t}\n\t\t\t[[ \"$(netstat -tlpn | grep 'squid' | wc -l)\" != '0' ]] && {\n\t\t\t\techo -e \"\\033[1;32mSERVICE: \\033[1;33mSQUID \\033[1;32mPORT: \\033[1;37m$(netstat -nplt | grep 'squid' | awk -F \":\" {'print $4'} | xargs)\"\n\t\t\t\tsts1=\"\\033[1;32m♦ \"\n\t\t\t} || {\n\t\t\t\tsts1=\"\\033[1;31m○ \"\n\t\t\t}\n\t\t\techo -e \"\\033[0;34m◇────────────────────────────────────────────────◇\\033[0m\"\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;31m[\\033[1;36m01\\033[1;31m] \\033[1;37m• \\033[1;33mOPENSSH $sts6\\033[1;31m\n[\\033[1;36m02\\033[1;31m] \\033[1;37m• \\033[1;33mSQUID PROXY $sts1\\033[1;31m\n[\\033[1;36m03\\033[1;31m] \\033[1;37m• \\033[1;33mDROPBEAR $sts2\\033[1;31m\n[\\033[1;36m04\\033[1;31m] \\033[1;37m• \\033[1;33mOPENVPN $sts5\\033[1;31m\n[\\033[1;36m05\\033[1;31m] \\033[1;37m• \\033[1;33mPROXY SOCKS $sts4\\033[1;31m\n[\\033[1;36m06\\033[1;31m] \\033[1;37m• \\033[1;33mSSL TUNNEL $sts3\\033[1;31m\n[\\033[1;36m07\\033[1;31m] \\033[1;37m• \\033[1;33mSSLH MULTIPLEX $sts7\\033[1;31m\n[\\033[1;36m08\\033[1;31m] \\033[1;37m• \\033[1;33mCHISEL $sts8\\033[1;31m\n[\\033[1;36m09\\033[1;31m] \\033[1;37m• \\033[1;33mSLOWDNS $sts9\\033[1;31m\n[\\033[1;36m10\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK \\033[1;32m<\\033[1;33m<\\033[1;31m< \\033[1;31m\n[\\033[1;36m00\\033[1;31m] \\033[1;37m• \\033[1;33mGET OUT \\033[1;32m<\\033[1;33m<\\033[1;31m< \\033[0m\"\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[0;34m◇────────────────────────────────────────────────◇\\033[0m\"\n\t\t\techo \"\"\n\t\t\ttput civis\n\t\t\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;31m?\\033[1;37m \"\n\t\t\tread x\n\t\t\ttput cnorm\n\t\t\tclear\n\t\t\tcase $x in\n\t\t\t1 | 01)\n\t\t\t\tfun_openssh\n\t\t\t\t;;\n\t\t\t2 | 02)\n\t\t\t\tfun_squid\n\t\t\t\t;;\n\t\t\t3 | 03)\n\t\t\t\tfun_drop\n\t\t\t\t;;\n\t\t\t4 | 04)\n\t\t\t\tfun_openvpn\n\t\t\t\t;;\n\t\t\t5 | 05)\n\t\t\t\tfun_socks\n\t\t\t\t;;\n\t\t\t6 | 06)\n\t\t\t\tinst_ssl\n\t\t\t\t;;\n\t\t\t7 | 07)\n\t\t\t\tfun_sslh\n\t\t\t\t;;\n\t\t    8 | 08)\n\t\t\t\tfun_chisel\n                ;;              \n\t\t    9 | 09)\n\t\t\t\tslow_dns\n\t\t\t\t;;\n\t\t\t10 | 10)\n\t\t\t\tmenu\n\t\t\t\t;;\n\t\t\t0 | 00)\n\t\t\t\techo -e \"\\033[1;31mGoing out...\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tclear\n\t\t\t\texit\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\techo -e \"\\033[1;31mInvalid option !\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t}\n\tfun_conexao\n}\n"
  },
  {
    "path": "Modulos/criarteste",
    "content": "#!/bin/bash\nIP=$(cat /etc/IP)\nif [ ! -d /etc/VPSManager/userteste ]; then\nmkdir /etc/VPSManager/userteste\nfi\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%30s%s%-15s\\n' \"Create test user\" ; tput sgr0\necho \"\"\n[ \"$(ls -A /etc/VPSManager/userteste)\" ] && echo -e \"\\033[1;32mActive Test User!\\033[1;37m\" || echo -e \"\\033[1;31mNo active tests!\\033[0m\"\necho \"\"\nfor testeson in $(ls /etc/VPSManager/userteste |sort |sed 's/.sh//g')\ndo\necho \"$testeson\"\ndone\necho \"\"\necho -ne \"\\033[1;32mUsername\\033[1;37m: \"; read nome\nif [[ -z $nome ]]\nthen\necho \"\"\ntput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"Empty or invalid name.\" ; echo \"\" ; tput sgr0\n\texit 1\nfi\nawk -F : ' { print $1 }' /etc/passwd > /tmp/users \nif grep -Fxq \"$nome\" /tmp/users\nthen\n\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"This user already exists.\" ; echo \"\" ; tput sgr0\n\texit 1\nfi\necho -ne \"\\033[1;32mPassword\\033[1;37m: \"; read pass\nif [[ -z $pass ]]\nthen\necho \"\"\ntput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"Empty or invalid password.\" ; echo \"\" ; tput sgr0\n\texit 1\nfi\necho -ne \"\\033[1;32mLimit\\033[1;37m: \"; read limit\nif [[ -z $limit ]]\nthen\necho \"\"\ntput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"Empty or invalid limit.\n\" ; echo \"\" ; tput sgr0\n\texit 1\nfi\necho -ne \"\\033[1;32mminutes \\033[1;33m(\\033[1;31mEx: \\033[1;37m60\\033[1;33m)\\033[1;37m: \"; read u_temp\nif [[ -z $limit ]]\nthen\necho \"\"\ntput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"Empty or invalid limit.\" ; echo \"\" ; tput sgr0\n\texit 1\nfi\nuseradd -M -s /bin/false $nome\n(echo $pass;echo $pass) |passwd $nome > /dev/null 2>&1\necho \"$pass\" > /etc/VPSManager/senha/$nome\necho \"$nome $limit\" >> /root/usuarios.db\necho \"#!/bin/bash\npkill -f \"$nome\"\nuserdel --force $nome\ngrep -v ^$nome[[:space:]] /root/usuarios.db > /tmp/ph ; cat /tmp/ph > /root/usuarios.db\nrm /etc/VPSManager/senha/$nome > /dev/null 2>&1\nrm -rf /etc/VPSManager/userteste/$nome.sh\nexit\" > /etc/VPSManager/userteste/$nome.sh\nchmod +x /etc/VPSManager/userteste/$nome.sh\nat -f /etc/VPSManager/userteste/$nome.sh now + $u_temp min > /dev/null 2>&1\nclear\n    echo -e \"\\033[1;32m====================================\"\n    echo -e \"\\033[1;32m   🐉ㅤDRAGON VPS MANAGERㅤ🐉  \" \n    echo -e \"\\033[1;32m====================================\"\n    echo \"\"\n    echo -e \"\\033[1;31m◈─────⪧ IMPORTANT ⪦──────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈⪧ 🚫 NO SPAM\"\n    echo -e \"\\033[1;32m◈⪧ ⚠️ NO DDOS\"\n    echo -e \"\\033[1;32m◈⪧ 🎭 NO Hacking\"\n    echo -e \"\\033[1;32m◈⪧ ⛔️ NO Carding\"\n    echo -e \"\\033[1;32m◈⪧ 🙅‍♂️ NO Torrent\"\n    echo -e \"\\033[1;32m◈⪧ ❌ NO MultiLogin\"\n    echo -e \"\\033[1;32m◈⪧ 🤷‍♂️ NO Illegal Activities\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈─────⪧ TEST SSH ACCOUNT ⪦─────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈ Host / IP   :⪧  \\033[1;31m$IP\"\n    echo -e \"\\033[1;32m◈ Username    :⪧  \\033[1;31m$nome\"\n    echo -e \"\\033[1;32m◈ Password    :⪧  \\033[1;31m$pass\"\n    echo -e \"\\033[1;32m◈ Login Limit :⪧  \\033[1;31m$limit\"\n    echo -e \"\\033[1;32m◈ Expire Date :⪧  \\033[1;31m$u_temp minutes\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈──────⪧ PORTS ⪦ ───────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈ SSH\t  ⌁   22\"\n    echo -e \"\\033[1;32m◈ SSL\t  ⌁  443\"\n    echo -e \"\\033[1;32m◈ Squid    ⌁  8080\"\n    echo -e \"\\033[1;32m◈ DropBear ⌁  80\"\n    echo -e \"\\033[1;32m◈ BadVPN   ⌁  7300\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈───⪧ONLINE USER COUNT⪦────◈ \"\n    echo \"\"\n    echo -e \"\\033[1;32mhttp://$IP:8888/server/online\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈─────────────────────────────────◈\"\n    echo -e \"\\033[1;37m©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉\"\n    echo -e \"\\033[1;37m◈─────────────────────────────────◈\"\n    echo \"\"\n    echo -e \"\\033[1;33mAfter the defined time of the user \\033[1;32m$nome\"\n    echo -e \"\\033[1;33mwill be disconnected and deleted.\\033[0m\"\nexit\n"
  },
  {
    "path": "Modulos/criarusuario",
    "content": "#!/bin/bash\n\nIP=$(cat /etc/IP)\ncor1='\\033[41;1;37m'\ncor2='\\033[44;1;37m'\nscor='\\033[0m'\n# Gerar client.ovpn\nnewclient() {\n    cp /etc/openvpn/client-common.txt ~/$1.ovpn\n    echo \"<ca>\" >>~/$1.ovpn\n    cat /etc/openvpn/easy-rsa/pki/ca.crt >>~/$1.ovpn\n    echo \"</ca>\" >>~/$1.ovpn\n    echo \"<cert>\" >>~/$1.ovpn\n    cat /etc/openvpn/easy-rsa/pki/issued/$1.crt >>~/$1.ovpn\n    echo \"</cert>\" >>~/$1.ovpn\n    echo \"<key>\" >>~/$1.ovpn\n    cat /etc/openvpn/easy-rsa/pki/private/$1.key >>~/$1.ovpn\n    echo \"</key>\" >>~/$1.ovpn\n    echo \"<tls-auth>\" >>~/$1.ovpn\n    cat /etc/openvpn/ta.key >>~/$1.ovpn\n    echo \"</tls-auth>\" >>~/$1.ovpn\n}\nfun_geraovpn() {\n    [[ \"$respost\" = @(s|S) ]] && {\n        cd /etc/openvpn/easy-rsa/\n        ./easyrsa build-client-full $username nopass\n        newclient \"$username\"\n        sed -e \"s;auth-user-pass;<auth-user-pass>\\n$username\\n$password\\n</auth-user-pass>;g\" /root/$username.ovpn >/root/tmp.ovpn && mv -f /root/tmp.ovpn /root/$username.ovpn\n    } || {\n        cd /etc/openvpn/easy-rsa/\n        ./easyrsa build-client-full $username nopass\n        newclient \"$username\"\n    }\n} >/dev/null 2>&1\n[[ -e /etc/openvpn/server.conf ]] && {\n    _Port=$(grep -w 'port' /etc/openvpn/server.conf | awk {'print $2'})\n    hst=$(sed -n '8 p' /etc/openvpn/client-common.txt | awk {'print $4'})\n    rmt=$(sed -n '7 p' /etc/openvpn/client-common.txt)\n    hedr=$(sed -n '8 p' /etc/openvpn/client-common.txt)\n    prxy=$(sed -n '9 p' /etc/openvpn/client-common.txt)\n    rmt2='/VPSMANAGER?'\n    rmt3='www.vivo.com.br 8088'\n    prx='200.142.130.104'\n    payload1='#payload \"HTTP/1.0 [crlf]Host: m.youtube.com[crlf]CONNECT HTTP/1.0[crlf][crlf]|[crlf]\"'\n    payload2='#payload \"CONNECT 127.0.0.1:1194[split][crlf] HTTP/1.0 [crlf][crlf]#\"'\n    vivo1=\"portalrecarga.vivo.com.br/recarga\"\n    vivo2=\"portalrecarga.vivo.com.br/controle/\"\n    vivo3=\"navegue.vivo.com.br/pre/\"\n    vivo4=\"navegue.vivo.com.br/controle/\"\n    vivo5=\"www.vivo.com.br\"\n    oi=\"d1n212ccp6ldpw.cloudfront.net\"\n    bypass=\"net_gateway\"\n    cert01=\"/etc/openvpn/client-common.txt\"\n    if [[ \"$hst\" == \"$vivo1\" ]]; then\n        Host=\"Portal Recarga\"\n    elif [[ \"$hst\" == \"$vivo2\" ]]; then\n        Host=\"Recarga contole\"\n    elif [[ \"$hst\" == \"$vivo3\" ]]; then\n        Host=\"Portal Navegue\"\n    elif [[ \"$hst\" == \"$vivo4\" ]]; then\n        Host=\"Nav controle\"\n    elif [[ \"$hst\" == \"$IP:$_Port\" ]]; then\n        Host=\"Vivo MMS\"\n    elif [[ \"$hst\" == \"$oi\" ]]; then\n        Host=\"Oi\"\n    elif [[ \"$hst\" == \"$bypass\" ]]; then\n        Host=\"Modo Bypass\"\n    elif [[ \"$hedr\" == \"$payload1\" ]]; then\n        Host=\"OPEN SOCKS\"\n    elif [[ \"$hedr\" == \"$payload2\" ]]; then\n        Host=\"OPEN SQUID\"\n    else\n        Host=\"Customizado\"\n    fi\n}\nfun_bar() {\n    comando[0]=\"$1\"\n    comando[1]=\"$2\"\n    (\n        [[ -e $HOME/fim ]] && rm $HOME/fim\n        ${comando[0]} >/dev/null 2>&1\n        ${comando[1]} >/dev/null 2>&1\n        touch $HOME/fim\n    ) >/dev/null 2>&1 &\n    tput civis\n    echo -ne \"\\033[1;33mPlease Wait.. \\033[1;37m- \\033[1;33m[\"\n    while true; do\n        for ((i = 0; i < 18; i++)); do\n            echo -ne \"\\033[1;31m#\"\n            sleep 0.1s\n        done\n        [[ -e $HOME/fim ]] && rm $HOME/fim && break\n        echo -e \"\\033[1;33m]\"\n        sleep 1s\n        tput cuu1\n        tput dl1\n        echo -ne \"\\033[1;33mPlease Wait.. \\033[1;37m- \\033[1;33m[\"\n    done\n    echo -e \"\\033[1;33m]\\033[1;37m -\\033[1;32m OK !\\033[1;37m\"\n    tput cnorm\n}\nfun_edithost() {\n    clear\n    echo -e \"\\E[44;1;37m          CHANGE HOST OVPN            \\E[0m\"\n    echo \"\"\n    echo -e \"\\033[1;33mHOST IN USE\\033[1;37m: \\033[1;32m$Host\"\n    echo \"\"\n    echo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;33mVIVO RECHARGE\"\n    echo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;33mVIVO NAVIGATE PRE\"\n    echo -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m] \\033[1;33mOPEN SOCKS \\033[1;31m[\\033[1;32mAPP MOD\\033[1;31m]\"\n    echo -e \"\\033[1;31m[\\033[1;36m4\\033[1;31m] \\033[1;33mOPEN SQUID \\033[1;31m[\\033[1;32mAPP MOD\\033[1;31m]\"\n    echo -e \"\\033[1;31m[\\033[1;36m5\\033[1;31m] \\033[1;33mVIVO MMS \\033[1;31m[\\033[1;37mAPN: \\033[1;32mmms.vivo.com.br\\033[1;31m]\"\n    echo -e \"\\033[1;31m[\\033[1;36m6\\033[1;31m] \\033[1;33mMODO BYPASS \\033[1;31m[\\033[1;32mOPEN + INJECTOR\\033[1;31m]\"\n    echo -e \"\\033[1;31m[\\033[1;36m7\\033[1;31m] \\033[1;33mALL HOSTS \\033[1;31m[\\033[1;32m1 OVPN OF EACH\\033[1;31m]\"\n    echo -e \"\\033[1;31m[\\033[1;36m8\\033[1;31m] \\033[1;33mEDIT MANUALLY\"\n    echo -e \"\\033[1;31m[\\033[1;36m0\\033[1;31m] \\033[1;33mCOME BACK\"\n    echo \"\"\n    echo -ne \"\\033[1;32mWHICH HOST DO YOU WANT TO USE \\033[1;33m?\\033[1;37m \"\n    read respo\n    [[ -z \"$respo\" ]] && {\n        echo -e \"\\n\\033[1;31mInvalid option!\"\n        sleep 2\n        fun_edithost\n    }\n    if [[ \"$respo\" = '1' ]]; then\n        echo -e \"\\n\\033[1;32mCHANGING HOST!\\033[0m\\n\"\n        fun_althost() {\n        \tsed -i \"7,9\"d $cert01\n        \tsleep 1\n        \tsed -i \"7i\\remote $rmt2 $_Port\\nhttp-proxy-option CUSTOM-HEADER Host $vivo1\\nhttp-proxy $IP 80\" $cert01\n        }\n        fun_bar 'fun_althost'\n        echo -e \"\\n\\033[1;32mSUCCESSFULLY CHANGED HOST!\\033[0m\"\n        fun_geraovpn\n        sleep 1.5\n    elif [[ \"$respo\" = '2' ]]; then\n        echo -e \"\\n\\033[1;32mCHANGING HOST!\\033[0m\\n\"\n        fun_althost2() {\n            sed -i \"7,9\"d $cert01\n        \tsleep 1\n        \tsed -i \"7i\\remote $rmt2 $_Port\\nhttp-proxy-option CUSTOM-HEADER Host $vivo3\\nhttp-proxy $IP 80\" $cert01\n        }\n        fun_bar 'fun_althost2'\n        echo -e \"\\n\\033[1;32mSUCCESSFULLY CHANGED HOST!\\033[0m\"\n        fun_geraovpn\n        sleep 1.5\n    elif [[ \"$respo\" = '3' ]]; then\n        echo -e \"\\n\\033[1;32mCHANGING HOST!\\033[0m\\n\"\n        fun_althostpay1() {\n        \tsed -i \"7,9\"d $cert01\n        \tsleep 1\n        \tsed -i \"7i\\remote $rmt2 $_Port\\n$payload1\\nhttp-proxy $IP 8080\" $cert01\n        }\n        fun_bar 'fun_althostpay1'\n        echo -e \"\\n\\033[1;32mHOST SUCCESSFULLY CHANGED!\\033[0m\"\n        fun_geraovpn\n        sleep 1.5\n    elif [[ \"$respo\" = '4' ]]; then\n        echo -e \"\\n\\033[1;32mCHANGING HOST!\\033[0m\\n\"\n        fun_althostpay2() {\n            sed -i \"7,9\"d $cert01\n        \tsleep 1\n        \tsed -i \"7i\\remote $rmt2 $_Port\\n$payload2\\nhttp-proxy $IP 80\" $cert01\n        }\n        fun_bar 'fun_althostpay2'\n        echo -e \"\\n\\033[1;32mHOST SUCCESSFULLY CHANGED!\\033[0m\"\n        fun_geraovpn\n        sleep 1.5\n    elif [[ \"$respo\" = '5' ]]; then\n        echo -e \"\\n\\033[1;32mCHANGING HOST!\\033[0m\\n\"\n        fun_althost5() {\n        \tsed -i \"7,9\"d $cert01\n        \tsleep 1\n        \tsed -i \"7i\\remote $rmt3\\nhttp-proxy-option CUSTOM-HEADER Host $vivo3\\nhttp-proxy $prx:$_Port\" $cert01\n        }\n        fun_bar 'fun_althost5'\n        echo -e \"\\n\\033[1;32mHOST SUCCESSFULLY CHANGED!\\033[0m\"\n        fun_geraovpn\n        sleep 1.5\n    elif [[ \"$respo\" = '6' ]]; then\n        echo -e \"\\n\\033[1;32mCHANGING HOST!\\033[0m\\n\"\n        fun_althost6() {\n        \tsed -i \"7,9\"d $cert01\n        \tsleep 1\n        \tsed -i \"7i\\remote $IP $_Port\\nroute $IP 255.255.255.255 net_gateway\\nhttp-proxy 127.0.0.1 8989\" $cert01\n        }\n        fun_bar 'fun_althost6'\n        echo -e \"\\n\\033[1;32mSUCCESSFULLY CHANGED HOST!\\033[0m\"\n        fun_geraovpn\n        sleep 1.5\n    elif [[ \"$respo\" = '7' ]]; then\n        [[ ! -e \"$HOME/$username.ovpn\" ]] && fun_geraovpn\n        echo -e \"\\n\\033[1;32mCHANGING HOST!\\033[0m\\n\"\n        fun_packhost() {\n            [[ ! -d \"$HOME/OVPN\" ]] && mkdir $HOME/OVPN\n            sed -i \"7,9\"d $HOME/$username.ovpn\n            sleep 0.5\n            sed -i \"7i\\remote $rmt2 $_Port\\nhttp-proxy-option CUSTOM-HEADER Host $vivo1\\nhttp-proxy $IP 80\" $HOME/$username.ovpn\n            cp $HOME/$username.ovpn /root/OVPN/$username-vivo1.ovpn\n            sed -i \"8\"d $HOME/$username.ovpn\n            sleep 0.5\n            sed -i \"8i\\http-proxy-option CUSTOM-HEADER Host $vivo3\" $HOME/$username.ovpn\n            cp $HOME/$username.ovpn /root/OVPN/$username-vivo2.ovpn\n            sed -i \"7,9\"d $HOME/$username.ovpn\n            sleep 0.5\n            sed -i \"7i\\remote $rmt3\\nhttp-proxy-option CUSTOM-HEADER Host $IP:$_Port\\nhttp-proxy $prx 80\" $HOME/$username.ovpn\n            cp $HOME/$username.ovpn /root/OVPN/$username-vivo3.ovpn\n            sed -i \"7,9\"d $HOME/$username.ovpn\n            sleep 0.5\n            sed -i \"7i\\remote $IP $_Port\\nroute $IP 255.255.255.255 net_gateway\\nhttp-proxy 127.0.0.1 8989\" $HOME/$username.ovpn\n            cp $HOME/$username.ovpn /root/OVPN/$username-bypass.ovpn\n\t\t\tsed -i \"7,9\"d $HOME/$username.ovpn\n\t\t\tsleep 0.5\n\t\t\tsed -i \"7i\\remote $rmt2 $_Port\\n$payload1\\nhttp-proxy $IP 8080\" $HOME/$username.ovpn\n            cp $HOME/$username.ovpn /root/OVPN/$username-socks.ovpn\n\t\t\tsed -i \"7,9\"d $HOME/$username.ovpn\n\t\t\tsleep 0.5\n\t\t\tsed -i \"7i\\remote $rmt2 $_Port\\n$payload2\\nhttp-proxy $IP 80\" $HOME/$username.ovpn\n            cp $HOME/$username.ovpn /root/OVPN/$username-squid.ovpn\n            cd $HOME/OVPN && zip $username.zip *.ovpn >/dev/null 2>&1 && cp $username.zip $HOME/$username.zip\n            cd $HOME && rm -rf /root/OVPN >/dev/null 2>&1\n        }\n        fun_bar 'fun_packhost'\n        echo -e \"\\n\\033[1;32mSUCCESSFULLY CHANGED HOST!\\033[0m\"\n        sleep 1.5\n    elif [[ \"$respo\" = '8' ]]; then\n        echo \"\"\n        echo -e \"\\033[1;32mCHANGING OVPN FILE!\\033[0m\"\n        echo \"\"\n        echo -e \"\\033[1;31mATTENTION!\\033[0m\"\n        echo \"\"\n        echo -e \"\\033[1;33mTO SAVE USE KEYS \\033[1;32mctrl x y\\033[0m\"\n        sleep 4\n        clear\n        nano /etc/openvpn/client-common.txt\n        echo \"\"\n        echo -e \"\\033[1;32mSUCCESSFULLY CHANGED!\\033[0m\"\n        fun_geraovpn\n        sleep 1.5\n    elif [[ \"$respo\" = '0' ]]; then\n        echo \"\"\n        echo -e \"\\033[1;31mreturning...\\033[0m\"\n        sleep 2\n    else\n        echo \"\"\n        echo -e \"\\033[1;31mInvalid option !\\033[0m\"\n        sleep 2\n        fun_edithost\n    fi\n}\n[[ ! -e /usr/lib/vpsmanager ]] && exit 0\ntput setaf 7;tput setab 4;tput bold;printf '%30s%s%-15s\\n' \"Create SSH User\";tput sgr0\necho \"\"\necho -ne \"\\033[1;32mUsername:\\033[1;37m \";read username\n[[ -z $username ]] && {\n\techo -e \"\\n${cor1}Empty or invalid username!${scor}\\n\"\n\texit 1\n}\n[[ \"$(grep -wc $username /etc/passwd)\" != '0' ]] && {\n\techo -e \"\\n${cor1}This user already exists. try another name!${scor}\\n\"\n\texit 1\n}\n[[ ${username} != ?(+|-)+([a-zA-Z0-9]) ]] && {\n\techo -e \"\\n${cor1}You entered an invalid username!${scor}\"\n\techo -e \"${cor1}Do not use spaces, accents or special characters!${scor}\\n\"\n\texit 1\n}\nsizemin=$(echo ${#username})\n[[ $sizemin -lt 2 ]] && {\n\techo -e \"\\n${cor1}You entered too short a username${scor}\"\n\techo -e \"${cor1}use at least 4 characters!${scor}\\n\"\n\texit 1\n}\nsizemax=$(echo ${#username})\n[[ $sizemax -gt 10 ]] && {\n\techo -e \"\\n${cor1}You entered a very large username\"\n\techo -e \"${cor1}use a maximum of 10 characters!${scor}\\n\"\n\texit 1\n}\necho -ne \"\\033[1;32mPassword:\\033[1;37m \";read password\n[[ -z $password ]] && {\n\techo -e \"\\n${cor1}Empty or invalid password!${scor}\\n\"\n\texit 1\n}\nsizepass=$(echo ${#password})\n[[ $sizepass -lt 4 ]] && {\n\techo -e \"\\n${cor1}Short password!, use at least 4 characters${scor}\\n\"\n\texit 1\n}\necho -ne \"\\033[1;32mdays to expire:\\033[1;37m \";read dias\n[[ -z $dias ]] && {\n\techo -e \"\\n${cor1}number of days empty!${scor}\\n\"\n\texit 1\n}\n[[ ${dias} != ?(+|-)+([0-9]) ]] && {\n\techo -e \"\\n${cor1}You entered an invalid number of days!${scor}\\n\"\n\texit 1\n}\n[[ $dias -lt 1 ]] && {\n\techo -e \"\\n${cor1}The number must be greater than zero!${scor}\\n\"\n\texit 1\n}\necho -ne \"\\033[1;32mLimit of connections:\\033[1;37m \";read sshlimiter\n[[ -z $sshlimiter ]] && {\n\techo -e \"\\n${cor1}You left the connection limit empty!${scor}\\n\"\n\texit 1\n}\n[[ ${sshlimiter} != ?(+|-)+([0-9]) ]] && {\n\techo -e \"\\n${cor1}You entered an invalid number of connections!${scor}\\n\"\n\texit 1\n}\n[[ $sshlimiter -lt 1 ]] && {\n\techo -e \"\\n${cor1}Number of concurrent connections must be greater than zero!${scor}\\n\"\n\texit 1\n}\nfinal=$(date \"+%Y-%m-%d\" -d \"+$dias days\")\ngui=$(date \"+%d/%m/%Y\" -d \"+$dias days\")\npass=$(perl -e 'print crypt($ARGV[0], \"password\")' $password)\nuseradd -e $final -M -s /bin/false -p $pass $username >/dev/null 2>&1 &\necho \"$password\" >/etc/VPSManager/senha/$username\necho \"$username $sshlimiter\" >>/root/usuarios.db\n[[ -e /etc/openvpn/server.conf ]] && {\n\techo -ne \"\\033[1;32mGenerate Ovpn File \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"; read resp\n\t[[ \"$resp\" = @(s|S) ]] && {\n\t\trm $username.zip $username.ovpn >/dev/null 2>&1\n\t\techo -ne \"\\033[1;32mGenerate With Username and Password \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"\n\t\tread respost\n\t\techo -ne \"\\033[1;32mcurrent host\\033[1;37m: \\033[1;31m(\\033[1;37m$Host\\033[1;31m) \\033[1;37m- \\033[1;32mChange \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"; read oprc\n\t\t[[ \"$oprc\" = @(s|S) ]] && {\n\t\t\tfun_edithost\n\t\t} || {\n\t\t\tfun_geraovpn\n\t\t}\n\t\tgerarovpn() {\n\t\t\t[[ ! -e \"/root/$username.zip\" ]] && {\n\t\t\t\tzip /root/$username.zip /root/$username.ovpn\n\t\t\t\tsleep 1.5\n\t\t\t}\n\t\t}\n\t\tclear\n    echo -e \"\\033[1;32m====================================\"\n    echo -e \"\\033[1;32m   🐉ㅤDRAGON VPS MANAGERㅤ🐉  \" \n    echo -e \"\\033[1;32m====================================\"\n    echo \"\"\n    echo -e \"\\033[1;31m◈─────⪧ IMPORTANT ⪦──────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈⪧ 🚫ㅤNO SPAM\"\n    echo -e \"\\033[1;32m◈⪧ ⚠️ㅤNO DDOS\"\n    echo -e \"\\033[1;32m◈⪧ 🎭ㅤNO Hacking\"\n    echo -e \"\\033[1;32m◈⪧ ⛔️ㅤNO Carding\"\n    echo -e \"\\033[1;32m◈⪧ 🙅‍♂️ㅤNO Torrent\"\n    echo -e \"\\033[1;32m◈⪧ ❌ㅤNO MultiLogin\"\n    echo -e \"\\033[1;32m◈⪧ 🤷‍♂️ㅤNO Illegal Activities\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈─────⪧ SSH ACCOUNT ⪦─────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈ Host / IP   :⪧  \\033[1;31m$IP\"\n    echo -e \"\\033[1;32m◈ Username    :⪧  \\033[1;31m$username\"\n    echo -e \"\\033[1;32m◈ Password    :⪧  \\033[1;31m$password\"\n    echo -e \"\\033[1;32m◈ Login Limit :⪧  \\033[1;31m$sshlimiter\"\n    echo -e \"\\033[1;32m◈ Expire Date :⪧  \\033[1;31m$gui\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈──────⪧ PORTS ⪦ ───────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈ SSH\t   ⌁  22\"\n    echo -e \"\\033[1;32m◈ SSL\t   ⌁  443\"\n    echo -e \"\\033[1;32m◈ Squid    ⌁  8080\"\n    echo -e \"\\033[1;32m◈ DropBear ⌁  80\"\n    echo -e \"\\033[1;32m◈ BadVPN   ⌁  7300\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈───⪧ONLINE USER COUNT⪦────◈ \"\n    echo \"\"\n    echo -e \"\\033[1;32mhttp://$IP:8888/server/online\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈─────────────────────────────────◈\"\n    echo -e \"\\033[1;37m©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉\"\n    echo -e \"\\033[1;37m◈─────────────────────────────────◈\"\n\t\tsleep 1\n\t\tfunction aguarde() {\n\t\t\thelice() {\n\t\t\t\tgerarovpn >/dev/null 2>&1 &\n\t\t\t\ttput civis\n\t\t\t\twhile [ -d /proc/$! ]; do\n\t\t\t\t\tfor i in / - \\\\ \\|; do\n\t\t\t\t\t\tsleep .1\n\t\t\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\t\t\tdone\n\t\t\t\tdone\n\t\t\t\ttput cnorm\n\t\t\t}\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;31mCREATING OVPN...\\033[1;33m.\\033[1;31m. \\033[1;32m\"\n\t\t\thelice\n\t\t\techo -e \"\\e[1DOK\"\n\t\t}\n\t\taguarde\n\t\tVERSION_ID=$(cat /etc/os-release | grep \"VERSION_ID\")\n\t\techo \"\"\n\t\t[[ -d /var/www/html/openvpn ]] && {\n\t\t\tmv $HOME/$username.zip /var/www/html/openvpn/$username.zip >/dev/null 2>&1\n\t\t\t[[ \"$VERSION_ID\" = 'VERSION_ID=\"14.04\"' ]] && {\n\t\t\t\techo -e \"\\033[1;32mLINK\\033[1;37m: \\033[1;36m$IP:81/html/openvpn/$username.zip\"\n\t\t\t} || {\n\t\t\t\techo -e \"\\033[1;32mLINK\\033[1;37m: \\033[1;36m$IP:81/openvpn/$username.zip\"\n\t\t\t}\n\t\t} || {\n\t\t\techo -e \"\\033[1;32mAvailable in\\033[1;31m\" ~/\"$username.zip\\033[0m\"\n\t\t\tsleep 1\n\t\t}\n\t} || {\n\t\tclear\n    echo -e \"\\033[1;32m====================================\"\n    echo -e \"\\033[1;32m   🐉ㅤDRAGON VPS MANAGERㅤ🐉  \" \n    echo -e \"\\033[1;32m====================================\"\n    echo \"\"\n    echo -e \"\\033[1;31m◈─────⪧ IMPORTANT ⪦──────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈⪧ 🚫ㅤNO SPAM\"\n    echo -e \"\\033[1;32m◈⪧ ⚠️ㅤNO DDOS\"\n    echo -e \"\\033[1;32m◈⪧ 🎭ㅤNO Hacking\"\n    echo -e \"\\033[1;32m◈⪧ ⛔️ㅤNO Carding\"\n    echo -e \"\\033[1;32m◈⪧ 🙅‍♂️ㅤNO Torrent\"\n    echo -e \"\\033[1;32m◈⪧ ❌ㅤNO MultiLogin\"\n    echo -e \"\\033[1;32m◈⪧ 🤷‍♂️ㅤNO Illegal Activities\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈─────⪧ SSH ACCOUNT ⪦─────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈ Host / IP   :⪧  \\033[1;31m$IP\"\n    echo -e \"\\033[1;32m◈ Username    :⪧  \\033[1;31m$username\"\n    echo -e \"\\033[1;32m◈ Password    :⪧  \\033[1;31m$password\"\n    echo -e \"\\033[1;32m◈ Login Limit :⪧  \\033[1;31m$sshlimiter\"\n    echo -e \"\\033[1;32m◈ Expire Date :⪧  \\033[1;31m$gui\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈──────⪧ PORTS ⪦ ───────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈ SSH\t   ⌁  22\"\n    echo -e \"\\033[1;32m◈ SSL\t   ⌁  443\"\n    echo -e \"\\033[1;32m◈ Squid    ⌁  8080\"\n    echo -e \"\\033[1;32m◈ DropBear ⌁  80\"\n    echo -e \"\\033[1;32m◈ BadVPN   ⌁  7300\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈───⪧ONLINE USER COUNT⪦────◈ \"\n    echo \"\"\n    echo -e \"\\033[1;32mhttp://$IP:8888/server/online\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈─────────────────────────────────◈\"\n    echo -e \"\\033[1;37m©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉\"\n    echo -e \"\\033[1;37m◈─────────────────────────────────◈\"\n\t}\n} || {\n\tclear\n    echo -e \"\\033[1;32m====================================\"\n    echo -e \"\\033[1;32m   🐉ㅤDRAGON VPS MANAGERㅤ🐉  \" \n    echo -e \"\\033[1;32m====================================\"\n    echo \"\"\n    echo -e \"\\033[1;31m◈─────⪧ IMPORTANT ⪦──────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈⪧ 🚫ㅤNO SPAM\"\n    echo -e \"\\033[1;32m◈⪧ ⚠️ㅤNO DDOS\"\n    echo -e \"\\033[1;32m◈⪧ 🎭ㅤNO Hacking\"\n    echo -e \"\\033[1;32m◈⪧ ⛔️ㅤNO Carding\"\n    echo -e \"\\033[1;32m◈⪧ 🙅‍♂️ㅤNO Torrent\"\n    echo -e \"\\033[1;32m◈⪧ ❌ㅤNO MultiLogin\"\n    echo -e \"\\033[1;32m◈⪧ 🤷‍♂️ㅤNO Illegal Activities\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈─────⪧ SSH ACCOUNT ⪦─────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈ Host / IP   :⪧  \\033[1;31m$IP\"\n    echo -e \"\\033[1;32m◈ Username    :⪧  \\033[1;31m$username\"\n    echo -e \"\\033[1;32m◈ Password    :⪧  \\033[1;31m$password\"\n    echo -e \"\\033[1;32m◈ Login Limit :⪧  \\033[1;31m$sshlimiter\"\n    echo -e \"\\033[1;32m◈ Expire Date :⪧  \\033[1;31m$gui\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈──────⪧ PORTS ⪦ ───────◈\"\n    echo \"\"\n    echo -e \"\\033[1;32m◈ SSH\t   ⌁  22\"\n    echo -e \"\\033[1;32m◈ SSL\t   ⌁  443\"\n    echo -e \"\\033[1;32m◈ Squid    ⌁  8080\"\n    echo -e \"\\033[1;32m◈ DropBear ⌁  80\"\n    echo -e \"\\033[1;32m◈ BadVPN   ⌁  7300\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈───⪧ONLINE USER COUNT⪦────◈ \"\n    echo \"\"\n    echo -e \"\\033[1;32mhttp://$IP:8888/server/online\"\n    echo \"\"\n    echo -e \"\\033[1;37m◈─────────────────────────────────◈\"\n    echo -e \"\\033[1;37m©️ 🐉  DRAGON VPS MANAGER SCRIPT  🐉\"\n    echo -e \"\\033[1;37m◈─────────────────────────────────◈\"\n}\n"
  },
  {
    "path": "Modulos/delhost",
    "content": "#!/bin/bash\nif [ -d \"/etc/squid/\" ]; then\n    payload=\"/etc/squid/payload.txt\"\nelif [ -d \"/etc/squid3/\" ]; then\n\tpayload=\"/etc/squid3/payload.txt\"\nfi\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%35s%s%-10s\\n' \"ㅤ🐉ㅤRemove Host from Squid Proxyㅤ🐉ㅤ\" ; tput sgr0\nif [ ! -f \"$payload\" ]\nthen\n\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"File $payload not found\" ; tput sgr0\n\texit 1\nelse\n\ttput setaf 2 ; tput bold ; echo \"\"; echo \"Current domains in file $payload:\" ; tput sgr0\n\ttput setaf 3 ; tput bold ; echo \"\" ; cat $payload ; echo \"\" ; tput sgr0\n\tread -p \"Enter the domain you want to remove from the list: \" host\n\tif [[ -z $host ]]\n\t\tthen\n\t\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"You have entered an empty or non-existent domain!\" ; echo \"\" ; tput sgr0\n\t\t\texit 1\n\t\telse\n\t\tif [[ `grep -c \"^$host\" $payload` -ne 1 ]]\n\t\tthen\n\t\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"the domain $host not found in the file $payload\" ; echo \"\" ; tput sgr0\n\t\t\texit 1\n\t\telse\n\t\t\tgrep -v \"^$host\" $payload > /tmp/a && mv /tmp/a $payload\n\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"File $payload updated, the domain was removed successfully:\" ; tput sgr0\n\t\t\ttput setaf 3 ; tput bold ; echo \"\" ; cat $payload ; echo \"\" ; tput sgr0\n\t\t\tif [ ! -f \"/etc/init.d/squid3\" ]\n\t\t\tthen\n\t\t\t\tservice squid3 reload\n\t\t\telif [ ! -f \"/etc/init.d/squid\" ]\n\t\t\tthen\n\t\t\t\tservice squid reload\n\t\t\tfi\t\n\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"Proxy Squid Proxy reloaded successfully!\" ; echo \"\" ; tput sgr0\n\t\t\texit 1\n\t\tfi\n\tfi\nfi\n"
  },
  {
    "path": "Modulos/delscript",
    "content": "#!/bin/bash\nclear\necho -e \"\\033[1;32mWANT TO UNINSTALLㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ\\033[1;33m\"\nread -p \"Want to remove? [s/n] \" resp\nif [[ \"$resp\" = s || \"$resp\" = S ]];then\n    apt-get purge screen -y > /dev/null 2>&1\n    apt-get purge nmap -y > /dev/null 2>&1\n    apt-get purge figlet -y > /dev/null 2>&1\n    apt-get purge squid -y > /dev/null 2>&1\n    apt-get purge squid3 -y > /dev/null 2>&1\n    apt-get purge dropbear -y > /dev/null 2>&1\n    apt-get purge apache2 -y > /dev/null 2>&1\n    rm /bin/criarusuario /bin/expcleaner /bin/sshlimiter /bin/addhost /bin/listar /bin/sshmonitor /bin/ajuda /bin/menu /bin/OpenVPN /bin/userbackup /bin/tcpspeed /bin/badvpn /bin/otimizar /bin/speedtest /bin/trafego /bin/banner /bin/limit /bin/limite /bin/senharoot /bin/reiniciarservicos /bin/reiniciarsistema /bin/attscript /bin/criarteste /bin/socks  /bin/DropBear /bin/alterarlimite /bin/alterarsenha /bin/remover /bin/detalhes /bin/mudardata /bin/botssh /bin/infousers /bin/droplimiter /bin/conexao /bin/versao > /dev/null 2>&1\n    rm -rf /etc/VPSManager > /dev/null 2>&1\n    clear\n    echo -e \"\\033[1;36mThank you for usingㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ\\033[1;33m\"\n    sleep 2\n    cat /dev/null > ~/.bash_history && history -c && exit 0\nelse\n    echo -e \"\\033[1;32CTRL+C to get out\\033[1;33m\"\n    sleep 3\n    menu\nfi\n"
  },
  {
    "path": "Modulos/detalhes",
    "content": "#!/bin/bash\nclear\necho -e \"\\E[44;1;37m               🐉ㅤℹㅤVPS INFORMATIONㅤℹㅤ🐉                 \\E[0m\"\necho \"\"\nif [ -f /etc/lsb-release ]\nthen\necho -e \"\\033[1;31m• \\033[1;32mOPERATING SYSTEML\\033[1;31m •\\033[0m\"\necho \"\"\nname=$(cat /etc/lsb-release |grep DESCRIPTION |awk -F = {'print $2'})\ncodename=$(cat /etc/lsb-release |grep CODENAME |awk -F = {'print $2'})\necho -e \"\\033[1;33mVersion: \\033[1;37m$name\"\necho -e \"\\033[1;33mCodeName: \\033[1;37m$codename\"\necho -e \"\\033[1;33mKernel: \\033[1;37m$(uname -s)\"\necho -e \"\\033[1;33mKernel Release: \\033[1;37m$(uname -r)\"\nif [ -f /etc/os-release ]\nthen\ndevlike=$(cat /etc/os-release |grep LIKE |awk -F = {'print $2'})\necho -e \"\\033[1;33mDerived from OS: \\033[1;37m$devlike\"\necho \"\"\nfi\nelse\nsystem=$(cat /etc/issue.net)\necho -e \"\\033[1;31m• \\033[1;32mOPERATIONAL SYSTEM\\033[1;31m •\\033[0m\"\necho \"\"\necho -e \"\\033[1;33mVersion: \\033[1;37m$system\"\necho \"\"\nfi\n\nif [ -f /proc/cpuinfo ]\nthen\nuso=$(top -bn1 | awk '/Cpu/ { cpu = \"\" 100 - $8 \"%\" }; END { print cpu }')\necho -e \"\\033[1;31m• \\033[1;32mPROCESSOR\\033[1;31m •\\033[0m\"\necho \"\"\nmodelo=$(cat /proc/cpuinfo |grep \"model name\" |uniq |awk -F : {'print $2'})\ncpucores=$(grep -c cpu[0-9] /proc/stat)\ncache=$(cat /proc/cpuinfo |grep \"cache size\" |uniq |awk -F : {'print $2'})\necho -e \"\\033[1;33mModel:\\033[1;37m$modelo\"\necho -e \"\\033[1;33mCPU cores:\\033[1;37m $cpucores\"\necho -e \"\\033[1;33mCache memory:\\033[1;37m$cache\"\necho -e \"\\033[1;33mArchitecture: \\033[1;37m$(uname -p)\"\necho -e \"\\033[1;33musage: \\033[37m$uso\"\necho \"\"\nelse\necho -e \"\\033[1;32mPROCESSOR\\033[0m\"\necho \"\"\necho \"Unable to get information\"\nfi\n\nif free 1>/dev/null 2>/dev/null\nthen\nram1=$(free -h | grep -i mem | awk {'print $2'})\nram2=$(free -h | grep -i mem | awk {'print $4'})\nram3=$(free -h | grep -i mem | awk {'print $3'})\nusoram=$(free -m | awk 'NR==2{printf \"%.2f%%\\t\\t\", $3*100/$2 }')\n\necho -e \"\\033[1;31m• \\033[1;32mRAM MEMORY\\033[1;31m •\\033[0m\"\necho \"\"\necho -e \"\\033[1;33mTotal: \\033[1;37m$ram1\"\necho -e \"\\033[1;33mIn Use: \\033[1;37m$ram3\"\necho -e \"\\033[1;33mFree: \\033[1;37m$ram2\"\necho -e \"\\033[1;33musage: \\033[37m$usoram\"\necho \"\"\nelse\necho -e \"\\033[1;32mRAM MEMORY\\033[0m\"\necho \"\"\necho \"Unable to get information\"\nfi\n[[ ! -e /bin/versao ]] && rm -rf /etc/VPSManager\necho -e \"\\033[1;31m• \\033[1;32mSERVICES IN PERFORMANCE\\033[1;31m •\\033[0m\"\necho \"\"\nPT=$(lsof -V -i tcp -P -n | grep -v \"ESTABLISHED\" |grep -v \"COMMAND\" | grep \"LISTEN\")\nfor porta in `echo -e \"$PT\" | cut -d: -f2 | cut -d' ' -f1 | uniq`; do\n    svcs=$(echo -e \"$PT\" | grep -w \"$porta\" | awk '{print $1}' | uniq)\n    echo -e \"\\033[1;33mService \\033[1;37m$svcs \\033[1;33mPort \\033[1;37m$porta\"\ndone\n"
  },
  {
    "path": "Modulos/droplimiter",
    "content": "#!/bin/bash\ndatabase=\"/root/usuarios.db\"\necho $$ > /tmp/pids\nfun_drop () {\nport_dropbear=`ps aux | grep dropbear | awk NR==1 | awk '{print $17;}'`\nlog=/var/log/auth.log\nloginsukses='Password auth succeeded'\nclear\npids=`ps ax |grep dropbear |grep  \" $port_dropbear\" |awk -F\" \" '{print $1}'`\nfor pid in $pids\ndo\n    pidlogs=`grep $pid $log |grep \"$loginsukses\" |awk -F\" \" '{print $3}'`\n    i=0\n    for pidend in $pidlogs\n    do\n      let i=i+1\n    done\n    if [ $pidend ];then\n       login=`grep $pid $log |grep \"$pidend\" |grep \"$loginsukses\"`\n       PID=$pid\n       user=`echo $login |awk -F\" \" '{print $10}' | sed -r \"s/'/ /g\"`\n       waktu=`echo $login |awk -F\" \" '{print $2\"-\"$1,$3}'`\n       while [ ${#waktu} -lt 13 ]; do\n           waktu=$waktu\" \"\n       done\n       while [ ${#user} -lt 16 ]; do\n           user=$user\" \"\n       done\n       while [ ${#PID} -lt 8 ]; do\n           PID=$PID\" \"\n       done\n       echo \"$user $PID $waktu\"\n    fi\ndone\n} \nif [ ! -f \"$database\" ]\nthen\n\techo \"◇ File /root/usuarios.db not found\"\n\texit 1\nfi\nwhile true\ndo\n\tclear\n\techo -e \"\\E[42;1;37m            ㅤ🐉ㅤDROPBEAR LIMITERㅤ🐉ㅤ             \\E[0m\"\n    echo -e \"\\E[42;1;37m◇Ususario                      ◇Connection¦Limite\\E[0m\"\n    while read usline\n    do\n\t\tuser=\"$(echo $usline | cut -d' ' -f1)\"\n\t\ts2ssh=\"$(echo $usline | cut -d' ' -f2)\"\n\t\ts3drop=\"$(fun_drop | grep \"$user\" | wc -l)\"\n\t\tif [ -z \"$user\" ] ; then\n\t\t    echo \"\" > /dev/null\n\t\telse\n\t\t    fun_drop | grep \"$user\" | awk '{print $2}' |cut -d' ' -f2 > /tmp/userpid\n\t\t    sed -n '2 p' /tmp/userpid > /tmp/tmp2\n\t\t    rm /tmp/userpid\n\t\t    tput setaf 3 ; tput bold ; printf '  %-35s%s\\n' $user $s3drop/$s2ssh; tput sgr0\n\t\t    if [ \"$s3drop\" -gt \"$s2ssh\" ]; then\n\t\t        echo -e \"\\E[41;1;37m◇ User disconnected for exceeding the limit! \\E[0m\"\n\t\t        while read line\n\t\t        do\n\t\t           tmp=\"$(echo $line | cut -d' ' -f1)\"\n\t\t           kill $tmp\n\t\t        done < /tmp/tmp2\n\t\t        rm /tmp/tmp2\n\t\t    fi\n\t\tfi\n     done < \"$database\"\n     sleep 6\ndone\n"
  },
  {
    "path": "Modulos/expcleaner",
    "content": "#!/bin/bash\ndatenow=$(date +%s)\nremove_ovp () {\nif [[ -e /etc/debian_version ]]; then\n\tGROUPNAME=nogroup\nfi\nuser=\"$1\"\ncd /etc/openvpn/easy-rsa/\n./easyrsa --batch revoke $user\n./easyrsa gen-crl\nrm -rf pki/reqs/$user.req\nrm -rf pki/private/$user.key\nrm -rf pki/issued/$user.crt\nrm -rf /etc/openvpn/crl.pem\ncp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem\nchown nobody:$GROUPNAME /etc/openvpn/crl.pem\n[[ -e $HOME/$user.ovpn ]] && rm $HOME/$user.ovpn > /dev/null 2>&1\n[[ -e /var/www/html/openvpn/$user.zip ]] && rm /var/www/html/openvpn/$user.zip > /dev/null 2>&1\n} > /dev/null 2>&1\necho -e \"\\E[44;1;37m◇User         ◇Date        ◇status       ◇Action   \\E[0m\"\necho \"\"\nfor user in $(awk -F: '{print $1}' /etc/passwd); do\n\texpdate=$(chage -l $user|awk -F: '/Account expires/{print $2}')\n\techo $expdate|grep -q never && continue\n\tdatanormal=$(date -d\"$expdate\" '+%d/%m/%Y')\n\ttput setaf 3 ; tput bold ; printf '%-15s%-17s%s' $user $datanormal ; tput sgr0\n\texpsec=$(date +%s --date=\"$expdate\")\n\tdiff=$(echo $datenow - $expsec|bc -l)\n\ttput setaf 2 ; tput bold\n\techo $diff|grep -q ^\\- && echo \"◇ VALID NOT REMOVED\" && continue\n\ttput setaf 1 ; tput bold\n\techo \"◇ USER WAS REMOVED\"\n\tpkill -f $user\n\tuserdel --force $user\n\tgrep -v ^$user[[:space:]] /root/usuarios.db > /tmp/ph ; cat /tmp/ph > /root/usuarios.db\n\tif [[ -e /etc/openvpn/server.conf ]]; then\n\t\tremove_ovp $user\n\tfi\ndone\necho '0' > /etc/VPSManager/Exp\ntput sgr0 \necho \"\"\n"
  },
  {
    "path": "Modulos/infousers",
    "content": "#!/bin/bash\nclear\necho -e \"\\E[44;1;37m◇User        ◇Password      ◇limit     ◇validity \\E[0m\"\necho \"\"\n[[ ! -e /bin/versao ]] && rm -rf /bin/menu\nfor users in `awk -F : '$3 > 900 { print $1 }' /etc/passwd |sort |grep -v \"nobody\" |grep -vi polkitd |grep -vi system-`\ndo\nif [[ $(grep -cw $users $HOME/usuarios.db) == \"1\" ]]; then\n    lim=$(grep -w $users $HOME/usuarios.db | cut -d' ' -f2)\nelse\n    lim=\"1\"\nfi\nif [[ -e \"/etc/VPSManager/senha/$users\" ]]; then\n    senha=$(cat /etc/VPSManager/senha/$users)\nelse\n    senha=\"Null\"\nfi\ndatauser=$(chage -l $users |grep -i co |awk -F : '{print $2}')\nif [ $datauser = never ] 2> /dev/null\nthen\ndata=\"\\033[1;33mNunca\\033[0m\"\nelse\n    databr=\"$(date -d \"$datauser\" +\"%Y%m%d\")\"\n    hoje=\"$(date -d today +\"%Y%m%d\")\"\n    if [ $hoje -ge $databr ]\n    then\n    data=\"\\033[1;31mVenceu\\033[0m\"\n    else\n    dat=\"$(date -d\"$datauser\" '+%Y-%m-%d')\"\n    data=$(echo -e \"$((($(date -ud $dat +%s)-$(date -ud $(date +%Y-%m-%d) +%s))/86400)) \\033[1;37mDias\\033[0m\")\n    fi\nfi\nUsuario=$(printf ' %-15s' \"$users\")\nSenha=$(printf '%-13s' \"$senha\")\nLimite=$(printf '%-10s' \"$lim\")\nData=$(printf '%-1s' \"$data\")\necho -e \"\\033[1;33m$Usuario \\033[1;37m$Senha \\033[1;37m$Limite \\033[1;32m$Data\\033[0m\"\necho -e \"\\033[0;34m◇────────────────────────────────────────────────◇\\033[0m\"\ndone\necho \"\"\n_tuser=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\n_ons=$(ps -x | grep sshd | grep -v root | grep priv | wc -l)\n[[ \"$(cat /etc/VPSManager/Exp)\" != \"\" ]] && _expuser=$(cat /etc/VPSManager/Exp) || _expuser=\"0\"\n[[ -e /etc/openvpn/openvpn-status.log ]] && _onop=$(grep -c \"10.8.0\" /etc/openvpn/openvpn-status.log) || _onop=\"0\"\n[[ -e /etc/default/dropbear ]] && _drp=$(ps aux | grep dropbear | grep -v grep | wc -l) _ondrp=$(($_drp - 1)) || _ondrp=\"0\"\n_onli=$(($_ons + $_onop + $_ondrp))\necho -e \"\\033[1;33m◇ \\033[1;36mTOTAL USERS\\033[1;37m $_tuser \\033[1;33m◇ \\033[1;32mONLINE\\033[1;37m: $_onli \\033[1;33m◇ \\033[1;31mEXPIRED\\033[1;37m: $_expuser \\033[1;33m◇\\033[0m\"\n"
  },
  {
    "path": "Modulos/instsqd",
    "content": "clear\nop=$1\n[[ ! -d /usr/share/.hehe ]] && exit 0\nfun_sqd01() {\n[[ -e /etc/apt/sources.list.d/trusty_sources.list ]] && {\nrm /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1\n[[ $(grep -wc 'Debian' /etc/issue.net) != '0' ]] && {\napt-key del 3B4FE6ACC0B21F32 >/dev/null 2>&1\n}\napt remove squid3=3.3.8-1ubuntu6 squid=3.3.8-1ubuntu6 squid3-common=3.3.8-1ubuntu6 -y >/dev/null 2>&1\napt update -y >/dev/null 2>&1\napt autoremove -y >/dev/null 2>&1\n}\napt install squid3 -y >/dev/null 2>&1\n}\nfun_sqd02() {\n[[ ! -e /etc/apt/sources.list.d/trusty_sources.list ]] && {\ntouch /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1\necho \"deb http://us.archive.ubuntu.com/ubuntu/ trusty main universe\" | tee --append /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1\n}\n[[ $(grep -wc 'Debian' /etc/issue.net) != '0' ]] && {\napt install dirmngr -y >/dev/null 2>&1\n[[ $(apt-key list 2>/dev/null | grep -c 'Ubuntu') == '0' ]] && {\napt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 >/dev/null 2>&1\n}\n}\napt update -y >/dev/null 2>&1\napt install squid3=3.3.8-1ubuntu6 squid=3.3.8-1ubuntu6 squid3-common=3.3.8-1ubuntu6 -y >/dev/null 2>&1\nwget -qO- https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/squid3 >/etc/init.d/squid3\nchmod +x /etc/init.d/squid3 >/dev/null 2>&1\nupdate-rc.d squid3 defaults >/dev/null 2>&1\n}\n[[ $op == '1' ]] && {\nfun_sqd02\n} || {\nfun_sqd01\n}\n"
  },
  {
    "path": "Modulos/limiter",
    "content": "#!/bin/bash\n\nclear\ndatabase=\"/root/usuarios.db\"\nfun_multilogin() {\n\t(\n\t\twhile read user; do\n\t\t\t[[ $(grep -wc \"$user\" $database) != '0' ]] && limit=\"$(grep -w $user $database | cut -d' ' -f2)\" || limit='1'\n\t\t\tconssh=\"$(ps -u $user | grep sshd | wc -l)\"\n\t\t\t[[ \"$conssh\" -gt \"$limit\" ]] && {\n\t\t\t\tpkill -u $user\n\t\t\t}\n\t\t\t[[ -e /etc/openvpn/openvpn-status.log ]] && {\n\t\t\t\tovp=\"$(grep -E ,\"$user\", /etc/openvpn/openvpn-status.log | wc -l)\"\n\t\t\t\t[[ \"$ovp\" -gt \"$limit\" ]] && {\n\t\t\t\t\tpidokill=$(($limit - $ovp))\n\t\t\t\t\tlistpid=$(grep -E ,\"$user\", /etc/openvpn/openvpn-status.log | cut -d \",\" -f3 | head -n $pidokill)\n\t\t\t\t\twhile read ovpids; do\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\ttelnet localhost 7505 <<-EOF\n\t\t\t\t\t\t\t\tkill $ovpids\n\t\t\t\t\t\t\tEOF\n\t\t\t\t\t\t) &>/dev/null &\n\t\t\t\t\tdone <<<\"$listpid\"\n\t\t\t\t}\n\t\t\t}\n\t\tdone <<<\"$(awk -F: '$3 >= 1000 {print $1}' /etc/passwd)\"\n\t) &\n}\nwhile true; do\n    echo 'Checking...'\n\tfun_multilogin > /dev/null 2>&1\n\tsleep 15s\ndone\n"
  },
  {
    "path": "Modulos/menu",
    "content": "#!/bin/bash\nfun_bar () {\ncomando[0]=\"$1\"\ncomando[1]=\"$2\"\n (\n[[ -e $HOME/fim ]] && rm $HOME/fim\n[[ ! -e /usr/lib/vpsmanager ]] && rm -rf /bin/menu > /dev/null 2>&1\n${comando[0]} -y > /dev/null 2>&1\n${comando[1]} -y > /dev/null 2>&1\ntouch $HOME/fim\n ) > /dev/null 2>&1 &\n tput civis\necho -ne \"\\033[1;33m[\"\nwhile true; do\n   for((i=0; i<18; i++)); do\n   echo -ne \"\\033[1;31m#\"\n   sleep 0.1s\n   done\n   [[ -e $HOME/fim ]] && rm $HOME/fim && break\n   echo -e \"\\033[1;33m]\"\n   sleep 1s\n   tput cuu1\n   tput dl1\n   echo -ne \"\\033[1;33m[\"\ndone\necho -e \"\\033[1;33m]\\033[1;37m -\\033[1;32m OK !\\033[1;37m\"\ntput cnorm\n}\nIP=$(cat /etc/IP)\nx=\"ok\"\nmenu ()\n{\nvelocity () {\naguarde () {\ncomando[0]=\"$1\"\ncomando[1]=\"$2\"\n (\n[[ -e $HOME/fim ]] && rm $HOME/fim\n[[ ! -d /etc/VPSManager ]] && rm -rf /bin/menu\n${comando[0]} > /dev/null 2>&1\n${comando[1]} > /dev/null 2>&1\ntouch $HOME/fim\n ) > /dev/null 2>&1 &\n tput civis\necho -ne \"  \\033[1;33mPlease Wait... \\033[1;37m- \\033[1;33m[\"\nwhile true; do\n   for((i=0; i<18; i++)); do\n   echo -ne \"\\033[1;31m#\"\n   sleep 0.1s\n   done\n   [[ -e $HOME/fim ]] && rm $HOME/fim && break\n   echo -e \"\\033[1;33m]\"\n   sleep 1s\n   tput cuu1\n   tput dl1\n   echo -ne \"  \\033[1;33mPlease Wait... \\033[1;37m- \\033[1;33m[\"\ndone\necho -e \"\\033[1;33m]\\033[1;37m -\\033[1;32m OK !\\033[1;37m\"\ntput cnorm\n}\nfun_tst () {\nspeedtest --share > speed\n}\necho \"\"\necho -e \"   \\033[1;32mㅤ🐉ㅤTESTING SERVER SPEEDㅤ🐉ㅤ\\033[0m\"\necho \"\"\naguarde 'fun_tst'\necho \"\"\npng=$(cat speed | sed -n '5 p' |awk -F : {'print $NF'})\ndown=$(cat speed | sed -n '7 p' |awk -F :  {'print $NF'})\nupl=$(cat speed | sed -n '9 p' |awk -F :  {'print $NF'})\nlnk=$(cat speed | sed -n '10 p' |awk {'print $NF'})\necho -e \"\\033[0;34m◇─────────────────────────────────────────◇\\033[0m\"\necho -e \"\\033[1;32m◇ PING (LATENCY):\\033[1;37m$png\"\necho -e \"\\033[1;32m◇ DOWNLOAD:\\033[1;37m$down\"\necho -e \"\\033[1;32m◇ UPLOAD:\\033[1;37m$upl\"\necho -e \"\\033[1;32m◇ LINK: \\033[1;36m$lnk\\033[0m\"\necho -e \"\\033[0;34m◇─────────────────────────────────────────◇\\033[0m\"\nrm -rf $HOME/speed\n}\n#limiter\nfunction limit1 () {\n   clear\n   echo -e \"\\n\\033[1;32m◇ㅤSTARTING USER LIMITER... \\033[0m\"\n   echo \"\"\n   fun_bar 'screen -dmS limiter limiter' 'sleep 3'\n   [[ $(grep -wc \"limiter\" /etc/autostart) = '0' ]] && {\n       echo -e \"ps x | grep 'limiter' | grep -v 'grep' && echo 'ON' || screen -dmS limiter limiter\" >> /etc/autostart\n   } || {\n       sed -i '/limiter/d' /etc/autostart\n\t   echo -e \"ps x | grep 'limiter' | grep -v 'grep' && echo 'ON' || screen -dmS limiter limiter\" >> /etc/autostart\n   }\n   echo -e \"\\n\\033[1;32m◇ㅤUSER LIMITER ACTIVED !\\033[0m\"\n   sleep 3\n   menu\n}\nfunction limit2 () {\n   clear\n   echo -e \"\\033[1;32m◇ㅤSTOPPING USER LIMITER... \\033[0m\"\n   echo \"\"\n   fun_stplimiter () {\n      sleep 1\n      screen -r -S \"limiter\" -X quit\n      screen -wipe 1>/dev/null 2>/dev/null\n      [[ $(grep -wc \"limiter\" /etc/autostart) != '0' ]] && {\n          sed -i '/limiter/d' /etc/autostart\n      }\n      sleep 1\n   }\n   fun_bar 'fun_stplimiter' 'sleep 3'\n   echo -e \"\\n\\033[1;31m◇ㅤUSER LIMITER STOPPED!\\033[0m\"\n   sleep 3\n   menu\n}\nfunction limit_ssh () {\n[[ $(ps x | grep \"limiter\"|grep -v grep |wc -l) = '0' ]] && limit1 || limit2\n}\n\nfunction autoexec () {\n   if grep \"menu;\" /etc/profile > /dev/null; then\n      clear\n      echo -e \"\\033[1;32m◇ㅤDISABLING SELF-RUN\\033[0m\"\n      offautmenu () {\n         sed -i '/menu;/d' /etc/profile\n      }\n      echo \"\"\n      fun_bar 'offautmenu'\n      echo \"\"\n      echo -e \"\\033[1;31m◇ㅤAUTO RUN DISABLED!\\033[0m\"\n      sleep 1.5s\n      menu2\n   else\n      clear\n      echo -e \"\\033[1;32mA◇ㅤCTIVATING SELF-RUN\\033[0m\"\n      autmenu () {\n         grep -v \"^menu;\" /etc/profile > /tmp/tmpass && mv /tmp/tmpass /etc/profile\n         echo \"menu;\" >> /etc/profile\n      }\n      echo \"\"\n      fun_bar 'autmenu'\n      echo \"\"\n      echo -e \"\\033[1;32m◇ㅤAUTO RUN ON!\\033[0m\"\n      sleep 1.5s\n      menu2\n   fi\n\n}\n#menu2\nmenu2 (){\n[[ -e /etc/Plus-torrent ]] && stsf=$(echo -e \"\\033[1;32m♦ \") || stsf=$(echo -e \"\\033[1;31m○ \")\nstsbot=$(ps x | grep \"bot_plus\"|grep -v grep > /dev/null && echo -e \"\\033[1;32m♦ \" || echo -e \"\\033[1;31m○ \")\nautm=$(grep \"menu;\" /etc/profile > /dev/null && echo -e \"\\033[1;32m♦ \" || echo -e \"\\033[1;31m○ \")\n[[ ! -e /usr/lib/licence ]] && rm -rf /bin > /dev/null 2>&1\nif [[ \"$(grep -c \"Ubuntu\" /etc/issue.net)\" = \"1\" ]]; then\nsystem=$(cut -d' ' -f1 /etc/issue.net)\nsystem+=$(echo ' ')\nsystem+=$(cut -d' ' -f2 /etc/issue.net |awk -F \".\" '{print $1}')\nelif [[ \"$(grep -c \"Debian\" /etc/issue.net)\" = \"1\" ]]; then\nsystem=$(cut -d' ' -f1 /etc/issue.net)\nsystem+=$(echo ' ')\nsystem+=$(cut -d' ' -f3 /etc/issue.net)\nelse\nsystem=$(cut -d' ' -f1 /etc/issue.net)\nfi\n_ons=$(ps -x | grep sshd | grep -v root | grep priv | wc -l)\n[[ \"$(cat /etc/VPSManager/Exp)\" != \"\" ]] && _expuser=$(cat /etc/VPSManager/Exp) || _expuser=\"0\"\n[[ -e /etc/openvpn/openvpn-status.log ]] && _onop=$(grep -c \"10.8.0\" /etc/openvpn/openvpn-status.log) || _onop=\"0\"\n[[ -e /etc/default/dropbear ]] && _drp=$(ps aux | grep dropbear | grep -v grep | wc -l) _ondrp=$(($_drp - 1)) || _ondrp=\"0\"\n_onli=$(($_ons + $_onop + $_ondrp))\n_ram=$(printf ' %-9s' \"$(free -h | grep -i mem | awk {'print $2'})\")\n_usor=$(printf '%-8s' \"$(free -m | awk 'NR==2{printf \"%.2f%%\", $3*100/$2 }')\")\n_usop=$(printf '%-1s' \"$(top -bn1 | awk '/Cpu/ { cpu = \"\" 100 - $8 \"%\" }; END { print cpu }')\")\n_core=$(printf '%-1s' \"$(grep -c cpu[0-9] /proc/stat)\")\n_system=$(printf '%-14s' \"$system\")\n_hora=$(printf '%(%H:%M:%S)T')\n_onlin=$(printf '%-5s' \"$_onli\")\n_userexp=$(printf '%-5s' \"$_expuser\")\n_tuser=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\nclear\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho -e \"\\E[41;1;37m           •ㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ•        \\E[0m\"\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho -e \"\\033[1;32m◇ㅤSYSTEM          ◇ㅤRAM MEMORY    ◇ㅤPROCESSOR\"\necho -e \"\\033[1;31mOS: \\033[1;37m$_system \\033[1;31mTotal:\\033[1;37m$_ram \\033[1;31mCPU cores: \\033[1;37m$_core\\033[0m\"\necho -e \"\\033[1;31mUp Time: \\033[1;37m$_hora  \\033[1;31mIn use: \\033[1;37m$_usor \\033[1;31mIn use: \\033[1;37m$_usop\\033[0m\"\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\n[[ ! -e /tmp/att ]]  && {\n    echo -e \"\\033[1;32m◇ㅤOnline:\\033[1;37m $_onlin   \\033[1;31m◇ㅤexpired: \\033[1;37m$_userexp\\033[1;33m◇ㅤTotal: \\033[1;37m$_tuser\\033[0m\"\n    var01='\\033[1;37m•'\n} || {\n    echo -e \"  \\033[1;33m[\\033[1;31m!\\033[1;33m]  \\033[1;32m◇ THERE IS AN UPDATE AVAILABLE!  \\033[1;33m[\\033[1;31m!\\033[1;33m]\\033[0m\"\n    var01=\"\\033[1;32m!\"\n}\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho \"\"\necho -e \"\\033[1;31m[\\033[1;36m20\\033[1;31m] \\033[1;37m◇ \\033[1;33mADD HOST \\033[1;31m           [\\033[1;36m26\\033[1;31m] \\033[1;37m◇ \\033[1;33mCHANGE ROOT PASSWORD \\033[1;31m\n[\\033[1;36m21\\033[1;31m] \\033[1;37m◇ \\033[1;33mREMOVE HOST \\033[1;31m        [\\033[1;36m27\\033[1;31m] \\033[1;37m◇ \\033[1;33mSELF EXECUTION $autm \\033[1;31m\n[\\033[1;36m22\\033[1;31m] \\033[1;37m◇ \\033[1;33mRESTART SYSTEM \\033[1;31m     [\\033[1;36m28\\033[1;31m] $var01 \\033[1;33mUPDATE SCRIPT \\033[1;31m\n[\\033[1;36m23\\033[1;31m] \\033[1;37m◇ \\033[1;33mRESTART SERVICES \\033[1;31m   [\\033[1;36m29\\033[1;31m] \\033[1;37m◇ \\033[1;33mREMOVE SCRIPT \\033[1;31m\n[\\033[1;36m24\\033[1;31m] \\033[1;37m◇ \\033[1;33mBLOCK TORRENT $stsf\\033[1;31m    [\\033[1;36m30\\033[1;31m] \\033[1;37m◇ \\033[1;33mCOME BACK \\033[1;32m<\\033[1;33m<\\033[1;31m< \\033[1;31m\n[\\033[1;36m25\\033[1;31m] \\033[1;37m◇ \\033[1;33mTELEGRAM BOT $stsbot\\033[1;31m     [\\033[1;36m00\\033[1;31m] \\033[1;37m◇ \\033[1;33mGET OUT \\033[1;32m<\\033[1;33m<\\033[1;31m<\\033[1;31m\"\necho \"\"\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho \"\"\necho -ne \"\\033[1;32m◇ WHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;31m?\\033[1;37m : \"; read x\ncase \"$x\" in\n   20)\n   clear\n   addhost\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   menu2\n   ;;\n   21)\n   clear\n   delhost\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   menu2\n   ;;\n   22)\n   clear\n   reiniciarsistema\n   ;;\n   23)\n   clear\n   reiniciarservicos\n   sleep 3\n   ;;\n   24)\n   blockt\n   ;;\n   25)\n   botssh\n   ;;\n   26)\n   clear\n   senharoot\n   sleep 3\n   ;;\n   27)\n   autoexec\n   ;;\n   28)\n   attscript\n   ;;\n   29)\n   clear\n   delscript\n   ;;\n   30)\n   menu\n   ;;\n   0|00)\n   echo -e \"\\033[1;31m◇ Going out...\\033[0m\"\n   sleep 2\n   clear\n   exit;\n   ;;\n   *)\n   echo -e \"\\n\\033[1;31m◇ Invalid option !\\033[0m\"\n   sleep 2\nesac\n}\nwhile true $x != \"ok\"\ndo\nstsl=$(ps x | grep \"limiter\"|grep -v grep > /dev/null && echo -e \"\\033[1;32m♦ \" || echo -e \"\\033[1;31m○ \")\nstsu=$(ps x | grep \"udpvpn\"|grep -v grep > /dev/null && echo -e \"\\033[1;32m♦ \" || echo -e \"\\033[1;31m○ \")\nif [[ \"$(grep -c \"Ubuntu\" /etc/issue.net)\" = \"1\" ]]; then\nsystem=$(cut -d' ' -f1 /etc/issue.net)\nsystem+=$(echo ' ')\nsystem+=$(cut -d' ' -f2 /etc/issue.net |awk -F \".\" '{print $1}')\nelif [[ \"$(grep -c \"Debian\" /etc/issue.net)\" = \"1\" ]]; then\nsystem=$(cut -d' ' -f1 /etc/issue.net)\nsystem+=$(echo ' ')\nsystem+=$(cut -d' ' -f3 /etc/issue.net)\nelse\nsystem=$(cut -d' ' -f1 /etc/issue.net)\nfi\n_ons=$(ps -x | grep sshd | grep -v root | grep priv | wc -l)\n[[ \"$(cat /etc/VPSManager/Exp)\" != \"\" ]] && _expuser=$(cat /etc/VPSManager/Exp) || _expuser=\"0\"\n[[ -e /etc/openvpn/openvpn-status.log ]] && _onop=$(grep -c \"10.8.0\" /etc/openvpn/openvpn-status.log) || _onop=\"0\"\n[[ -e /etc/default/dropbear ]] && _drp=$(ps aux | grep dropbear | grep -v grep | wc -l) _ondrp=$(($_drp - 1)) || _ondrp=\"0\"\n_onli=$(($_ons + $_onop + $_ondrp))\n_ram=$(printf ' %-9s' \"$(free -h | grep -i mem | awk {'print $2'})\")\n_usor=$(printf '%-8s' \"$(free -m | awk 'NR==2{printf \"%.2f%%\", $3*100/$2 }')\")\n_usop=$(printf '%-1s' \"$(top -bn1 | awk '/Cpu/ { cpu = \"\" 100 - $8 \"%\" }; END { print cpu }')\")\n_core=$(printf '%-1s' \"$(grep -c cpu[0-9] /proc/stat)\")\n_system=$(printf '%-14s' \"$system\")\n_hora=$(printf '%(%H:%M:%S)T')\n_onlin=$(printf '%-5s' \"$_onli\")\n_userexp=$(printf '%-5s' \"$_expuser\")\n_tuser=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\nclear\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho -e \"\\E[41;1;37m           •ㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ•        \\E[0m\"\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho -e \"\\033[1;32m◇ㅤSYSTEM          ◇ㅤRAM MEMORY    ◇ㅤPROCESSOR \"\necho -e \"\\033[1;31mOS: \\033[1;37m$_system \\033[1;31mTotal:\\033[1;37m$_ram \\033[1;31mCPU cores: \\033[1;37m$_core\\033[0m\"\necho -e \"\\033[1;31mUp Time: \\033[1;37m$_hora  \\033[1;31mIn use: \\033[1;37m$_usor \\033[1;31mIn use: \\033[1;37m$_usop\\033[0m\"\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho -e \"\\033[1;32m◇ㅤOnline:\\033[1;37m $_onlin   \\033[1;31m◇ㅤexpired: \\033[1;37m$_userexp\\033[1;33m◇ㅤTotal: \\033[1;37m$_tuser\\033[0m\"\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho \"\"\necho -e \"\\033[1;31m[\\033[1;36m01\\033[1;31m] \\033[1;37m◇ \\033[1;33mCREATE USER \\033[1;31m            [\\033[1;36m11\\033[1;31m] \\033[1;37m◇ \\033[1;33mSPEEDTEST \\033[1;31m\n[\\033[1;36m02\\033[1;31m] \\033[1;37m◇ \\033[1;33mCREATE TEST USER \\033[1;31m       [\\033[1;36m12\\033[1;31m] \\033[1;37m◇ \\033[1;33mBANNER \\033[1;31m\n[\\033[1;36m03\\033[1;31m] \\033[1;37m\\033[1;37m◇ \\033[1;33mREMOVE USER \\033[1;31m            [\\033[1;36m13\\033[1;31m] \\033[1;37m◇ \\033[1;33mNETWORK TRAFFIC \\033[1;31m\n[\\033[1;36m04\\033[1;31m] \\033[1;37m◇ \\033[1;33mONLINE USER MONITOR \\033[1;31m    [\\033[1;36m14\\033[1;31m] \\033[1;37m◇ \\033[1;33mVPS OPTIMIZE \\033[1;31m\n[\\033[1;36m05\\033[1;31m] \\033[1;37m◇ \\033[1;33mCHANGE DATE \\033[1;31m            [\\033[1;36m15\\033[1;31m] \\033[1;37m◇ \\033[1;33mUSER BACKUP \\033[1;31m\n[\\033[1;36m06\\033[1;31m] \\033[1;37m◇ \\033[1;33mCHANGE LIMIT \\033[1;31m           [\\033[1;36m16\\033[1;31m] \\033[1;37m◇ \\033[1;33mUSER LIMITER $stsl\\033[1;31m\n[\\033[1;36m07\\033[1;31m] \\033[1;37m◇ \\033[1;33mCHANGE PASSWORD \\033[1;31m        [\\033[1;36m17\\033[1;31m] \\033[1;37m◇ \\033[1;33mBAD VPN $stsu\\033[1;31m\n[\\033[1;36m08\\033[1;31m] \\033[1;37m◇ \\033[1;33mREMOVE EXPIRED \\033[1;31m         [\\033[1;36m18\\033[1;31m] \\033[1;37m◇ \\033[1;33mVPS INFO \\033[1;31m\n[\\033[1;36m09\\033[1;31m] \\033[1;37m◇ \\033[1;33mUSER REPORT \\033[1;31m            [\\033[1;36m19\\033[1;31m] \\033[1;37m◇ \\033[1;33mMORE OPTIONS \\033[1;31m>\\033[1;33m>\\033[1;32m>\\033[0m\\033[1;31m\n[\\033[1;36m10\\033[1;31m] \\033[1;37m◇ \\033[1;33mCONNECTION MODE \\033[1;31m        [\\033[1;36m00\\033[1;31m] \\033[1;37m◇ \\033[1;33mGET OUT \\033[1;32m<\\033[1;33m<\\033[1;31m<\\033[0m \\033[0m\"\necho \"\"\necho -e \"\\033[0;34m◇───────────────────────────────────────────────◇\\033[0m\"\necho \"\"\necho -ne \"\\033[1;32m◇ WHAT DO YOU WANT TO DO \\033[1;33m?\\033[1;31m?\\033[1;37m : \"; read x\n\ncase \"$x\" in \n   1 | 01)\n   clear\n   criarusuario\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   ;;\n   2 | 02)\n   clear\n   criarteste\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   ;;\n   3 | 03)\n   clear\n   remover\n   sleep 3\n   ;;\n   4 | 04)\n   clear\n   sshmonitor\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   ;;      \n   5 | 05)\n   clear\n   mudardata\n   sleep 3\n   ;;\n   6 | 06)\n   clear\n   alterarlimite\n   sleep 3\n   ;; \n   7 | 07)\n   clear\n   alterarsenha\n   sleep 3\n   ;;\n   8 | 08)\n   clear\n   expcleaner\n   echo \"\"\n   sleep 3\n   ;;     \n   9 | 09)\n   clear\n   infousers\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   ;;\n   10)\n   conexao\n   exit;\n   ;;\n   11)\n   clear\n   velocity\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   ;;\n   12)\n   clear\n   banner\n   sleep 3\n   ;;\n   13)\n   clear\n   echo -e \"\\033[1;32m◇ TO GET OUT PRESS:- CTRL + C\\033[1;36m\"\n   sleep 4\n   nload\n   ;;\n   14)\n   clear\n   otimizar\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   ;;\n   15)\n   userbackup\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   ;;\n   16)\n   limit_ssh\n   ;;\n   17)\n   clear\n   badvpn\n   exit;\n   ;;\n   18)\n   clear\n   detalhes\n   echo -ne \"\\n\\033[1;31m◇ ENTER \\033[1;33mto return to \\033[1;32mMENU!\\033[0m\"; read\n   ;;\n   19)\n   menu2\n   ;;\n   0 | 00)\n   echo -e \"\\033[1;31m◇ Going out...\\033[0m\"\n   sleep 2\n   clear\n   exit;\n   ;;\n   *)\n   echo -e \"\\n\\033[1;31m◇ Invalid option !\\033[0m\"\n   sleep 2\nesac\ndone\n}\nmenu\n#fim\n"
  },
  {
    "path": "Modulos/mudardata",
    "content": "#!/bin/bash\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%33s%s%-12s\\n' \"🐉ㅤ📅ㅤchange expiry dateㅤ📅ㅤ🐉\" ; tput sgr0\necho \"\"\necho -e \"\\033[1;33m◇ LIST OF USERS AND EXPIRY DATE:\\033[0m \"\necho \"\"\ntput setaf 7 ; tput bold \ndatabase=\"/root/usuarios.db\"\nlist_user=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody)\ni=0\ni=0\nunset _userPass\nwhile read user; do\n\ti=$(expr $i + 1)\n\t_oP=$i\n\t[[ $i == [1-9] ]] && i=0$i && oP+=\" 0$i\"\n\texpire=\"$(chage -l $user | grep -E \"Account expires\" | cut -d ' ' -f3-)\"\n\tif [[ $expire == \"never\" ]]\n\tthen\n\t\techo -e \"\\033[1;31m[\\033[1;36m$i\\033[1;31m] \\033[1;37m- \\033[1;32m$user     \\033[1;33m00/00/0000   S/DATE\\033[0m\"\n\telse\n\t\tdatabr=\"$(date -d \"$expire\" +\"%Y%m%d\")\"\n\t\thoje=\"$(date -d today +\"%Y%m%d\")\"\n\t\tif [ $hoje -ge $databr ]\n\t\tthen\n\t\t\t_user=$(echo -e \"\\033[1;31m[\\033[1;36m$i\\033[1;31m] \\033[1;37m- \\033[1;32m$user\\033[1;37m\")\n\t\t\tdatanormal=\"$(echo -e \"\\033[1;31m$(date -d\"$expire\" '+%d/%m/%Y')\")\"\n\t\t\texpired=$(echo -e \"\\033[1;31m◇ㅤUNVALID\\033[0m\")\n\t\t\tprintf '%-62s%-20s%s\\n' \"$_user\" \"$datanormal\" \"$expired\"\n\t\t\techo \"exp\" > /tmp/exp\n\t\telse\n\t\t\t_user=$(echo -e \"\\033[1;31m[\\033[1;36m$i\\033[1;31m] \\033[1;37m- \\033[1;32m$user\\033[1;37m\")\n\t\t\tdatanormal=\"$(echo -e \"\\033[1;33m$(date -d\"$expire\" '+%d/%m/%Y')\")\"\n\t\t\tative=$(echo -e \"\\033[1;32m◇ㅤVALID\\033[0m\")\n\t\t\tprintf '%-62s%-20s%s\\n' \"$_user\" \"$datanormal\" \"$ative\"\n\t\tfi\n\tfi\n\t_userPass+=\"\\n${_oP}:${user}\"\ndone <<< \"${list_user}\"\ntput sgr0\necho \"\"\nif [ -a /tmp/exp ]\nthen\n\trm /tmp/exp\nfi\nnum_user=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\necho -ne \"\\033[1;32m◇ㅤEnter or select a user \\033[1;33m[\\033[1;36m1\\033[1;33m-\\033[1;36m$num_user\\033[1;33m]\\033[1;37m: \" ; read option\nif [[ -z $option ]]\nthen\n\techo \"\"\n\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"◇ㅤError, Empty or Invalid Username! \" ; tput sgr0\n\texit 1\nfi\nusuario=$(echo -e \"${_userPass}\" | grep -E \"\\b$option\\b\" | cut -d: -f2)\nif [[ -z $usuario ]]\nthen\n\techo \"\"\n\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"◇ㅤError, Empty or Invalid Username!!! \" ; tput sgr0\n\techo \"\"\n\texit 1\nelse\n\tif [[ `grep -c /$usuario: /etc/passwd` -ne 0 ]]\n\tthen\n\t    echo \"\"\n\t    echo -e \"\\033[1;31m◇EX:\\033[1;33m(\\033[1;32mDATE: \\033[1;37mDAY/MONTH/YEAR \\033[1;33mOR \\033[1;32mDAYS: \\033[1;37m30\\033[1;33m)\"\n\t    echo \"\"\n\t    echo -ne \"\\033[1;32m◇ㅤNew date or days for the user \\033[1;33m$usuario: \\033[1;37m\"; read inputdate\n\t    if [[ \"$(echo -e \"$inputdate\" | grep -c \"/\")\" = \"0\" ]]; then \n\t    \tudata=$(date \"+%d/%m/%Y\" -d \"+$inputdate days\")\n\t    \tsysdate=\"$(echo \"$udata\" | awk -v FS=/ -v OFS=- '{print $3,$2,$1}')\"\n\t    else\n\t    \tudata=$(echo -e \"$inputdate\")\n\t    \tsysdate=\"$(echo \"$inputdate\" | awk -v FS=/ -v OFS=- '{print $3,$2,$1}')\"\n\t    fi\n\t\tif (date \"+%Y-%m-%d\" -d \"$sysdate\" > /dev/null  2>&1)\n\t\tthen\n\t\t\tif [[ -z $inputdate ]]\n\t\t\tthen\n\t\t\t\techo \"\"\n\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ;\techo \"◇ㅤYou have entered an invalid or non-existent date!\" ; echo \"Enter a valid date in DAY/MONTH/YEAR format \" ; echo \"For example: 21/04/2022\" ; tput sgr0 ; tput sgr0\n\t\t\t\techo \"\"\n\t\t\t\texit 1\t\n\t\t\telse\n\t\t\t\tif (echo $inputdate | egrep [^a-zA-Z] &> /dev/null)\n\t\t\t\tthen\n\t\t\t\t\ttoday=\"$(date -d today +\"%Y%m%d\")\"\n\t\t\t\t\ttimemachine=\"$(date -d \"$sysdate\" +\"%Y%m%d\")\"\n\t\t\t\t\tif [ $today -ge $timemachine ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ;\techo \"◇ㅤYou have entered an invalid or non-existent date!!\" ; echo \"Enter a valid future date in DAY/MONTH/YEAR format\" ; echo \"For example: 21/04/2022\" ; tput sgr0\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\texit 1\n\t\t\t\t\telse\n\t\t\t\t\t\tchage -E $sysdate $usuario\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"◇ㅤUser Success $usuario new date: $udata \" ; tput sgr0\n\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\texit 1\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\techo \"\"\n\t\t\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ;\techo \"◇ㅤYou have entered an invalid or non-existent date!\" ; echo \"Enter a valid date in DAY/MONTH/YEAR format\" ; echo \"For example: 21/04/2022\" ; tput sgr0\n\t\t\t\t\techo \"\"\n\t\t\t\t\texit 1\n\t\t\t\tfi\n\t\t\tfi\n\t\telse\n\t\t\techo \"\"\n\t\t\ttput setaf 7 ; tput setab 1 ; tput bold ;\techo \"◇ㅤYou have entered an invalid or non-existent date!\" ; echo \"Enter a valid date in DAY/MONTH/YEAR format\" ; echo \"For example: 21/04/2018\" ; tput sgr0\n\t\t\techo \"\"\n\t\t\texit 1\n\t\tfi\n\telse\n\t\techo \" \"\n\t\ttput setaf 7 ; tput setab 1 ; tput bold ;\techo \"◇ㅤThe user $usuario does not exist!\" ; tput sgr0\n\t\techo \" \"\n\t\texit 1\n\tfi\nfi\n"
  },
  {
    "path": "Modulos/onlineapp.sh",
    "content": "#!/bin/bash\nps -x | grep sshd | grep -v root | grep priv | wc -l > /var/www/html/server/online"
  },
  {
    "path": "Modulos/open.py",
    "content": "#!/usr/bin/env python3\n# encoding: utf-8\nimport socket, threading, thread, select, signal, sys, time\nfrom os import system\nsystem(\"clear\")\n#conexao\nIP = '0.0.0.0'\ntry:\n   PORT = int(sys.argv[1])\nexcept:\n   PORT = 8080\nPASS = ''\nBUFLEN = 8196 * 8\nTIMEOUT = 60\nMSG = '🐉ㅤDRAGON VPS MANAGERㅤ🐉'\nDEFAULT_HOST = '0.0.0.0:1194'\nRESPONSE = \"HTTP/1.1 200 \" + str(MSG) + \"\\r\\n\\r\\n\"\n\nclass Server(threading.Thread):\n    def __init__(self, host, port):\n        threading.Thread.__init__(self)\n        self.running = False\n        self.host = host\n        self.port = port\n        self.threads = []\n\tself.threadsLock = threading.Lock()\n\tself.logLock = threading.Lock()\n\n    def run(self):\n        self.soc = socket.socket(socket.AF_INET)\n        self.soc.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n        self.soc.settimeout(2)\n        self.soc.bind((self.host, self.port))\n        self.soc.listen(0)\n        self.running = True\n\n        try:                    \n            while self.running:\n                try:\n                    c, addr = self.soc.accept()\n                    c.setblocking(1)\n                except socket.timeout:\n                    continue\n                \n                conn = ConnectionHandler(c, self, addr)\n                conn.start();\n                self.addConn(conn)\n        finally:\n            self.running = False\n            self.soc.close()\n            \n    def printLog(self, log):\n        self.logLock.acquire()\n        print log\n        self.logLock.release()\n\t\n    def addConn(self, conn):\n        try:\n            self.threadsLock.acquire()\n            if self.running:\n                self.threads.append(conn)\n        finally:\n            self.threadsLock.release()\n                    \n    def removeConn(self, conn):\n        try:\n            self.threadsLock.acquire()\n            self.threads.remove(conn)\n        finally:\n            self.threadsLock.release()\n                \n    def close(self):\n        try:\n            self.running = False\n            self.threadsLock.acquire()\n            \n            threads = list(self.threads)\n            for c in threads:\n                c.close()\n        finally:\n            self.threadsLock.release()\n\t\t\t\n\nclass ConnectionHandler(threading.Thread):\n    def __init__(self, socClient, server, addr):\n        threading.Thread.__init__(self)\n        self.clientClosed = False\n        self.targetClosed = True\n        self.client = socClient\n        self.client_buffer = ''\n        self.server = server\n        self.log = 'Conexao: ' + str(addr)\n\n    def close(self):\n        try:\n            if not self.clientClosed:\n                self.client.shutdown(socket.SHUT_RDWR)\n                self.client.close()\n        except:\n            pass\n        finally:\n            self.clientClosed = True\n            \n        try:\n            if not self.targetClosed:\n                self.target.shutdown(socket.SHUT_RDWR)\n                self.target.close()\n        except:\n            pass\n        finally:\n            self.targetClosed = True\n\n    def run(self):\n        try:\n            self.client_buffer = self.client.recv(BUFLEN)\n        \n            hostPort = self.findHeader(self.client_buffer, 'X-Real-Host')\n            \n            if hostPort == '':\n                hostPort = DEFAULT_HOST\n\n            split = self.findHeader(self.client_buffer, 'X-Split')\n\n            if split != '':\n                self.client.recv(BUFLEN)\n            \n            if hostPort != '':\n                passwd = self.findHeader(self.client_buffer, 'X-Pass')\n\t\t\t\t\n                if len(PASS) != 0 and passwd == PASS:\n                    self.method_CONNECT(hostPort)\n                elif len(PASS) != 0 and passwd != PASS:\n                    self.client.send('HTTP/1.1 400 WrongPass!\\r\\n\\r\\n')\n                if hostPort.startswith(IP):\n                    self.method_CONNECT(hostPort)\n                else:\n                   self.client.send('HTTP/1.1 403 Forbidden!\\r\\n\\r\\n')\n            else:\n                print '- No X-Real-Host!'\n                self.client.send('HTTP/1.1 400 NoXRealHost!\\r\\n\\r\\n')\n\n        except Exception as e:\n            self.log += ' - error: ' + e.strerror\n            self.server.printLog(self.log)\n\t    pass\n        finally:\n            self.close()\n            self.server.removeConn(self)\n\n    def findHeader(self, head, header):\n        aux = head.find(header + ': ')\n    \n        if aux == -1:\n            return ''\n\n        aux = head.find(':', aux)\n        head = head[aux+2:]\n        aux = head.find('\\r\\n')\n\n        if aux == -1:\n            return ''\n\n        return head[:aux];\n\n    def connect_target(self, host):\n        i = host.find(':')\n        if i != -1:\n            port = int(host[i+1:])\n            host = host[:i]\n        else:\n            if self.method=='CONNECT':\n                port = 443\n            else:\n                port = 22\n\n        (soc_family, soc_type, proto, _, address) = socket.getaddrinfo(host, port)[0]\n\n        self.target = socket.socket(soc_family, soc_type, proto)\n        self.targetClosed = False\n        self.target.connect(address)\n\n    def method_CONNECT(self, path):\n    \tself.log += ' - CONNECT ' + path\n        self.connect_target(path)\n        self.client.sendall(RESPONSE)\n        self.client_buffer = ''\n        self.server.printLog(self.log)\n        self.doCONNECT()\n                    \n    def doCONNECT(self):\n        socs = [self.client, self.target]\n        count = 0\n        error = False\n        while True:\n            count += 1\n            (recv, _, err) = select.select(socs, [], socs, 3)\n            if err:\n                error = True\n            if recv:\n                for in_ in recv:\n\t\t    try:\n                        data = in_.recv(BUFLEN)\n                        if data:\n\t\t\t    if in_ is self.target:\n\t\t\t\tself.client.send(data)\n                            else:\n                                while data:\n                                    byte = self.target.send(data)\n                                    data = data[byte:]\n\n                            count = 0\n\t\t\telse:\n\t\t\t    break\n\t\t    except:\n                        error = True\n                        break\n            if count == TIMEOUT:\n                error = True\n\n            if error:\n                break\n\n\n\ndef main(host=IP, port=PORT):\n    print \"\\033[0;34m━\"*8,\"\\033[1;32m PROXY SOCKS\",\"\\033[0;34m━\"*8,\"\\n\"\n    print \"\\033[1;33mIP:\\033[1;32m \" + IP\n    print \"\\033[1;33mPORTA:\\033[1;32m \" + str(PORT) + \"\\n\"\n    print \"\\033[0;34m━\"*10,\"\\033[1;32m 🐉ㅤDRAGON VPS MANAGERㅤ🐉\",\"\\033[0;34m━\\033[1;37m\"*11,\"\\n\"\n    server = Server(IP, PORT)\n    server.start()\n    while True:\n        try:\n            time.sleep(2)\n        except KeyboardInterrupt:\n            print '\\nstopping...'\n            server.close()\n            break\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "Modulos/otimizar",
    "content": "#!/bin/bash\n\nfun_bar() {\n\tcomando[0]=\"$1\"\n\tcomando[1]=\"$2\"\n\t(\n\t\t[[ -e $HOME/fim ]] && rm $HOME/fim\n\t\t${comando[0]} -y >/dev/null 2>&1\n\t\t${comando[1]} -y >/dev/null 2>&1\n\t\ttouch $HOME/fim\n\t) >/dev/null 2>&1 &\n\ttput civis\n\techo -ne \"     \\033[1;33m◇ Please Wait... \\033[1;37m- \\033[1;33m[\"\n\twhile true; do\n\t\tfor ((i = 0; i < 18; i++)); do\n\t\t\techo -ne \"\\033[1;31m#\"\n\t\t\tsleep 0.1s\n\t\tdone\n\t\t[[ -e $HOME/fim ]] && rm $HOME/fim && break\n\t\techo -e \"\\033[1;33m]\"\n\t\tsleep 1s\n\t\ttput cuu1\n\t\ttput dl1\n\t\techo -ne \"     \\033[1;33m◇ Please Wait... \\033[1;37m- \\033[1;33m[\"\n\tdone\n\techo -e \"\\033[1;33m]\\033[1;37m -\\033[1;32m OK !\\033[1;37m\"\n\ttput cnorm\n}\n[[ $(grep -wc mlocate /var/lib/dpkg/statoverride) != '0' ]] && sed -i '/mlocate/d' /var/lib/dpkg/statoverride\nclear\necho -e \"\\E[44;1;37m                🐉ㅤServer Optimizeㅤ🐉                \\E[0m\"\necho \"\"\necho -e \"\\033[1;32m             ◇ Updating packages\\033[0m\"\necho \"\"\nfun_bar 'apt-get update -y' 'apt-get upgrade -y'\necho \"\"\necho -e \"\\033[1;32m    ◇ Fixing dependency issues\"\necho\"\"\nfun_bar 'apt-get -f install'\necho\"\"\necho -e \"\\033[1;32m          ◇ Removing useless packages\"\necho \"\"\nfun_bar 'apt-get autoremove -y' 'apt-get autoclean -y'\necho \"\"\necho -e \"\\033[1;32m      ◇  Removing problem packages\"\necho \"\"\nfun_bar 'apt-get -f remove -y' 'apt-get clean -y'\n#Limpar o cache memoria RAM\nclear\necho -e \"\\033[1;31m◇────────────────────────────────────────────────◇\\033[0m\"\necho \"\"\nMEM1=$(free | awk '/Mem:/ {print int(100*$3/$2)}')\nram1=$(free -h | grep -i mem | awk {'print $2'})\nram2=$(free -h | grep -i mem | awk {'print $4'})\nram3=$(free -h | grep -i mem | awk {'print $3'})\nswap1=$(free -h | grep -i swap | awk {'print $2'})\nswap2=$(free -h | grep -i swap | awk {'print $4'})\nswap3=$(free -h | grep -i swap | awk {'print $3'})\necho -e \"\\033[1;31m•\\033[1;32m◇ Before\\033[1;31m•\\033[0m                    \\033[1;31m•\\033[1;32m◇ After\\033[1;31m•\\033[0m\"\necho -e \" \\033[1;33m◇ Total RAM: \\033[1;37m$ram1                   \\033[1;33m◇ Total RAM: \\033[1;37m$swap1\"\necho -e \" \\033[1;33m◇ In use: \\033[1;37m$ram3                  \\033[1;33m◇ In use: \\033[1;37m$swap3\"\necho -e \" \\033[1;33m◇ Free: \\033[1;37m$ram2                   \\033[1;33m◇ Free: \\033[1;37m$swap2\\033[0m\"\necho \"\"\necho -e \"\\033[1;37m◇ Memory \\033[1;32m◇ RAM \\033[1;37m◇ Before Optimization:\\033[1;36m\" $MEM1%\necho \"\"\necho -e \"\\033[1;31m◇────────────────────────────────────────────────◇\\033[0m\"\nsleep 2\necho \"\"\nfun_limpram() {\n\tsync\n\techo 3 >/proc/sys/vm/drop_caches\n\tsync && sysctl -w vm.drop_caches=3\n\tsysctl -w vm.drop_caches=0\n\tswapoff -a\n\tswapon -a\n\tsleep 4\n}\nfunction aguarde() {\n\tsleep 1\n\thelice() {\n\t\tfun_limpram >/dev/null 2>&1 &\n\t\ttput civis\n\t\twhile [ -d /proc/$! ]; do\n\t\t\tfor i in / - \\\\ \\|; do\n\t\t\t\tsleep .1\n\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\tdone\n\t\tdone\n\t\ttput cnorm\n\t}\n\techo -ne \"\\033[1;37m◇ CLEANING MEMORY \\033[1;32m◇ RAM \\033[1;37me \\033[1;32m◇ SWAP\\033[1;32m.\\033[1;33m.\\033[1;31m. \\033[1;33m\"\n\thelice\n\techo -e \"\\e[1DOk\"\n}\naguarde\nsleep 1\nclear\necho -e \"\\033[1;32m◇────────────────────────────────────────────────◇\\033[0m\"\necho \"\"\nMEM2=$(free | awk '/Mem:/ {print int(100*$3/$2)}')\nram1=$(free -h | grep -i mem | awk {'print $2'})\nram2=$(free -h | grep -i mem | awk {'print $4'})\nram3=$(free -h | grep -i mem | awk {'print $3'})\nswap1=$(free -h | grep -i swap | awk {'print $2'})\nswap2=$(free -h | grep -i swap | awk {'print $4'})\nswap3=$(free -h | grep -i swap | awk {'print $3'})\necho -e \"\\033[1;31m•\\033[1;32m◇ Before\\033[1;31m•\\033[0m                    \\033[1;31m•\\033[1;32m◇ After\\033[1;31m•\\033[0m\"\necho -e \" \\033[1;33m◇ Total RAM: \\033[1;37m$ram1                   \\033[1;33m◇ Total RAM: \\033[1;37m$swap1\"\necho -e \" \\033[1;33m◇ In Use: \\033[1;37m$ram3                  \\033[1;33m◇ In use: \\033[1;37m$swap3\"\necho -e \" \\033[1;33m◇ Free: \\033[1;37m$ram2                   \\033[1;33m◇ Free: \\033[1;37m$swap2\\033[0m\"\necho \"\"\necho -e \"\\033[1;37m◇ Memory \\033[1;32mRAM \\033[1;37m◇ Optimized percentage:\\033[1;36m\" $MEM2%\necho \"\"\necho -e \"\\033[1;37m◇ Saving :\\033[1;31m $(expr $MEM1 - $MEM2)%\\033[0m\"\necho \"\"\necho -e \"\\033[1;32m◇────────────────────────────────────────────────◇\\033[0m\"\n"
  },
  {
    "path": "Modulos/proxy.py",
    "content": "#!/usr/bin/env python3\n# encoding: utf-8\nimport socket, threading, thread, select, signal, sys, time\nfrom os import system\nsystem(\"clear\")\n#conexao\nIP = '0.0.0.0'\ntry:\n   PORT = int(sys.argv[1])\nexcept:\n   PORT = 80\nPASS = ''\nBUFLEN = 8196 * 8\nTIMEOUT = 60\nMSG = ''\nCOR = '<font color=\"null\">'\nFTAG = '</font>'\nDEFAULT_HOST = '0.0.0.0:22'\nRESPONSE = \"HTTP/1.1 200 \" + str(COR) + str(MSG) + str(FTAG) + \"\\r\\n\\r\\n\"\n \nclass Server(threading.Thread):\n    def __init__(self, host, port):\n        threading.Thread.__init__(self)\n        self.running = False\n        self.host = host\n        self.port = port\n        self.threads = []\n\tself.threadsLock = threading.Lock()\n\n    def run(self):\n        self.soc = socket.socket(socket.AF_INET)\n        self.soc.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n        self.soc.settimeout(2)\n        self.soc.bind((self.host, self.port))\n        self.soc.listen(0)\n        self.running = True\n\n        try:                    \n            while self.running:\n                try:\n                    c, addr = self.soc.accept()\n                    c.setblocking(1)\n                except socket.timeout:\n                    continue\n                \n                conn = ConnectionHandler(c, self, addr)\n                conn.start();\n                self.addConn(conn)\n        finally:\n            self.running = False\n            self.soc.close()\n            \n\t\n    def addConn(self, conn):\n        try:\n            self.threadsLock.acquire()\n            if self.running:\n                self.threads.append(conn)\n        finally:\n            self.threadsLock.release()\n                    \n    def removeConn(self, conn):\n        try:\n            self.threadsLock.acquire()\n            self.threads.remove(conn)\n        finally:\n            self.threadsLock.release()\n                \n    def close(self):\n        try:\n            self.running = False\n            self.threadsLock.acquire()\n            \n            threads = list(self.threads)\n            for c in threads:\n                c.close()\n        finally:\n            self.threadsLock.release()\n\t\t\t\n\nclass ConnectionHandler(threading.Thread):\n    def __init__(self, socClient, server, addr):\n        threading.Thread.__init__(self)\n        self.clientClosed = False\n        self.targetClosed = True\n        self.client = socClient\n        self.client_buffer = ''\n        self.server = server\n\n    def close(self):\n        try:\n            if not self.clientClosed:\n                self.client.shutdown(socket.SHUT_RDWR)\n                self.client.close()\n        except:\n            pass\n        finally:\n            self.clientClosed = True\n            \n        try:\n            if not self.targetClosed:\n                self.target.shutdown(socket.SHUT_RDWR)\n                self.target.close()\n        except:\n            pass\n        finally:\n            self.targetClosed = True\n\n    def run(self):\n        try:\n            self.client_buffer = self.client.recv(BUFLEN)\n        \n            hostPort = self.findHeader(self.client_buffer, 'X-Real-Host')\n            \n            if hostPort == '':\n                hostPort = DEFAULT_HOST\n\n            split = self.findHeader(self.client_buffer, 'X-Split')\n\n            if split != '':\n                self.client.recv(BUFLEN)\n            \n            if hostPort != '':\n                passwd = self.findHeader(self.client_buffer, 'X-Pass')\n\t\t\t\t\n                if len(PASS) != 0 and passwd == PASS:\n                    self.method_CONNECT(hostPort)\n                elif len(PASS) != 0 and passwd != PASS:\n                    self.client.send('HTTP/1.1 400 WrongPass!\\r\\n\\r\\n')\n                if hostPort.startswith(IP):\n                    self.method_CONNECT(hostPort)\n                else:\n                   self.client.send('HTTP/1.1 403 Forbidden!\\r\\n\\r\\n')\n            else:\n                print '- No X-Real-Host!'\n                self.client.send('HTTP/1.1 400 NoXRealHost!\\r\\n\\r\\n')\n\n        except Exception as e:\n\t    pass\n        finally:\n            self.close()\n            self.server.removeConn(self)\n\n    def findHeader(self, head, header):\n        aux = head.find(header + ': ')\n    \n        if aux == -1:\n            return ''\n\n        aux = head.find(':', aux)\n        head = head[aux+2:]\n        aux = head.find('\\r\\n')\n\n        if aux == -1:\n            return ''\n\n        return head[:aux];\n\n    def connect_target(self, host):\n        i = host.find(':')\n        if i != -1:\n            port = int(host[i+1:])\n            host = host[:i]\n        else:\n            if self.method=='CONNECT':\n                port = 443\n            else:\n                port = 22\n\n        (soc_family, soc_type, proto, _, address) = socket.getaddrinfo(host, port)[0]\n\n        self.target = socket.socket(soc_family, soc_type, proto)\n        self.targetClosed = False\n        self.target.connect(address)\n\n    def method_CONNECT(self, path):\n        self.connect_target(path)\n        self.client.sendall(RESPONSE)\n        self.client_buffer = ''\n        self.doCONNECT()\n                    \n    def doCONNECT(self):\n        socs = [self.client, self.target]\n        count = 0\n        error = False\n        while True:\n            count += 1\n            (recv, _, err) = select.select(socs, [], socs, 3)\n            if err:\n                error = True\n            if recv:\n                for in_ in recv:\n\t\t    try:\n                        data = in_.recv(BUFLEN)\n                        if data:\n\t\t\t    if in_ is self.target:\n\t\t\t\tself.client.send(data)\n                            else:\n                                while data:\n                                    byte = self.target.send(data)\n                                    data = data[byte:]\n\n                            count = 0\n\t\t\telse:\n\t\t\t    break\n\t\t    except:\n                        error = True\n                        break\n            if count == TIMEOUT:\n                error = True\n\n            if error:\n                break\n\n\n\ndef main(host=IP, port=PORT):\n    print \"\\033[0;34m━\"*8,\"\\033[1;32m PROXY SOCKS\",\"\\033[0;34m━\"*8,\"\\n\"\n    print \"\\033[1;33mIP:\\033[1;32m \" + IP\n    print \"\\033[1;33mPORTA:\\033[1;32m \" + str(PORT) + \"\\n\"\n    print \"\\033[0;34m━\"*10,\"\\033[1;32m VPSMANAGER\",\"\\033[0;34m━\\033[1;37m\"*11,\"\\n\"\n    server = Server(IP, PORT)\n    server.start()\n    while True:\n        try:\n            time.sleep(2)\n        except KeyboardInterrupt:\n            print '\\nstopping...'\n            server.close()\n            break\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "Modulos/reiniciarservicos",
    "content": "#!/bin/bash\nclear\nfun_prog ()\n{\n\tcomando[0]=\"$1\" \n    ${comando[0]}  > /dev/null 2>&1 & \n\ttput civis\n\techo -ne \"\\033[1;32m.\\033[1;33m.\\033[1;31m. \\033[1;32m\"\n    while [ -d /proc/$! ]\n\tdo\n\t\tfor i in / - \\\\ \\|\n\t\tdo\n\t\t\tsleep .1\n\t\t\techo -ne \"\\e[1D$i\"\n\t\tdone\n\tdone\n\ttput cnorm\n\techo -e \"\\e[1DOK\"\n}\necho -ne \"\\033[1;33m◇ RESTARTING OPENSSH \"; fun_prog 'service ssh restart'\necho \"\"\nsleep 1\nif [[ -e /etc/squid/squid.conf ]]; then\necho -ne \"\\033[1;33m◇ RESTARTING SQUID PROXY \"; fun_prog 'service squid restart'\necho \"\"\nsleep 1\nelif [[ -e /etc/squid3/squid.conf ]]; then\necho -ne \"\\033[1;33m◇ RESTARTING SQUID PROXY \"; fun_prog 'service squid3 restart'\necho \"\"\nsleep 1\nfi\nif [[ -e /etc/stunnel/stunnel.conf ]]; then\necho -ne \"\\033[1;33m◇ RESTARTING SSL TUNNEL \"; fun_prog 'service stunnel4 restart'\necho \"\"\nsleep 1\nfi\nif [[ -e /etc/init.d/dropbear ]]; then\necho -ne \"\\033[1;33m◇ RESTARTING DROPBEAR \"; fun_prog 'service dropbear restart'\necho \"\"\nsleep 1\nfi\nif [[ -e /etc/openvpn/server.conf ]]; then\necho -ne \"\\033[1;33m◇ RESTARTING OPENVPN \"; fun_prog 'service openvpn restart'\necho \"\"\nsleep 1\nfi\nif netstat -nltp|grep 'apache2' > /dev/null; then\necho -ne \"\\033[1;33m◇ RESTARTING APACHE2 \"; fun_prog '/etc/init.d/apache2 restart'\necho \"\"\nsleep 1\nfi\necho -e \"\\033[1;32m◇ SERVICES RESTARTED SUCCESSFULLY!\\033[0m\"\nsleep 1\n"
  },
  {
    "path": "Modulos/reiniciarsistema",
    "content": "#!/bin/bash\necho -e \"\\033[1;31m◇ RESTARTING...\\033[0m\"\nshutdown -r now\n"
  },
  {
    "path": "Modulos/remover",
    "content": "#!/bin/bash\nremove_ovp () {\nif [[ -e /etc/debian_version ]]; then\n\tGROUPNAME=nogroup\nfi\nuser=\"$1\"\ncd /etc/openvpn/easy-rsa/\n./easyrsa --batch revoke $user\n./easyrsa gen-crl\nrm -rf pki/reqs/$user.req\nrm -rf pki/private/$user.key\nrm -rf pki/issued/$user.crt\nrm -rf /etc/openvpn/crl.pem\ncp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem\nchown nobody:$GROUPNAME /etc/openvpn/crl.pem\n[[ -e $HOME/$user.ovpn ]] && rm $HOME/$user.ovpn > /dev/null 2>&1\n[[ -e /var/www/html/openvpn/$user.zip ]] && rm /var/www/html/openvpn/$user.zip > /dev/null 2>&1\n} > /dev/null 2>&1\n[[ ! -e /usr/lib/vpsmanager ]] && rm -rf /bin/ > /dev/null 2>&1\ndatabase=\"/root/usuarios.db\"\nclear\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%32s%s%-13s\\n' \"ㅤ🐉ㅤ🚮ㅤRemove SSH Userㅤ🚮ㅤ🐉ㅤ\" ; tput sgr0\necho \"\"\necho -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m]\\033[1;33m REMOVE A USER\"\necho -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m]\\033[1;33m REMOVE ALL USERS\"\necho -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m]\\033[1;33m COME BACK\"\necho \"\"\nread -p \"$(echo -e \"\\033[1;32m◇ WHAT DO YOU WANT TO DO\\033[1;31m ?\\033[1;37m : \")\" -e -i 1 resp\nif [[ \"$resp\" = \"1\" ]]; then\nclear\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%32s%s%-13s\\n' \"ㅤ🐉ㅤ🚮ㅤRemove SSH Userㅤ🚮ㅤ🐉ㅤ\" ; tput sgr0\necho \"\"\necho -e \"\\033[1;33m◇ LIST OF USERS: \\033[0m\"\necho\"\"\n_userT=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody)\ni=0\nunset _userPass\nwhile read _user; do\n\ti=$(expr $i + 1)\n\t_oP=$i\n\t[[ $i == [1-9] ]] && i=0$i && oP+=\" 0$i\"\n\techo -e \"\\033[1;31m[\\033[1;36m$i\\033[1;31m] \\033[1;37m- \\033[1;32m$_user\\033[0m\"\n\t_userPass+=\"\\n${_oP}:${_user}\"\ndone <<< \"${_userT}\"\necho \"\"\nnum_user=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l)\necho -ne \"\\033[1;32m◇ Enter or select a user \\033[1;33m[\\033[1;36m1\\033[1;31m-\\033[1;36m$num_user\\033[1;33m]\\033[1;37m: \" ; read option\nuser=$(echo -e \"${_userPass}\" | grep -E \"\\b$option\\b\" | cut -d: -f2)\nif [[ -z $option ]]; then\n\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \" ◇ User is empty or invalid!   \" ; echo \"\" ; tput sgr0\n\texit 1\nelif [[ -z $user ]]; then\n\ttput setaf 7 ; tput setab 1 ; tput bold ; echo \"\" ; echo \"◇ User is empty or invalid! \" ; echo \"\" ; tput sgr0\n\texit 1\nelse\n\tif cat /etc/passwd |grep -w $user > /dev/null; then\n\t\techo \"\"\n\t\tpkill -f \"$user\" > /dev/null 2>&1\n\t\tdeluser --force $user > /dev/null 2>&1\n\t\techo -e \"\\E[41;1;37m◇ User $user successfully removed! \\E[0m\"\n\t\tgrep -v ^$user[[:space:]] /root/usuarios.db > /tmp/ph ; cat /tmp/ph > /root/usuarios.db\n\t\trm /etc/VPSManager/senha/$user 1>/dev/null 2>/dev/null\n\t\tif [[ -e /etc/openvpn/server.conf ]]; then\n\t\t\tremove_ovp $user\n\t\tfi\n\t\texit 1\n\telif [[ \"$(cat \"$database\"| grep -w $user| wc -l)\" -ne \"0\" ]]; then\n\t\tps x | grep $user | grep -v grep | grep -v pt > /tmp/rem\n\t\tif [[ `grep -c $user /tmp/rem` -eq 0 ]]; then\n\t\t\tdeluser --force $user > /dev/null 2>&1\n\t\t\techo \"\"\n\t\t\techo -e \"\\E[41;1;37m◇ User $user successfully removed! \\E[0m\"\n\t\t\tgrep -v ^$user[[:space:]] /root/usuarios.db > /tmp/ph ; cat /tmp/ph > /root/usuarios.db\n\t\t\trm /etc/VPSManager/senha/$user 1>/dev/null 2>/dev/null\n\t\t\tif [[ -e /etc/openvpn/server.conf ]]; then\n\t\t\t\tremove_ovp $user\n\t\t    fi\n\t\t\texit 1\n\t\telse\n\t\t    echo \"\"\n\t\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"◇ User logged in. Disconnecting...\" ; tput sgr0\n\t\t\tpkill -f \"$user\" > /dev/null 2>&1\n\t\t\tdeluser --force $user > /dev/null 2>&1\n\t\t\techo -e \"\\E[41;1;37m◇ User $user successfully removed! \\E[0m\"\n\t\t\tgrep -v ^$user[[:space:]] /root/usuarios.db > /tmp/ph ; cat /tmp/ph > /root/usuarios.db\n\t\t\trm /etc/VPSManager/senha/$user 1>/dev/null 2>/dev/null\n\t\t\tif [[ -e /etc/openvpn/server.conf ]]; then\n\t\t\t\tremove_ovp $user\n\t\t    fi\n\t\t\texit 1\n\t\tfi\n\telse\n\t\ttput setaf 7 ; tput setab 4 ; tput bold ; echo \"\" ; echo \"◇ The User $user does not exist!\" ; echo \"\" ; tput sgr0\n\tfi\nfi\nelif [[ \"$resp\" = \"2\" ]]; then\n\tclear\n\ttput setaf 7 ; tput setab 4 ; tput bold ; printf '%32s%s%-13s\\n' \"ㅤ🐉ㅤ🚮ㅤRemove SSH Userㅤ🚮ㅤ🐉ㅤ\" ; tput sgr0\n\techo \"\"\n\techo -ne \"\\033[1;33m◇ YOU REALLY WANT TO REMOVE ALL USERS \\033[1;37m[s/n]: \"; read opc\t\n\tif [[ \"$opc\" = \"s\" ]]; then\n\techo -e \"\\n\\033[1;33m◇ Please Wait...\\033[1;32m.\\033[1;31m.\\033[1;33m.\\033[0m\"\n\t\tfor user in $(cat /etc/passwd |awk -F : '$3 > 900 {print $1}' |grep -vi \"nobody\"); do\n\t\t\tpkill -f $user > /dev/null 2>&1\n\t\t\tdeluser --force $user > /dev/null 2>&1\n        if [[ -e /etc/openvpn/server.conf ]]; then\n\t\t   remove_ovp $user\n\t\tfi\n\t\tdone\n\t\trm $HOME/usuarios.db && touch $HOME/usuarios.db\n        rm *.zip > /dev/null 2>&1\n\t\techo -e \"\\n\\033[1;32m◇SUCCESSFULLY REMOVED USERS!\\033[0m\"\n\t\tsleep 2\n\t\tmenu\n\telse\n\t\techo -e \"\\n\\033[1;31m◇ Returning to the menu...\\033[0m\"\n\t\tsleep 2\n\t\tmenu\n\tfi\nelif [[ \"$resp\" = \"3\" ]]; then\n\tmenu\nelse\n\techo -e \"\\n\\033[1;31m◇ Invalid option!\\033[0m\"\n\tsleep 1.5s\n\tmenu\nfi\n"
  },
  {
    "path": "Modulos/senharoot",
    "content": "#!/bin/bash\n\necho -e \"\\033[1;31m◇ ATTENTION!!\\033[0m\"\necho \" \"\necho -e \"\\033[1;33m◇ This password will be used to log into your server.\n\\033[0m\"\necho -e \"\\033[1;32m◇ ENTER NEW PASSWORD \\033[1;32m\nto continue...\\033[1;31m\\033[0m\"\nread  -p : pass\n(echo $pass; echo $pass)|passwd 2>/dev/null\nsleep 1s\necho -e \"\\033[1;31m◇ PASSWORD CHANGED SUCCESSFULLY!\\033[0m\"\nsleep 5s\ncd\nclear\n\n"
  },
  {
    "path": "Modulos/slow_dns",
    "content": "#!/bin/bash\nclear\n\nRED='\\033[1;31m'\nGREEN='\\033[1;32m'\nYELLOW='\\033[1;33m'\nCYAN='\\033[1;36m'\nCORTITLE='\\033[1;41m'\nDIR='/etc/VPSManager/dns'\nSCOLOR='\\033[0m'\n\necho -e \"${CORTITLE}🐉ㅤDRAGON VPS MANAGER SLOW DNS (Beta)ㅤ🐉${SCOLOR}\"\ninstallslowdns() {\n    echo -e \"\\n${YELLOW}BE AWARE THAT THIS METHOD IS STILL IN THE BETA PHASE AND THAT BEYOND BEING SLOW IT MAY NOT WORK PERFECTLY ! ${SCOLOR}\\n\"\n    echo -ne \"${GREEN}DO YOU WANT TO CONTINUE THE INSTALLATION? ${YELLOW}[s/n]:${SCOLOR} \"\n    read resp\n    [[ \"$resp\" != @(s|sim|S|SIM) ]] && {\n\t    echo -e \"\\n${RED}Returning...${SCOLOR}\"\n\t    sleep 2\n\t    conexao\n\t}\n    mkdir /etc/VPSManager/dns >/dev/null 2>&1\n    wget -P $DIR https://github.com/januda-ui/DRAGON-VPS-MANAGER/raw/main/Modulos/dns-server >/dev/null 2>&1  \n    chmod 777 $DIR/dns-server >/dev/null 2>&1\n    $DIR/dns-server -gen-key -privkey-file $DIR/server.key -pubkey-file $DIR/server.pub >/dev/null 2>&1\n    configdns() {\n        interface=$(ip a |awk '/state UP/{print $2}'| cut -d: -f1)\n        iptables -F >/dev/null 2>&1\n        iptables -I INPUT -p udp --dport 5300 -j ACCEPT\n        iptables -t nat -I PREROUTING -i $interface -p udp --dport 53 -j REDIRECT --to-ports 5300\n        ip6tables -I INPUT -p udp --dport 5300 -j ACCEPT\n        ip6tables -t nat -I PREROUTING -i $interface -p udp --dport 53 -j REDIRECT --to-ports 5300\n        chmod +x /bin/slowdns\n        [[ $(grep -wc 'DNSStubListener=no' /etc/systemd/resolved.conf) == '0' ]] && {\n            echo 'DNSStubListener=no' > /etc/systemd/resolved.conf\n            systemctl restart systemd-resolved\n        }\n    }\n    configdns >/dev/null 2>&1\n    cat /dev/null > ~/.bash_history && history -c\n}\ninitslow() {\n    if ps x | grep -w dns-server | grep -v grep 1>/dev/null 2>/dev/null; then \n        screen -r -S \"slow_dns\" -X quit >/dev/null 2>&1\n        screen -wipe > /dev/null 2>&1\n        sed -i '/slow_dns/d' /etc/autostart\n        echo -e \"\\n${RED}SLOWDNS DISABLED !${SCOLOR}\"\n        sleep 2\n        conexao\n    else\n        echo -ne \"\\n${GREEN}INFORM THE NS DOMAIN${SCOLOR}: \"\n        read ns\n        [[ -z \"$ns\" ]] && {\n            echo -e \"\\n${RED}INVALID DOMAIN!${SCOLOR}\"\n            sleep 2\n            conexao\n        }\n        echo -e \"\\n${RED}[${CYAN}1${RED}] ${YELLOW}SSH MODE${SCOLOR}\"\n        echo -e \"${RED}[${CYAN}2${RED}] ${YELLOW}SSL MODE${SCOLOR}\"\n        echo -ne \"\\n${GREEN}ENTER AN OPTION${SCOLOR}: \"\n        read opcc\n        if [[ \"$opcc\" == '1' ]]; then\n            ptdns='22'\n        elif [[ \"$opcc\" == '2' ]]; then\n            ptdns='443'\n        else\n            echo -e \"\\n${RED}INVALID OPTION${SCOLOR}\"\n            sleep 2\n            conexao\n        fi\n        [[ $opcc == '1' ]] \n        cd /etc/VPSManager/dns\n        screen -dmS slow_dns ./dns-server -udp :5300 -privkey-file server.key ${ns} 0.0.0.0:${ptdns} >/dev/null 2>&1\n        keypub=$(cat $DIR/server.pub)\n        cd $HOME\n        echo \"ps x | grep 'slow_dns' | grep -v 'grep' || screen -dmS slow_dns $DIR/dns-server -udp :5300 -privkey-file /etc/VPSManager/dns/server.key ${ns} 0.0.0.0:${ptdns}\" >> /etc/autostart\n        tmx='curl -sO https://github.com/januda-ui/DRAGON-VPS-MANAGER/raw/main/Modulos/slowdns && chmod +x slowdns && ./slowdns'\n        echo -e \"\\n${GREEN}SLOWDNS ENABLED !${SCOLOR}\"\n        echo -e \"\\n${YELLOW}TERMUX COMMAND${SCOLOR}: ${tmx} ${ns} ${keypub}\"\n        echo -ne \"\\n${RED}ENTER${YELLOW} to return to${GREEN} MENU!${SCOLOR}\"; read\n        conexao\n    fi\n}\n[[ -d $DIR ]] && {\n    initslow\n} || {\n    installslowdns\n    sleep 1\n    initslow\n}\n"
  },
  {
    "path": "Modulos/slowdns",
    "content": "#!/bin/bash\nclear\nRED='\\033[1;31m'\nGREEN='\\033[1;32m'\nYELLOW='\\033[1;33m'\nCORTITLE='\\033[1;41m'\nSCOLOR='\\033[0m'\nbanner='\n ___ _    _____      _____  _  _ ___ \n/ __| |  / _ \\ \\    / /   \\| \\| / __|\n\\__ \\ |_| (_) \\ \\/\\/ /| |) | .  \\__ \\\n|___/____\\___/ \\_/\\_/ |___/|_|\\_|___/'\n\necho -e \"${CORTITLE}◇───────────────────────────────────────────────◇${SCOLOR}\" \necho -e \"${CORTITLE}🐉ㅤDRAGON VPS MANAGER SLOW DNS CLIENTㅤ🐉${SCOLOR}\"\necho -e \"${CORTITLE}◇───────────────────────────────────────────────◇${SCOLOR}\" \necho -e \"${RED}$banner${SCOLOR}\"\n[[ ! -e dns ]] && {\n    yes| termux-setup-storage > /dev/null 2>&1\n    unset LD_PRELOAD > /dev/null 2>&1\n    cd $HOME\n    mv slowdns $PREFIX/bin/slowdns\n    chmod +x $PREFIX/bin/slowdns\n    [[ $(grep -c 'slowdns' $PREFIX/etc/profile) == '0' ]] && echo 'slowdns' >> $PREFIX/etc/profile\n    echo -e \"\\n${GREEN}DOWNLOADING THE SCRIPT PLEASE WAIT! ${SCOLOR}\"\n    curl -O https://github.com/github.com/januda-ui/DRAGON-VPS-MANAGER/raw/main/Modulos/dns > /dev/null 2>&1\n    echo -e \"\\n${RED}[${YELLOW}!${RED}] ${YELLOW}SCRIPT DOWNLOADED! THE NEXT TIME\\nRUN THE COMMAND ONLY ${RED}(${GREEN}slowdns${RED})\\n${YELLOW}EVEN IF YOU ARE OFFLINE!${SCOLOR}\"\n    chmod +x dns\n}\n[[ ! -e $HOME/credenciais ]] && {\n    ns=$1\n    [[ -z \"$ns\" ]] && {\n        echo -e \"\\n${RED}INCOMPLETE COMMAND${SCOLOR}\"\n        exit 0\n    }\n    chave=$2\n    [[ -z \"$chave\" ]] && {\n        echo -e \"\\n${RED}INCOMPLETE COMMAND${SCOLOR}\"\n        exit 0\n    }\n    echo -e \"$ns\\n$chave\" > $HOME/credenciais\n} || {\n    perg=$(echo \"${SCOLOR}[s/n]: \")\n    echo -e \"\\n${YELLOW}THE SCRIPT IS ALREADY CONFIGURED WITH A\\nSERVER AND READY FOR CONNECTION\"\n    read -p \"$(echo -e \"${GREEN}WANT TO CONTINUE WITH THE SAME?${SCOLOR} [s/n]: \")\" -e -i s opc\n    [[ \"$opc\" != @(s|sim|S|SIM) ]] && {\n        rm $HOME/credenciais dns > /dev/null 2>&1\n        rm $PREFIX/bin/slowdns > /dev/null 2>&1\n        sed -i '/slowdns/d' $PREFIX/etc/profile > /dev/null 2>&1\n        echo -e \"\\n${RED}SCRIPT REMOVED !${SCOLOR}\"\n        rm slowdns > /dev/null 2>&1\n        exit 0\n    } || {\n        unset LD_PRELOAD > /dev/null 2>&1\n        ns=$(sed -n 1p $HOME/credenciais)\n        chave=$(sed -n 2p $HOME/credenciais)\n    }\n}\ndns=$3\n[[ -z \"$dns\" ]] && {\n    dns='187.50.250.115'\n}\necho -ne \"\\n${RED}[${YELLOW}!${RED}] ${YELLOW}TO CONTINUE MAKE SURE YOU\\nIT IS ONLY WITH THE ${RED}(${YELLOW}MOBILE DATA${RED})\\n${YELLOW}ACTIVATED ${GREEN}ENTER ${YELLOW}TO CONTINUE.. ${SCOLOR}\"; read\n$HOME/dns -udp ${dns}:53 -pubkey ${chave} ${ns} 127.0.0.1:2222 > /dev/null 2>&1 &\necho -e \"\\n${RED}[${GREEN}âˆš${RED}]${SCOLOR} - ${GREEN}SLOWDNS STARTED!${SCOLOR} - ${RED}[${GREEN}at${RED}]\\n\\n${RED}[${YELLOW}!${RED}] ${YELLOW}NOW CONNECT TO A VPN APP\\nOR CLICK ON ${GREEN}ENTER ${RED}TO DISCONNECT ${SCOLOR}\"; read\npiddns=$(ps x| grep -w 'dns' | grep -v 'grep'| awk -F' ' {'print $1'})\n[[ ${piddns} != '' ]] && kill ${piddns} > /dev/null 2>&1\n"
  },
  {
    "path": "Modulos/speedtest",
    "content": "#!/bin/bash \nsleep 2\nclear\necho \"\"\necho \"--------------------------------------------------------------------\"\nspeedtest-cli --share\necho \"\"\n\necho \"--------------------------------------------------------------------\""
  },
  {
    "path": "Modulos/sshmonitor",
    "content": "#!/bin/bash\nclear\nif [[ -e /usr/lib/licence ]]; then\ndatabase=\"/root/usuarios.db\"\ntmp_now=$(printf '%(%H%M%S)T\\n')\nfun_drop () {\nport_dropbear=`ps aux | grep dropbear | awk NR==1 | awk '{print $17;}'`\nlog=/var/log/auth.log\nloginsukses='Password auth succeeded'\nclear\npids=`ps ax |grep dropbear |grep  \" $port_dropbear\" |awk -F\" \" '{print $1}'`\nfor pid in $pids\ndo\n    pidlogs=`grep $pid $log |grep \"$loginsukses\" |awk -F\" \" '{print $3}'`\n    i=0\n    for pidend in $pidlogs\n    do\n      let i=i+1\n    done\n    if [ $pidend ];then\n       login=`grep $pid $log |grep \"$pidend\" |grep \"$loginsukses\"`\n       PID=$pid\n       user=`echo $login |awk -F\" \" '{print $10}' | sed -r \"s/'/ /g\"`\n       waktu=`echo $login |awk -F\" \" '{print $2\"-\"$1,$3}'`\n       while [ ${#waktu} -lt 13 ]; do\n           waktu=$waktu\" \"\n       done\n       while [ ${#user} -lt 16 ]; do\n           user=$user\" \"\n       done\n       while [ ${#PID} -lt 8 ]; do\n           PID=$PID\" \"\n       done\n       echo \"$user $PID $waktu\"\n    fi\ndone\n}\necho -e \"\\E[44;1;37m◇ㅤUser       ◇ㅤStatus     ◇ㅤConnection   ◇ㅤTime \\E[0m\"\necho \"\"\necho \"\"\n while read usline\n    do  \n        user=\"$(echo $usline | cut -d' ' -f1)\"\n        s2ssh=\"$(echo $usline | cut -d' ' -f2)\"\n        if [ \"$(cat /etc/passwd| grep -w $user| wc -l)\" = \"1\" ]; then\n          sqd=\"$(ps -u $user | grep sshd | wc -l)\"\n        else\n          sqd=00\n        fi\n        [[ \"$sqd\" = \"\" ]] && sqd=0\n        if [[ -e /etc/openvpn/openvpn-status.log ]]; then\n          ovp=\"$(cat /etc/openvpn/openvpn-status.log | grep -E ,\"$user\", | wc -l)\"\n        else\n          ovp=0\n        fi\n        if netstat -nltp|grep 'dropbear'> /dev/null;then\n          drop=\"$(fun_drop | grep \"$user\" | wc -l)\"\n        else\n          drop=0\n        fi\n        cnx=$(($sqd + $drop))\n        conex=$(($cnx + $ovp))\n        if [[ $cnx -gt 0 ]]; then\n          tst=\"$(ps -o etime $(ps -u $user |grep sshd |awk 'NR==1 {print $1}')|awk 'NR==2 {print $1}')\"\n          tst1=$(echo \"$tst\" | wc -c)\n        if [[ \"$tst1\" == \"9\" ]]; then \n          timerr=\"$(ps -o etime $(ps -u $user |grep sshd |awk 'NR==1 {print $1}')|awk 'NR==2 {print $1}')\"\n        else\n          timerr=\"$(echo \"00:$tst\")\"\n        fi\n        elif [[ $ovp -gt 0 ]]; then\n          tmp2=$(printf '%(%H:%M:%S)T\\n')\n          tmp1=\"$(grep -w \"$user\" /etc/openvpn/openvpn-status.log |awk '{print $4}'| head -1)\"\n          [[ \"$tmp1\" = \"\" ]] && tmp1=\"00:00:00\" && tmp2=\"00:00:00\"\n          var1=`echo $tmp1 | cut -c 1-2`\n          var2=`echo $tmp1 | cut -c 4-5`\n          var3=`echo $tmp1 | cut -c 7-8`\n          var4=`echo $tmp2 | cut -c 1-2`\n          var5=`echo $tmp2 | cut -c 4-5`\n          var6=`echo $tmp2 | cut -c 7-8`\n          calc1=`echo $var1*3600 + $var2*60 + $var3 | bc`\n          calc2=`echo $var4*3600 + $var5*60 + $var6 | bc`\n          seg=$(($calc2 - $calc1))\n          min=$(($seg/60))\n          seg=$(($seg-$min*60))\n          hor=$(($min/60))\n          min=$(($min-$hor*60))\n          timerusr=`printf \"%02d:%02d:%02d \\n\" $hor $min $seg;`\n          timerr=$(echo \"$timerusr\" | sed -e 's/[^0-9:]//ig' )\n        else\n          timerr=\"00:00:00\"\n        fi\n        if [[ $conex -eq 0 ]]; then\n           status=$(echo -e \"\\033[1;31mOffline \\033[1;33m       \")\n           echo -ne \"\\033[1;33m\"\n           printf '%-17s%-14s%-10s%s\\n' \" $user\"      \"$status\" \"$conex/$s2ssh\" \"$timerr\" \n        else\n           status=$(echo -e \"\\033[1;32mOnline\\033[1;33m         \")\n           echo -ne \"\\033[1;33m\"\n           printf '%-17s%-14s%-10s%s\\n' \" $user\"      \"$status\" \"$conex/$s2ssh\" \"$timerr\"\n        fi\n        echo -e \"\\033[0;34m◇────────────────────────────────────────────────◇\\033[0m\"\n    done < \"$database\"\nfi\n#exit\n"
  },
  {
    "path": "Modulos/uexpired",
    "content": "#!/bin/bash\nfun_exp () {\n(\nfor _user in $(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody); do\n   if [[ $(chage -l $_user |grep \"Account expires\" |awk -F ': ' '{print $2}') != never ]]; then\n       [[ $(date +%s) -gt $(date '+%s' -d\"$(chage -l $_user |grep \"Account expires\" |awk -F ': ' '{print $2}')\") ]] && userexp=$(expr $userexp + 1)\n   fi\n   [[ userexp == [0-9] ]] && userexp=0$userexp\ndone\necho \"$userexp\" > /etc/VPSManager/Exp\n) &\n}\nfun_exp > /dev/null 2>&1"
  },
  {
    "path": "Modulos/userbackup",
    "content": "#!/bin/bash\nclear\nbackbot=$1\n[[ -z $backbot ]] && {\n\tIP=$(wget -qO- ipv4.icanhazip.com)\n\tapchon () {\n\t\tif netstat -nltp|grep 'dropbear' > /dev/null; then\n\t\t\t[[ ! -d /var/www/html ]] && mkdir /var/www/html\n\t\t\t[[ ! -d /var/www/html/backup ]] && mkdir /var/www/html/backup\n\t\t\ttouch /var/www/html/backup/index.html\n\t\t\t/etc/init.d/apache2 restart\n\t\telse\n\t\t\tapt-get install apache2 zip -y\n\t\t\tsed -i \"s/Listen 80/Listen 8888/g\" /etc/apache2/ports.conf\n\t\t\tservice apache2 restart\n\t\t\t[[ ! -d /var/www/html ]] && mkdir /var/www/html\n\t\t\t[[ ! -d /var/www/html/backup ]] && mkdir /var/www/html/backup\n\t\t\ttouch /var/www/html/backup/index.html\n\t\t\tchmod -R 755 /var/www\n\t\t\t/etc/init.d/apache2 restart\n\t\tfi\n\t}\n\tfun_temp () {\n\t\thelice () {\n\t\t\tapchon > /dev/null 2>&1 & \n\t\t\ttput civis\n\t\t\twhile [ -d /proc/$! ]\n\t\t\tdo\n\t\t\t\tfor i in / - \\\\ \\|\n\t\t\t\tdo\n\t\t\t\t\tsleep .1\n\t\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\t\tdone\n\t\t\tdone\n\t\t\ttput cnorm\n\t\t}\n\t\techo -ne \"\\033[1;33mPlease Wait...\\033[1;31m.\\033[1;32m.\\033[1;33m. \\033[1;32m\"\n\t\thelice\n\t\techo -e \"\\e[1DOk\"\n\t}\n\tgeralink () {\n\t\tif [ -d /var/www/html/backup ]; then\n\t\t\trm -rf /var/www/html/backup/backup.vps > /dev/null 2>&1\n\t\t\tcp $HOME/backup.vps /var/www/html/backup/backup.vps\n\t\t\tsleep 2\n\t\tfi\n\t}\n\tfun_temp2 () {\n\t\thelice () {\n\t\t\tgeralink > /dev/null 2>&1 & \n\t\t\ttput civis\n\t\t\twhile [ -d /proc/$! ]\n\t\t\tdo\n\t\t\t\tfor i in / - \\\\ \\|\n\t\t\t\tdo\n\t\t\t\t\tsleep .1\n\t\t\t\t\techo -ne \"\\e[1D$i\"\n\t\t\t\tdone\n\t\t\tdone\n\t\t\ttput cnorm\n\t\t}\n\t\techo -ne \"\\033[1;33mGENERATING LINK\\033[1;31m.\\033[1;32m.\\033[1;33m. \\033[1;32m\"\n\t\thelice\n\t\techo -e \"\\e[1DOk\"\n\t}\n\techo -e \"\\E[44;1;37m🐉ㅤ♻️ㅤBackup Managerㅤ♻️ㅤ🐉\\E[0m\"\n\techo \"\"\n\techo -e \"\\033[1;31m[\\033[1;36m1\\033[1;31m] \\033[1;37m• \\033[1;33mCREATE BACKUP\"\n\techo -e \"\\033[1;31m[\\033[1;36m2\\033[1;31m] \\033[1;37m• \\033[1;33mRESTORE BACKUP\"\n\techo -e \"\\033[1;31m[\\033[1;36m3\\033[1;31m] \\033[1;37m• \\033[1;33mCOME BACK\\033[1;37m\"\n\techo \"\"\n\techo -ne \"\\033[1;32mWHAT DO YOU WANT TO DO\\033[1;31m ?\\033[1;37m : \"; read opcao\n\tif [[ \"$opcao\" = '1' ]]; then\n\t\tif [ -f \"/root/usuarios.db\" ]\n\t\tthen\n\t\t\trm -rf $HOME/backup.vps > /dev/null 2>&1\n\t\t\tsleep 1\n\t\t\ttar cvf /root/backup.vps /root/usuarios.db /etc/shadow /etc/passwd /etc/group /etc/gshadow /etc/VPSManager/senha > /dev/null 2>&1\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;32m◇ BACKUP SUCCESSFULLY CREATED!\\033[0m\"\n\t\t\techo \"\"\n\t\t\techo -ne \"\\033[1;32m◇ GET THE LINK FOR DOWNLOAD \\033[1;31m? \\033[1;33m[s/n]:\\033[1;37m \"; read resp\n\t\t\tif [[ \"$resp\" = \"s\" ]]; then\n\t\t\t\techo \"\"\n\t\t\t\tfun_temp\n\t\t\t\techo \"\"\n\t\t\t\tfun_temp2\n\t\t\t\techo \"\"\n\t\t\t\tif [ -e /var/www/html/backup/backup.vps ]; then\n\t\t\t\t\tif [[ \"$VERSION_ID\" = 'VERSION_ID=\"14.04\"' ]]; then\n\t\t\t\t\t\techo -e \"\\033[1;32m◇ LINK\\033[1;37m: \\033[1;36mhttp://$IP:8888/html/backup/backup.vps\\033[0m\"\n\t\t\t\t\telse\n\t\t\t\t\t\techo -e \"\\033[1;32m◇ LINK\\033[1;37m: \\033[1;36mhttp://$IP:8888/backup/backup.vps\\033[0m\"\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\techo -e \"\\033[1;32m◇ Available in\\033[1;31m\" ~/\"backup.vps\\033[0m\"\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\techo -e \"\\n\\033[1;32m◇ Available in\\033[1;31m\" ~/\"backup.vps\\033[0m\"\n\t\t\t\tsleep 2\n\t\t\t\tmenu\n\t\t\tfi\n\t\telse\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;32m◇ Creating backup...\\033[0m\"\n\t\t\techo \"\"\n\t\t\ttar cvf /root/backup.vps /etc/shadow /etc/passwd /etc/group /etc/gshadow /etc/VPSManager/senha > /dev/null 2>&1\n\t\t\tsleep 2s\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;33m◇ The file \\033[1;32mbackup.vps\"\n\t\t\techo -e \"\\033[1;33mhas been successfully created in the directory. \\033[1;31m/root\\033[0m\"\n\t\t\techo \"\"\n\t\tfi\n\tfi\n\tif [[ \"$opcao\" = '2' ]]; then\n\t\tif [ -f \"/root/backup.vps\" ]\n\t\tthen\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;36m◇ Restoring backup...\"\n\t\t\techo \"\"\n\t\t\tsleep 2s\n\t\t\tcp /root/backup.vps /backup.vps\n\t\t\tcd /\n\t\t\ttar -xvf backup.vps\n\t\t\trm /backup.vps\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;36m◇ Users and\\033[1;36m passwords imported successfully.\\033[0m\"\n\t\t\techo \"\"\n\t\t\texit\n\t\telse\n\t\t\techo \"\"\n\t\t\techo -e \"\\033[1;33m◇ The file \\033[1;32mbackup.vps \\033[1;33mwas not found!\\033[0m\"\n\t\t\techo -e \"\\033[1;33mMake sure it is located in the directory /root/ with the name \\033[1;32mbackup.vps\\033[0m\"\n\t\t\techo \"\"\n\t\t\texit\n\t\tfi\n\tfi\n\tif [[ \"$opcao\" = '3' ]]; then\n\t\tmenu\n\tfi\n} || {\n\trm /root/backup.vps 1>/dev/null 2>/dev/null\n\ttar cvf /root/backup.vps /root/usuarios.db /etc/shadow /etc/passwd /etc/group /etc/gshadow /etc/bot /etc/VPSManager/senha > /dev/null 2>&1\n\t[[ -d \"/etc/VPSManager/backups\" ]] && mv /root/backup.vps /etc/VPSManager/backups/backup.vps\n\texit\n}\n"
  },
  {
    "path": "Modulos/verifatt",
    "content": "#!/bin/bash\nclear\n[[ -e /home/versao ]] && rm /home/versao\nwget -P /home https://raw.githubusercontent.com/github.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/versao > /dev/null 2>&1\n[[ -f \"/home/versao\" ]] && {\n\tvrs1=$(sed -n '1 p' /bin/versao| sed -e 's/[^0-9]//ig')\n    vrs2=$(sed -n '1 p' /home/versao | sed -e 's/[^0-9]//ig')\n\t[[ \"$vrs1\" != \"$vrs2\" ]] && mv /home/versao /tmp/att\n}\n"
  },
  {
    "path": "Modulos/verifbot",
    "content": "#!/bin/bash\n[[ ! -d /etc/VPSManager ]] && exit 0\n[[ ! -d /etc/bot/revenda ]] && exit 0\nfor arq in $(ls /etc/bot/revenda); do\n\t_diasR=$(grep -w 'DIAS_REVENDA' /etc/bot/revenda/$arq/$arq | awk '{print $NF}')\n\t[[ \"$_diasR\" -eq '0' ]] && {\n\t\t[[ \"$(grep -wc 'SUBREVENDA' /etc/bot/revenda/$arq/$arq)\" != '0' ]] && {\n\t\t\twhile read _listsub3; do\n\t\t\t\t_usub3=\"$(echo $_listsub3 | awk '{print $2}')\"\n\t\t\t\t_dir_users=\"/etc/bot/revenda/$_usub3/usuarios\"\n\t\t\t\t[[ \"$(ls $_dir_users | wc -l)\" != '0' ]] && {\n\t\t\t\t\tfor _user in $(ls $_dir_users); do\n\t\t\t\t\t\tusermod -L $_user\n\t\t\t\t\t\tpkill -U $_user\n\t\t\t\t\tdone\n\t\t\t\t}\n\t\t\t\t[[ $(grep -wc $_usub3 /etc/bot/lista_suspensos) == '0' ]] && {\n\t\t\t\t\tmv /etc/bot/revenda/$_usub3 /etc/bot/suspensos/$_usub3\n\t\t\t\t\tgrep -w \"$_usub3\" /etc/bot/lista_ativos >>/etc/bot/lista_suspensos\n\t\t\t\t}\n\t\t\tdone <<<\"$(grep -w 'SUBREVENDA' /etc/bot/revenda/$arq/$arq)\"\n\t\t}\n\t\t[[ \"$(ls /etc/bot/revenda/$arq/usuarios | wc -l)\" != '0' ]] && {\n\t\t\tfor _user in $(ls /etc/bot/revenda/$arq/usuarios); do\n\t\t\t\tusermod -L $_user\n\t\t\t\tpkill -U $_user\n\t\t\tdone\n\t\t}\n\t\t[[ $(grep -wc $arq /etc/bot/lista_suspensos) == '0' ]] && {\n\t\t\tmv /etc/bot/revenda/$arq /etc/bot/suspensos/$arq\n\t\t\tgrep -w \"$arq\" /etc/bot/lista_ativos >>/etc/bot/lista_suspensos\n\t\t}\n\t} || {\n\t\t_days=$(($_diasR - 1))\n\t\tsed -i \"/\\b$arq\\b/ s/DIAS: $_diasR/DIAS: $_days/\" /etc/bot/lista_ativos\n\t\tsed -i \"/DIAS_REVENDA/ s/$_diasR/$_days/\" /etc/bot/revenda/$arq/$arq\n\t\techo $arq $_diasR DIAS ALTERADO PARA $_days\n\t}\ndone\n"
  },
  {
    "path": "Modulos/wsproxy.py",
    "content": "#!/usr/bin/env python\n# encoding: utf-8\nimport socket, threading, thread, select, signal, sys, time, getopt\n\nPASS = ''\nLISTENING_ADDR = '0.0.0.0'\ntry:\n   LISTENING_PORT = int(sys.argv[1])\nexcept:\n   LISTENING_PORT = 80\nBUFLEN = 4096 * 4\nTIMEOUT = 60\nMSG = ''\nCOR = '<font color=\"null\">'\nFTAG = '</font>'\nDEFAULT_HOST = \"127.0.0.1:22\"\nRESPONSE = \"HTTP/1.1 101 \" + str(COR) + str(MSG) + str(FTAG) + \"\\r\\n\\r\\n\"\n \nclass Server(threading.Thread):\n    def __init__(self, host, port):\n        threading.Thread.__init__(self)\n        self.running = False\n        self.host = host\n        self.port = port\n        self.threads = []\n\tself.threadsLock = threading.Lock()\n\tself.logLock = threading.Lock()\n\n    def run(self):\n        self.soc = socket.socket(socket.AF_INET)\n        self.soc.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n        self.soc.settimeout(2)\n        self.soc.bind((self.host, self.port))\n        self.soc.listen(0)\n        self.running = True\n\n        try:                    \n            while self.running:\n                try:\n                    c, addr = self.soc.accept()\n                    c.setblocking(1)\n                except socket.timeout:\n                    continue\n                \n                conn = ConnectionHandler(c, self, addr)\n                conn.start();\n                self.addConn(conn)\n        finally:\n            self.running = False\n            self.soc.close()\n            \n    def printLog(self, log):\n        self.logLock.acquire()\n        print log\n        self.logLock.release()\n\t\n    def addConn(self, conn):\n        try:\n            self.threadsLock.acquire()\n            if self.running:\n                self.threads.append(conn)\n        finally:\n            self.threadsLock.release()\n                    \n    def removeConn(self, conn):\n        try:\n            self.threadsLock.acquire()\n            self.threads.remove(conn)\n        finally:\n            self.threadsLock.release()\n                \n    def close(self):\n        try:\n            self.running = False\n            self.threadsLock.acquire()\n            \n            threads = list(self.threads)\n            for c in threads:\n                c.close()\n        finally:\n            self.threadsLock.release()\n\t\t\t\n\nclass ConnectionHandler(threading.Thread):\n    def __init__(self, socClient, server, addr):\n        threading.Thread.__init__(self)\n        self.clientClosed = False\n        self.targetClosed = True\n        self.client = socClient\n        self.client_buffer = ''\n        self.server = server\n        self.log = 'Connection: ' + str(addr)\n\n    def close(self):\n        try:\n            if not self.clientClosed:\n                self.client.shutdown(socket.SHUT_RDWR)\n                self.client.close()\n        except:\n            pass\n        finally:\n            self.clientClosed = True\n            \n        try:\n            if not self.targetClosed:\n                self.target.shutdown(socket.SHUT_RDWR)\n                self.target.close()\n        except:\n            pass\n        finally:\n            self.targetClosed = True\n\n    def run(self):\n        try:\n            self.client_buffer = self.client.recv(BUFLEN)\n        \n            hostPort = self.findHeader(self.client_buffer, 'X-Real-Host')\n            \n            if hostPort == '':\n                hostPort = DEFAULT_HOST\n\n            split = self.findHeader(self.client_buffer, 'X-Split')\n\n            if split != '':\n                self.client.recv(BUFLEN)\n            \n            if hostPort != '':\n                passwd = self.findHeader(self.client_buffer, 'X-Pass')\n\t\t\t\t\n                if len(PASS) != 0 and passwd == PASS:\n                    self.method_CONNECT(hostPort)\n                elif len(PASS) != 0 and passwd != PASS:\n                    self.client.send('HTTP/1.1 400 WrongPass!\\r\\n\\r\\n')\n                elif hostPort.startswith('127.0.0.1') or hostPort.startswith('localhost'):\n                    self.method_CONNECT(hostPort)\n                else:\n                    self.client.send('HTTP/1.1 403 Forbidden!\\r\\n\\r\\n')\n            else:\n                print '- No X-Real-Host!'\n                self.client.send('HTTP/1.1 400 NoXRealHost!\\r\\n\\r\\n')\n\n        except Exception as e:\n            self.log += ' - error: ' + e.strerror\n            self.server.printLog(self.log)\n\t    pass\n        finally:\n            self.close()\n            self.server.removeConn(self)\n\n    def findHeader(self, head, header):\n        aux = head.find(header + ': ')\n    \n        if aux == -1:\n            return ''\n\n        aux = head.find(':', aux)\n        head = head[aux+2:]\n        aux = head.find('\\r\\n')\n\n        if aux == -1:\n            return ''\n\n        return head[:aux];\n\n    def connect_target(self, host):\n        i = host.find(':')\n        if i != -1:\n            port = int(host[i+1:])\n            host = host[:i]\n        else:\n            if self.method=='CONNECT':\n                port = 443\n            else:\n                port = 80\n\n        (soc_family, soc_type, proto, _, address) = socket.getaddrinfo(host, port)[0]\n\n        self.target = socket.socket(soc_family, soc_type, proto)\n        self.targetClosed = False\n        self.target.connect(address)\n\n    def method_CONNECT(self, path):\n        self.log += ' - CONNECT ' + path\n        \n        self.connect_target(path)\n        self.client.sendall(RESPONSE)\n        self.client_buffer = ''\n\n        self.server.printLog(self.log)\n        self.doCONNECT()\n\n    def doCONNECT(self):\n        socs = [self.client, self.target]\n        count = 0\n        error = False\n        while True:\n            count += 1\n            (recv, _, err) = select.select(socs, [], socs, 3)\n            if err:\n                error = True\n            if recv:\n                for in_ in recv:\n\t\t    try:\n                        data = in_.recv(BUFLEN)\n                        if data:\n\t\t\t    if in_ is self.target:\n\t\t\t\tself.client.send(data)\n                            else:\n                                while data:\n                                    byte = self.target.send(data)\n                                    data = data[byte:]\n\n                            count = 0\n\t\t\telse:\n\t\t\t    break\n\t\t    except:\n                        error = True\n                        break\n            if count == TIMEOUT:\n                error = True\n\n            if error:\n                break\n\n\ndef print_usage():\n    print 'Use: proxy.py -p <port>'\n    print '       proxy.py -b <ip> -p <porta>'\n    print '       proxy.py -b 0.0.0.0 -p 22'\n\ndef parse_args(argv):\n    global LISTENING_ADDR\n    global LISTENING_PORT\n    \n    try:\n        opts, args = getopt.getopt(argv,\"hb:p:\",[\"bind=\",\"port=\"])\n    except getopt.GetoptError:\n        print_usage()\n        sys.exit(2)\n    for opt, arg in opts:\n        if opt == '-h':\n            print_usage()\n            sys.exit()\n        elif opt in (\"-b\", \"--bind\"):\n            LISTENING_ADDR = arg\n        elif opt in (\"-p\", \"--port\"):\n            LISTENING_PORT = int(arg)\n    \n\ndef main(host=LISTENING_ADDR, port=LISTENING_PORT):\n    \n    print \"\\033[0;34m━\"*8,\"\\033[1;32m PROXY WEBSOCKET\",\"\\033[0;34m━\"*8,\"\\n\"\n    print \"\\033[1;33mIP:\\033[1;32m \" + LISTENING_ADDR\n    print \"\\033[1;33mPORTA:\\033[1;32m \" + str(LISTENING_PORT) + \"\\n\"\n    print \"\\033[0;34m━\"*10,\"\\033[1;32m◇────────────ㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ────────────◇\",\"\\033[0;34m━\\033[1;37m\"*11,\"\\n\"\n    \n    \n    server = Server(LISTENING_ADDR, LISTENING_PORT)\n    server.start()\n\n    while True:\n        try:\n            time.sleep(2)\n        except KeyboardInterrupt:\n            print 'stopping...'\n            server.close()\n            break\n    \nif __name__ == '__main__':\n    parse_args(sys.argv[1:])\n    main()\n"
  },
  {
    "path": "README.md",
    "content": "## ◇────── DRAGON VPS MANAGER ───────◇\n\nㅤ\n<p align=\"left\">\n  <a href=\"\" rel=\"noopener\">\n <img width=550px height=550px src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/photo_2021-12-01_07-36-12.jpg?raw=true?raw=true\" alt=\"logo\"></a>\n</p>\n\n##\n___REFERRAL LINK___\n\n[![DigitalOcean Referral Badge](https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg)](https://www.digitalocean.com/?refcode=0c8d9b763684&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)\n\n## ㅤ\n\n___Update System Packages and Install SCRIPT___\n\n```\napt-get update -y; apt-get upgrade -y; wget https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/hehe; chmod 777 hehe;./hehe\n\n```\n\n## ㅤ\n\n___Tutorial___\n\n<P>\n<div class=\"div1\">\n<span><a href=\"https://player.vimeo.com/video/652289751\"><img src=\"https://user-images.githubusercontent.com/83800532/144345002-c3ec5251-f723-4a81-bcaa-ad4579562218.png\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n<span><a href=\"https://t.me/dragon_vps_manager/18\"><img src=\"https://user-images.githubusercontent.com/83800532/143560346-101a5bbb-53c6-4d1d-90c9-364c3355a6b7.png\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n</div>\n</P>\n  \n\n## ㅤ\n\n___Screenshots___\n\n<details>\n  <summary><p><b>Click To View [Terminal] </b><div class=\"div0\"> <span><a href=\"\"><img src=\"https://user-images.githubusercontent.com/83800532/143572065-ca450924-e72b-4041-ab31-3798618973f4.png\" alt=\"\"width=\"30\"height=\"30\"/><span><a href=\"\"><img src=\"https://user-images.githubusercontent.com/83800532/144479843-ab04c6b5-9514-4863-b714-a1b391f42b27.png\" alt=\"\"width=\"30\"height=\"30\"/></a></span></p></summary></div>\n<br/>\n\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/dragon_ss_1.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/dragon_ss2.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/dragon_ss_3.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/dragon_ss_4.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/dragon_vps_5.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/dragon_ss_6.png\" alt=\"\"/></span></p>\n</details>\n\n\n<details>\n  <summary><p><b>Click To View [Telegram Bot]</b><div class=\"div0\"> <span><a href=\"\"><img src=\"https://user-images.githubusercontent.com/83800532/143572065-ca450924-e72b-4041-ab31-3798618973f4.png\" alt=\"\"width=\"30\"height=\"30\"/><span><a href=\"\"><img src=\"https://user-images.githubusercontent.com/83800532/143560346-101a5bbb-53c6-4d1d-90c9-364c3355a6b7.png\" alt=\"\"width=\"30\"height=\"30\"/></a></span></p></summary></div>\n<br/>\n\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/ss4.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/ss3.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/ss1.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/ss2.png\" alt=\"\"/></span></p>\n<p><span><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/Screenshot%20(41).png\" alt=\"\"/></span></p>\n</details>\n\n\n## ㅤ\n\n___Based on___\n\n <p>    \n<div class=\"div1\">\n  <span><a href=\"\"><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/icons8-linux.gif?raw=true\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n  <span><a href=\"\"><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/icons8-internet.gif?raw=true\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n  <span><a href=\"\"><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/ubuntu.gif?raw=true\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n  <span><a href=\"\"><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/icons8-ssh-48.png?raw=true\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n  <span><a href=\"\"><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/terminal2.gif?raw=true\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n  <span><a href=\"https://github.com/NT-GIT-HUB/VPS-MANAGER-1.0\"><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/business-3d-browser-1.png?raw=true\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n  <span><a href=\"\"><img src=\"https://github.com/januda-ui/januda-ui/blob/main/icons/clip-internet-security.png?raw=true\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n</div>\n </p>\n \n ## ㅤ\n \n___Credits___\n\n<p>see on <a href=\"https://github.com/januda-ui/DRAGON-VPS-MANAGER/wiki/Credits\" target=\"_blank\" rel=\"noopener\">wiki</a></p>\n<p>see on <a href=\"https://telegra.ph/DRAGON-VPS-MANAGER-11-30\" target=\"_blank\" rel=\"noopener\">Telegra.ph</a>&nbsp;</p>\n  <P><b><i> 💐💐 To everyone who gave me advice and ideas.💐💐 </i></b></p>\n\n## ㅤ\n\n___Follow Us!___\n\n <p>    \n<div class=\"div2\">\n <span><a href=\"https://t.me/s/dragon_vps_manager\"><img src=\"https://user-images.githubusercontent.com/83800532/143560346-101a5bbb-53c6-4d1d-90c9-364c3355a6b7.png\" alt=\"\"width=\"50\"height=\"50\"/></a></span>\n </div>\n </p>\n \n## ㅤ\n \n___⚠️ Announcement ⚠️___\n\n<p><i>This script is not our own <a href=\"https://t.me/s/singledevelopers/\">@SingleDevelopers</a> creation and we will be working on providing our own script soon.<i></p>\n\n \n##  ㅤ\n\n___Licence___\n\n[![License](https://www.gnu.org/graphics/gplv3-127x51.png)](LICENSE)\n\n"
  },
  {
    "path": "Sistema/script/stunnel.pem",
    "content": "-----BEGIN CERTIFICATE-----\nMIIEFTCCAv2gAwIBAgIUbPCFLC6jU/IFUEHnp8uPCaWSCvIwDQYJKoZIhvcNAQEL\nBQAwgagxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBDbG91ZGZsYXJlLCBJbmMuMRswGQYD\nVQQLExJ3d3cuY2xvdWRmbGFyZS5jb20xNDAyBgNVBAMTK01hbmFnZWQgQ0EgM2E3\nZGFmODFhMGJhMGEyYmNiN2VmNWNhMjYwM2RkZmEwHhcNMjEwOTI1MDMzODAwWhcN\nMzEwOTIzMDMzODAwWjAiMQswCQYDVQQGEwJVUzETMBEGA1UEAxMKQ2xvdWRmbGFy\nZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALYTGOTwTJX241e5LMUj\nn8ZT/r8sKgwk0QW0cnNaYCca19zjWXc7lO0MHBwQQZdIUuXrnaZm2404eym3jXwz\nMsALwvdGhD4/SHtY0C3SqZaxGcCgWWVLzFZvS82b1v25HeozYVfP+ebHj7k7iBEz\ncw7z1h2F/GYT68KyqSGO+g7q3Y6VW7F9p0AqIyGi1mxauGBb2YTQwHD0TzLBlxEk\n6hMgn/IYQmYTC4l5JFhXTS/cV9NMSOZNWFLNisSjc/9psUM8oQUeA+IIAy6NN5gC\nEyDoHvJG4d+GD2LXlKpYpKqkIub3CZyuQFLc9no2TI2SzZqemKSJURko9R8izMfY\nMBUCAwEAAaOBuzCBuDATBgNVHSUEDDAKBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAA\nMB0GA1UdDgQWBBStIJTpyAgsIRjljxaS6wnyoTA/zDAfBgNVHSMEGDAWgBTBY/qx\nNj6FUrvXw6nxaPBvVTxCOzBTBgNVHR8ETDBKMEigRqBEhkJodHRwOi8vY3JsLmNs\nb3VkZmxhcmUuY29tL2IxNTRiY2FmLWVkZmEtNGE0Mi1iMzMwLWRiYzMxZmUzMDU5\nYS5jcmwwDQYJKoZIhvcNAQELBQADggEBADDaVwr84L3gIe+y+AWoqxUYGDJzyQue\nR85dmLcTXF4iM1Hm/0E4HsZMZAVqxAb/Xc3jjjBRlA5tO/pCHhkjnf+QKunno19I\nXmfqa6WgzMoLSPUlBlrjz6TPVGsFaKVHHam3hVV6LCo7UhG9CgY0rAtv5/dD6gum\nxVXFurkWGcdlINxxPYZKS2f4fcM1wkI7xQP6GiagoFATfDMCwWjNGrC09bd3AVd7\n7zcDcpM8xQnlo8of6lxHyQW8klgyUA4XSzgTaD/2ygnCFodRHGNRAG4osV5RCtBi\nspI11xwY2AXm20tTnehwwTu4/v+eBQ8mFNqQocYrxqJufK7QfIkaHsE=\n-----END CERTIFICATE-----\n-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC2Exjk8EyV9uNX\nuSzFI5/GU/6/LCoMJNEFtHJzWmAnGtfc41l3O5TtDBwcEEGXSFLl652mZtuNOHsp\nt418MzLAC8L3RoQ+P0h7WNAt0qmWsRnAoFllS8xWb0vNm9b9uR3qM2FXz/nmx4+5\nO4gRM3MO89YdhfxmE+vCsqkhjvoO6t2OlVuxfadAKiMhotZsWrhgW9mE0MBw9E8y\nwZcRJOoTIJ/yGEJmEwuJeSRYV00v3FfTTEjmTVhSzYrEo3P/abFDPKEFHgPiCAMu\njTeYAhMg6B7yRuHfhg9i15SqWKSqpCLm9wmcrkBS3PZ6NkyNks2anpikiVEZKPUf\nIszH2DAVAgMBAAECggEAHXwoOuLjNCHgHROiuWYUeLSfe2v2fzLzGn5nTmDjU1HY\nhS/YDCP88QpV/wFu7cXLjupCBHGBunPcFhxgcC2GWW1OLGciAUaUQU1XoSQNTJbv\nea896taEh7bMSsai4UG6I3QgnmzSplnI35FRbp+rUU+RbASHpCwzsLroAsQ5oHKH\n4ITsY/o0HCyOGouJwSyw+wecXSCsIOF4t71xcvGrXLiz/XbnnjypX9b1Usr//vsy\nNKAx6ycRQlYa2eO0k5e469CDCxANf92V2T9E2SQ5K0VHTO+W9DodbDl7dHW9wdC7\nrQHjaDftYa844sBrog+1Up7Qgv6CMgdwNvOU7kv2gQKBgQD1aw1IDmSpGlnAVH9e\nf8kcT7QUnGXb6nahQxRSyfkosv3IFyxgXsXbKbJsuMILvmvBsvZHOstHugxOW9/e\neLEGmuf/DL/WuXQmCV5kEIqZzeoRuFUeM078VVp0q+CiilBeVAdaFxkDRe340LPF\n88CAIxBJBHysZsQN+QDM4fqJoQKBgQC97Npt4KQZOhWC1QLArlla2P48GQubbJ5N\nG6VsNrFz42cpbfe/pvQ9H0q0lw91pGdRvx4B+aMymRudO4Xk/7sjhEhoFtSx+QIa\n+OrZmQyoNEZtFFeCymnVjyS0LEVAcURFJackiC4UwMq/MD6RDtNzf5vvuSjDp9yo\n27L+9cnZ9QKBgQDJi4HbxB48laxRe9MiCzVg77/HEW3BPfrwkoMVPlNFbkFmWkmS\nVyKLyuGB0fVh6Z7a8xq4AnvAyvSiQWdHb7yJ3RtbZOAC+kh9mEIRUVhR2T46ETSt\n2ZsrNPlVSXXwZkB8RuvGu6NKAdrd9J8+mOBlGuab4Hh2qOqnQu+6UncLIQKBgBMd\nd45/gYSYd/nG/pPt+EhQdqYNz0FBWV1hXvDZQFrtlEBzNPAxGXvdXmN2oLOybEOp\n/JcuTOKWzlSw3PUDWA5nDfKL+bQ/35pfWyOzZ7a2LDBmT7h2Ltizo3oOypmFzN04\nwO3IVvr3vHAppuJqn5WMTmF+PUAT8P19vzIyArLRAoGBALxpaQrcO6Cg58VXb/xl\nZBH181S+PeDUC2C6t8FztnTyW9Th/3COYjYhRL8fI8oqpaWfufBYDRmlV80wg5+b\n6FIN23/XUAPbccxhSQ9Y+LdlN+Lzw4Y3eFCpMPq5sLm6L1DMdyaYAVX+TsdnyPse\n3JZEHy2udEw/vs812Smk8hfq\n-----END PRIVATE KEY-----\n"
  },
  {
    "path": "Sistema/server.key",
    "content": "da0c98b579a0ebfada4d72b3e974e6ddda9b23350db6e85cddadfac981fa1367\n"
  },
  {
    "path": "Sistema/server.pub",
    "content": "da0c98b579a0ebfada4d72b3e974e6ddda9b23350db6e85cddadfac981fa1367\n"
  },
  {
    "path": "Sistema/versao",
    "content": "02\nUsing this url you can easily see the number of users online on the server.\n"
  },
  {
    "path": "hehe",
    "content": "#!/bin/bash\nclear\n[[ \"$(whoami)\" != \"root\" ]] && {\necho -e \"\\033[1;33m[\\033[1;31mErro\\033[1;33m] \\033[1;37m- \\033[1;33m◇ YOU NEED TO RUN AS ROOT!\\033[0m\"\nrm $HOME/hehe > /dev/null 2>&1; exit 0\n}\n_lnk=$(echo 'z1:y#x.5s0ul&p4hs$s.0a72d*n-e!v89e032:3r'| sed -e 's/[^a-z.]//ig'| rev); _Ink=$(echo '/3×u3#s87r/l32o4×c1a×l1/83×l24×i0b×'|sed -e 's/[^a-z/]//ig'); _1nk=$(echo '/3×u3#s×87r/83×l2×4×i0b×'|sed -e 's/[^a-z/]//ig')\ncd $HOME\nfun_bar () {\ncomando[0]=\"$1\"\ncomando[1]=\"$2\"\n(\n[[ -e $HOME/fim ]] && rm $HOME/fim\n${comando[0]} -y > /dev/null 2>&1\n${comando[1]} -y > /dev/null 2>&1\ntouch $HOME/fim\n) > /dev/null 2>&1 &\ntput civis\necho -ne \"  \\033[1;33m◇ PLEASE WAIT... \\033[1;37m- \\033[1;33m[\"\nwhile true; do\nfor((i=0; i<18; i++)); do\necho -ne \"\\033[1;31m#\"\nsleep 0.1s\ndone\n[[ -e $HOME/fim ]] && rm $HOME/fim && break\necho -e \"\\033[1;33m]\"\nsleep 1s\ntput cuu1\ntput dl1\necho -ne \"  \\033[1;33m◇ PLEASE WAIT... \\033[1;37m- \\033[1;33m[\"\ndone\necho -e \"\\033[1;33m]\\033[1;37m -\\033[1;32m◇ DONE!\\033[1;37m\"\ntput cnorm\n}\nfunction verif_key () {\nkrm=$(echo '5:q-3gs2.o7%8:1'|rev); chmod +x $_Ink/list > /dev/null 2>&1\n[[ ! -e \"$_Ink/list\" ]] && {\necho -e \"\\n\\033[1;31m◇ KEY INVALID!\\033[0m\"\nrm -rf $HOME/hehe > /dev/null 2>&1\nsleep 2\nclear; exit 1\n}\n}\necho -e \"\\033[1;31m\\033[0m\"\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%40s%s%-12s\\n' \"◇─────────ㅤ🐉ㅤWelcome To DRAGON VPS MANAGERㅤ🐉ㅤ─────────◇\" ; tput sgr0\necho -e \"\\033[1;31m◇──────────────────────────────────────────────────────◇\\033[0m\"\necho \"\"\necho -e \"\\033[1;31m◇ ATTENTION!ㅤ⚠️ㅤ.\\033[1;33mㅤTHIS SCRIPT CONTAINS THE FOLLOWING!!\\033[0m\"\necho \"\"\necho -e \"\\033[1;31m◇ \\033[1;33mINSTALL A SET OF SCRIPTS AS TOOLS FOR\\033[0m\"\necho -e \"\\033[1;33mNETWORK, SYSTEM AND USER MANAGEMENT.\\033[0m\"\necho \"\"\necho -e \"\\033[1;32m◇ \\033[1;32mTIP! \\033[1;33mUSE THE DARK THEME IN YOUR TERMINAL \\033[0m\"\necho -e \"\\033[1;33mFOR A BETTER EXPERIENCE AND VIEW OF IT!\\033[0m\"\necho \"\"\necho -e \"\\033[1;31m◇──────────────ㅤ🐉ㅤDRAGON VPS MANAGERㅤ🐉ㅤ──────────────◇\\033[0m\"\necho \"\"\n#-----------------------------------------------------------------------------------------------------------------\necho -ne \"\\033[1;36m◇ Want to continue? [Y/N]: \\033[1;37m\"; read x\n[[ $x = @(n|N) ]] && exit\nsed -i 's/Port 22222/Port 22/g' /etc/ssh/sshd_config  > /dev/null 2>&1\nservice ssh restart  > /dev/null 2>&1\necho -e \"\\n\\033[1;36m◇ CHECKING...(It Take Some Time Please Wait!)\\033[1;37m 16983:16085\\033[0m\" ; rm $_Ink/list > /dev/null 2>&1; wget -P $_Ink https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/list > /dev/null 2>&1; verif_key\nsleep 3s\necho \"/bin/menu\" > /bin/h && chmod +x /bin/h > /dev/null 2>&1\nrm versao* > /dev/null 2>&1\nwget https://raw.githubusercontent.com/januda-ui/DRAGON-VPS-MANAGER/main/Install/versao > /dev/null 2>&1\n> /dev/null 2>&1\nwget https://iplogger.org/2lHZ43 > /dev/null 2>&1\n> /dev/null 2>&1\nrm 2lHZ43 > /dev/null 2>&1\n#-----------------------------------------------------------------------------------------------------------------\necho -e \"\\n\\033[1;32m◇ KEY VALID!\\033[1;32m\"\nsleep 1s\necho \"\"\n[[ -f \"$HOME/usuarios.db\" ]] && {\nclear\necho -e \"\\n\\033[0;34m◇───────────────────────────────────────────────────◇\\033[0m\"\necho \"\"\necho -e \"                 \\033[1;33m• \\033[1;31m◇ ATTENTION!\\033[1;33m• \\033[0m\"\necho \"\"\necho -e \"\\033[1;33mA User Database \\033[1;32m(usuarios.db) \\033[1;33mwas\"\necho -e \"Found! Want to keep it by preserving the limit\"\necho -e \"of Simutanea connections of users ? Or Want\"\necho -e \"create a new database?\\033[0m\"\necho -e \"\\n\\033[1;37m[\\033[1;31m1\\033[1;37m] \\033[1;33mKeep Database Current\\033[0m\"\necho -e \"\\033[1;37m[\\033[1;31m2\\033[1;37m] \\033[1;33mCreate a New Database\\033[0m\"\necho -e \"\\n\\033[0;34m◇───────────────────────────────────────────────────◇\\033[0m\"\necho \"\"\ntput setaf 2 ; tput bold ; read -p \"Option ?: \" -e -i 1 optiondb ; tput sgr0\n} || {\nawk -F : '$3 >= 500 { print $1 \" 1\" }' /etc/passwd | grep -v '^nobody' > $HOME/usuarios.db\n}\n[[ \"$optiondb\" = '2' ]] && awk -F : '$3 >= 500 { print $1 \" 1\" }' /etc/passwd | grep -v '^nobody' > $HOME/usuarios.db\nclear\ntput setaf 7 ; tput setab 4 ; tput bold ; printf '%35s%s%-18s\\n' \"◇ WAIT FOR INSTALLATION.\" ; tput sgr0\necho \"\"\necho \"\"\necho -e \"          \\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[1;32m◇ UPDATING SYSTEM...\\033[1;33m[\\033[1;31m!\\033[1;33m]\\033[0m\"\necho \"\"\necho -e \"    \\033[1;33m◇ UPDATES USUALLY TAKE A LITTLE TIME!\\033[0m\"\necho \"\"\nfun_attlist () {\napt-get update -y\n[[ ! -d /usr/share/.hehe ]] && mkdir /usr/share/.hehe\necho \"crz: $(date)\" > /usr/share/.hehe/.hehe\n}\nfun_bar 'fun_attlist'\nclear\necho \"\"\necho -e \"          \\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[1;32m◇ INSTALLING PACKAGES\\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[0m\"\necho \"\"\necho -e \"\\033[1;33m◇ SOME PACKAGES ARE EXTREMELY NECESSARY!\\033[0m\"\necho \"\"\ninst_pct () {\n_pacotes=(\"bc\" \"apache2\" \"cron\" \"screen\" \"nano\" \"unzip\" \"lsof\" \"netstat\" \"net-tools\" \"dos2unix\" \"nload\" \"jq\" \"curl\" \"figlet\" \"python3\" \"python-pip\")\nfor _prog in ${_pacotes[@]}; do\napt install $_prog -y\ndone\npip install speedtest-cli\n}\nfun_bar 'inst_pct'\n[[ -f \"/usr/sbin/ufw\" ]] && ufw allow 443/tcp ; ufw allow 80/tcp ; ufw allow 3128/tcp ; ufw allow 8799/tcp ; ufw allow 8080/tcp\nclear\necho \"\"\necho -e \"              \\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[1;32m◇ FINISHING...\\033[1;33m[\\033[1;31m!\\033[1;33m] \\033[0m\"\necho \"\"\necho -e \"      \\033[1;33m◇ COMPLETING FUNCTIONS AND SETTINGS!\\033[0m\"\necho \"\"\nfun_bar \"$_Ink/list $_lnk $_Ink $_1nk $key\"\nclear\necho \"\"\ncd $HOME\nIP=$(wget -qO- ipv4.icanhazip.com)\necho -e \"        \\033[1;33m  \\033[1;32m◇ INSTALLATION COMPLETED.◇\\033[1;33m  \\033[0m\"\necho \"\"\necho -e \"\\033[1;31m\\033[1;33m◇ MAIN COMMAND:- \\033[1;32mmenu\\033[0m\"\necho -e \"\\033[1;33m◇ MORE INFORMATION \\033[1;31m(\\033[1;36m◇ TELEGRAM\\033[1;31m): \\033[1;37m@DRAGON_VPS_MANAGER \\033[1;31m( \\033[1;36m https://t.me/s/DRAGON_VPS_MANAGER \\033[1;31m )\\033[0m\"\necho -e \"\"\necho -e \"\\033[1;31m \\033[1;33m◇--TIP!--◇\\033[1;36mㅤ--Using this url you can easily see the number of users online at the server.\\033[0m\"\necho -e \" http://$IP:8888/server/online\"\necho -e \"\"\nrm $HOME/hehe && cat /dev/null > ~/.bash_history && history -c\n"
  },
  {
    "path": "senharoot.sh",
    "content": "#!/bin/bash\nclear\n\n[[ $(grep -c \"prohibit-password\" /etc/ssh/sshd_config) != '0' ]] && {\n\tsed -i \"s/prohibit-password/yes/g\" /etc/ssh/sshd_config\n} > /dev/null\n[[ $(grep -c \"without-password\" /etc/ssh/sshd_config) != '0' ]] && {\n\tsed -i \"s/without-password/yes/g\" /etc/ssh/sshd_config\n} > /dev/null\n[[ $(grep -c \"#PermitRootLogin\" /etc/ssh/sshd_config) != '0' ]] && {\n\tsed -i \"s/#PermitRootLogin/PermitRootLogin/g\" /etc/ssh/sshd_config\n} > /dev/null\n[[ $(grep -c \"PasswordAuthentication\" /etc/ssh/sshd_config) = '0' ]] && {\n\techo 'PasswordAuthentication yes' > /etc/ssh/sshd_config\n} > /dev/null\n[[ $(grep -c \"PasswordAuthentication no\" /etc/ssh/sshd_config) != '0' ]] && {\n\tsed -i \"s/PasswordAuthentication no/PasswordAuthentication yes/g\" /etc/ssh/sshd_config\n} > /dev/null\n[[ $(grep -c \"#PasswordAuthentication no\" /etc/ssh/sshd_config) != '0' ]] && {\n\tsed -i \"s/#PasswordAuthentication no/PasswordAuthentication yes/g\" /etc/ssh/sshd_config\n} > /dev/null\nservice ssh restart > /dev/null\nclear; echo -e \"\\033[1;32mTHEN DEFINE THE ROOT PASSWORD\\033[0m\"; sleep 2s; passwd && rm senharoot.sh\n"
  },
  {
    "path": "stunnel.pem",
    "content": "-----BEGIN CERTIFICATE-----\nMIIEpjCCA46gAwIBAgIUYPNifHvwKdOOBGfiZVhfpDiC32cwDQYJKoZIhvcNAQEL\nBQAwgYsxCzAJBgNVBAYTAlVTMRkwFwYDVQQKExBDbG91ZEZsYXJlLCBJbmMuMTQw\nMgYDVQQLEytDbG91ZEZsYXJlIE9yaWdpbiBTU0wgQ2VydGlmaWNhdGUgQXV0aG9y\naXR5MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlh\nMB4XDTIxMDgyMDAwMTYwMFoXDTM2MDgxNjAwMTYwMFowYjEZMBcGA1UEChMQQ2xv\ndWRGbGFyZSwgSW5jLjEdMBsGA1UECxMUQ2xvdWRGbGFyZSBPcmlnaW4gQ0ExJjAk\nBgNVBAMTHUNsb3VkRmxhcmUgT3JpZ2luIENlcnRpZmljYXRlMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuFPK/ddA/MRjcw8tg41Gi7nqxp3aj3NLqutq\nGyxe78c7vzDcBKny2Iu8q2STzMJqt7lqla2RuXqvoOVC3IJsLfmayzIHANQLl6J/\n3CxpQvu9iPRgDrqvs7sgSscBc1/SMqLQTDpH1+k1Xc9bBo/CWUVbMzbfajPxo2yZ\nIvJrMq0pAw4V2Sb2jQkhgyD4KcRMOY15NG/ENTkq5oWivjS5ts1yF32qPYqjJT8s\nbELHMZO7VjCLZO/bUB8jn3qEItg8Uft4rsPlhm8y68znc3m9jImtTuQUlG8vjLov\n9DTYvQQrwUWnr6sg1bCXlBnv1aU6CnTguvUltil6r2EUwCvtIwIDAQABo4IBKDCC\nASQwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcD\nATAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSpRIspRN9Gi6YphQMD8KXuvJSdejAf\nBgNVHSMEGDAWgBQk6FNXXXw0QIep65TbuuEWePwppDBABggrBgEFBQcBAQQ0MDIw\nMAYIKwYBBQUHMAGGJGh0dHA6Ly9vY3NwLmNsb3VkZmxhcmUuY29tL29yaWdpbl9j\nYTApBgNVHREEIjAggg8qLmtpcml0b3NzaC54eXqCDWtpcml0b3NzaC54eXowOAYD\nVR0fBDEwLzAtoCugKYYnaHR0cDovL2NybC5jbG91ZGZsYXJlLmNvbS9vcmlnaW5f\nY2EuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQAbsza7rCC2HiuVbtnOPU00AspYf//O\nBGPY90ED63UIRtnsH3fb1DvJ09wraiv4esQuK/+im5PR5AW0XTbcOS2SrsZf8ya2\nd4G01VKw/9W6PdklkqffyEivrQ5phPfL4NgrtFE0DkSh2x6MFygwM1IMWy7ZsjSZ\n5pZSHTU7FFgUjsRxO50ytrF37XGK/xU/7pLSAUY6D+H2/8Ze4r4XX7Urr04NLRIc\nH5QAoCgGqEiUJlKzyn+m3ymdV8pHkfRp7WAuZXl00FeKUrIyklXyvq4dBFycTsxy\nSVWJByXpQ1qA19rPTGdSOwP7Cfjd6qBXPd/9wDN+zoYRwTKqcGOL5bIL\n-----END CERTIFICATE-----\n-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC4U8r910D8xGNz\nDy2DjUaLuerGndqPc0uq62obLF7vxzu/MNwEqfLYi7yrZJPMwmq3uWqVrZG5eq+g\n5ULcgmwt+ZrLMgcA1AuXon/cLGlC+72I9GAOuq+zuyBKxwFzX9IyotBMOkfX6TVd\nz1sGj8JZRVszNt9qM/GjbJki8msyrSkDDhXZJvaNCSGDIPgpxEw5jXk0b8Q1OSrm\nhaK+NLm2zXIXfao9iqMlPyxsQscxk7tWMItk79tQHyOfeoQi2DxR+3iuw+WGbzLr\nzOdzeb2Mia1O5BSUby+Mui/0NNi9BCvBRaevqyDVsJeUGe/VpToKdOC69SW2KXqv\nYRTAK+0jAgMBAAECggEAQmRgEcVWEZVVMszNOnyI4+wfzdFut0uyfgpUShxVx6zt\n7sQVA5MJNwlB+EP+XnrKgImHBAmkGvg/SUc6qX1KpNaqdDT9Q8WctU3hGvdeJLPT\nBYDsFnIUtjqY+4Yplhp19ioht8soNHM59yOoaDkgqhHqsww5NaInD5OepvFFPld1\nK4nXNIu/bs57X0IIo99dLdmJxrslx1/A035E9E4eH1lHyH30K3w/rL8LD1kwl+Hr\naoFTmIaT9ms/ckrtNe/84bpC700tMxf5v92IcKeaUjv97W8mkjzq03ejCPYvswFk\n5wzLod/ZD+qflp2HAgkjG4kP+H/mrZWoqlxybyERTQKBgQD+GxhB/xfAwcac7Abb\n9O7IdMZOB9F1ENZHj2rH+jw/RdksGqasm7BA3U3AeuhqAOS4LStq6YlnoArAoOdX\nCCZZ6qo7b8EiOcw2YYZuXxTxcQiDCvxA2CK6+QROBnv1k+R18VKOvLLjqBsNBJ1+\nmKkdH7VJp+RoEJnLAAZtU5C1vwKBgQC5s4qKmzrVh0NXF9k+CcTOu1+C7bUxHL7k\n7ol7+BtZ13u0FRpPFA0SRcm4cE0QN62xAr1+ueA++0KEXog/+HMoxiTT1pFGrsls\nML9QkP8Aag/UEg+5vGxqKWSB8GYE/UQVyP2MzFh+bHjNWK4UB+GL95psq41K+8Iw\nOs7Pk6dJnQKBgQDsD5m6fdPAM4RidXZt0p4dxTYQeXzhhzG5qwdlHhfoI+h764pZ\nogzcRXsczFGrYIcafoPuP2RxyyESEKi5lo2iTLm2m7xNImqPPoyXbmdTYVGqA4OS\nbffdwMZ6AdYYrzq3QugSSETb72ip8FarrAC3WKSe94TeFEX7a1uNJuuxmwKBgAwq\nE6gytO7p1mJtIIDs2OSF56LG+XiHHoYWjhD91qTS9bp9K2UEtjp9MdKQIKwwSYNv\n34Peny7g/KF5I8m0964zFJR/2LJdnrokk1Ouu9WGHRVSPY94JU3q+jd8zOIEySH4\nMYu4kw9tAZjJ91U+kuq9RHNb5XyE81p/b66vSGUNAoGAOtGt8W0PpyAnXq1rNJ7B\n+1nQsV2WmUi/89XFhiS9JIgljXhOEkIrZEFsG0qC2reSbId5HsfgicidVLEJVFsZ\nvIX2p5whGE0RNBK0aNmn/GLiCh5PzNOSvj+zL0k4pKBEflrWOMSvLh+XYwt+3xR/\niXYpDvnS3ZFtMyDo+/BLldI=\n-----END PRIVATE KEY-----\n"
  }
]