diff --git a/core/cli_api.py b/core/cli_api.py index a84262c..c415d4d 100644 --- a/core/cli_api.py +++ b/core/cli_api.py @@ -42,7 +42,7 @@ class Command(Enum): SHELL_SINGBOX = os.path.join(SCRIPT_DIR, 'singbox', 'singbox_shell.sh') SHELL_WEBPANEL = os.path.join(SCRIPT_DIR, 'webpanel', 'webpanel_shell.sh') INSTALL_NORMALSUB = os.path.join(SCRIPT_DIR, 'normalsub', 'normalsub.sh') - INSTALL_TCP_BRUTAL = os.path.join(SCRIPT_DIR, 'tcp-brutal', 'install.sh') + INSTALL_TCP_BRUTAL = os.path.join(SCRIPT_DIR, 'tcp-brutal', 'install.py') INSTALL_WARP = os.path.join(SCRIPT_DIR, 'warp', 'install.py') UNINSTALL_WARP = os.path.join(SCRIPT_DIR, 'warp', 'uninstall.py') CONFIGURE_WARP = os.path.join(SCRIPT_DIR, 'warp', 'configure.py') @@ -431,7 +431,7 @@ def update_geo(country: str): def install_tcp_brutal(): '''Installs TCP Brutal.''' - run_cmd(['bash', Command.INSTALL_TCP_BRUTAL.value]) + run_cmd(['python3', Command.INSTALL_TCP_BRUTAL.value]) def install_warp(): diff --git a/core/scripts/tcp-brutal/install.py b/core/scripts/tcp-brutal/install.py new file mode 100644 index 0000000..65785b0 --- /dev/null +++ b/core/scripts/tcp-brutal/install.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import os +import subprocess + +def main(): + print("Installing TCP Brutal...") + + subprocess.run("bash -c \"$(curl -fsSL https://tcp.hy2.sh/)\"", shell=True) + os.system('clear') + + print("TCP Brutal installation complete.") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/core/scripts/tcp-brutal/install.sh b/core/scripts/tcp-brutal/install.sh deleted file mode 100644 index 356fd70..0000000 --- a/core/scripts/tcp-brutal/install.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -echo "Installing TCP Brutal..." -bash <(curl -fsSL https://tcp.hy2.sh/) -sleep 3 -clear -echo "TCP Brutal installation complete." \ No newline at end of file