"", "Conexoes " => "", "Ferramentas" => "", ]; $maxDigits = strlen(count($menuItems)); $version2 = checkatt(); echo "DragonCore SSH | Versao: $version\n"; echo "------------\n"; echo "-| Usuarios Criados: $users |-\n"; echo "-| Usuarios Online: $userons |-\n"; echo "-| Status: $version2 |-\n"; echo "------------\n"; $i = 1; foreach ($menuItems as $item => $description) { $number = str_pad($i, $maxDigits, " ", STR_PAD_LEFT); echo "$number. $item"; if (!empty($description)) { echo " $description"; } echo "\n"; $i++; } echo "0. Sair\n"; echo "------------\n"; } function menuconnect() { $menuItems = [ "Dragon X Go" => "", "Stunnel4" => "", "OpenVPN" => "", "Xray Core" => "", "DNSTT (SlowDNS)" => "", "Portas Ativas" => "", ]; $maxDigits = strlen(count($menuItems)); echo "Conexoes\n"; echo "------------\n"; $i = 1; foreach ($menuItems as $item => $description) { $number = str_pad($i, $maxDigits, " ", STR_PAD_LEFT); echo "$number. $item"; if (!empty($description)) { echo " $description"; } echo "\n"; $i++; } echo "0. Voltar para o menu\n"; echo "------------\n"; } function menuferramenta() { $menuItems = [ "Restaurar Backup SSHPlus" => "", "BadVPN X" => "", "Balanceamento de Rede" => "", "CheckUser Mult App" => "", "Gerar / Importar Backup DragonCoreSSH" => "", "AutoMenu" => "", "Speedtest" => "", "Limitador" => "Aviso Alto Uso de CPU!", "Atualizar" => "", "INFO VPS" => "", "Bot Telegram" => "", "Remover todos os usuarios" => "", "Remover Script" => "", ]; $maxDigits = strlen(count($menuItems)); echo "Ferramentas\n"; echo "------------\n"; $i = 1; foreach ($menuItems as $item => $description) { $number = str_pad($i, $maxDigits, " ", STR_PAD_LEFT); echo "$number. $item"; if (!empty($description)) { echo " $description"; } echo "\n"; $i++; } echo "0. Voltar para o menu\n"; echo "------------\n"; } function menuusuario() { $menuItems = [ "Criar Usuario" => "", "Gerar Teste" => "", "Remover Usuario" => "", "Monitor Online" => "", "Alterar Validade" => "", "Alterar Limite" => "", "Alterar Senha" => "", "Relatorio de Usuarios" => "", "Remover Expirados" => "", ]; $maxDigits = strlen(count($menuItems)); echo "Gerenciamento de usuarios\n"; echo "------------\n"; $i = 1; foreach ($menuItems as $item => $description) { $number = str_pad($i, $maxDigits, " ", STR_PAD_LEFT); echo "$number. $item"; if (!empty($description)) { echo " $description"; } echo "\n"; $i++; } echo "0. Voltar para o menu\n"; echo "------------\n"; } function menuxray() { // Build a static set of management options for Xray. Users can install, configure or // remove Xray regardless of its current state. This avoids confusing toggles and allows // explicit selection of actions. $menuItems = [ 'Criar Usuario Xray' => '', 'Remover Usuario Xray' => '', 'Listar Usuarios Xray' => '', 'Informacao Xray' => '', 'Gerar Certificado TLS' => '', 'Instalar/Configurar Xray Core' => '', 'Remover Xray Core' => '', ]; $maxDigits = strlen(count($menuItems)); echo "Gerenciamento Xray\n"; echo "------------\n"; $i = 1; foreach ($menuItems as $item => $description) { $number = str_pad($i, $maxDigits, " ", STR_PAD_LEFT); echo "$number. $item"; if (!empty($description)) { echo " $description"; } echo "\n"; $i++; } echo "0. Voltar para o menu\n"; echo "------------\n"; } if ($argc < 2) { die("Use o MENU!\n"); } $functionName = $argv[1]; if (function_exists($functionName)) { array_shift($argv); echo call_user_func_array($functionName, array_slice($argv, 1)); } else { echo "Function $functionName does not exist.\n"; }