Change install with py (change final_messages)

This commit is contained in:
Modark 2025-10-12 15:28:01 -04:00
parent f1d87d4c45
commit c8e546e5e2

View file

@ -77,29 +77,30 @@ def check_internet():
def system_update_and_install(choice):
try:
if choice == 1:
console.print("[yellow]* Running apt update/upgrade...[/yellow]")
try:
run_cmd("apt update -y && apt upgrade -y")
except subprocess.CalledProcessError as e:
console.print(f"[red][!][/red] apt update/upgrade failed (non-fatal). Continuing installation. Error: {e}")
console.print("[yellow]* Installing required packages (apt)...[/yellow]")
try:
run_cmd("apt-get install -y git python3-pip python3-venv figlet boxes php curl xdotool wget")
except subprocess.CalledProcessError as e:
console.print(f"[red][!][/red] apt-get install failed (non-fatal). You may need to install some packages manually. Error: {e}")
elif choice == 2:
console.print("[yellow]* Running pacman update...[/yellow]")
try:
run_cmd("pacman -Syu --noconfirm")
except subprocess.CalledProcessError as e:
console.print(f"[red][!][/red] pacman update failed (non-fatal). Continuing installation. Error: {e}")
console.print("[yellow]* Installing required packages (pacman)...[/yellow]")
try:
run_cmd("pacman -S --noconfirm git python-pip")
except subprocess.CalledProcessError as e:
console.print(f"[red][!][/red] pacman install failed (non-fatal). You may need to install some packages manually. Error: {e}")
if choice == 1:
console.print("[yellow]* Running apt update/upgrade...[/yellow]")
try:
run_cmd("apt update -y && apt upgrade -y")
except subprocess.CalledProcessError as e:
console.print(f"[red][!][/red] apt update/upgrade failed (non-fatal). Continuing installation. Error: {e}")
console.print("[yellow]* Installing required packages (apt)...[/yellow]")
try:
run_cmd("apt-get install -y git python3-pip python3-venv figlet boxes php curl xdotool wget")
except subprocess.CalledProcessError as e:
console.print(f"[red][!][/red] apt-get install failed (non-fatal). You may need to install some packages manually. Error: {e}")
elif choice == 2:
console.print("[yellow]* Running pacman update...[/yellow]")
try:
run_cmd("pacman -Syu --noconfirm")
except subprocess.CalledProcessError as e:
console.print(f"[red][!][/red] pacman update failed (non-fatal). Continuing installation. Error: {e}")
console.print("[yellow]* Installing required packages (pacman)...[/yellow]")
try:
run_cmd("pacman -S --noconfirm git python-pip")
except subprocess.CalledProcessError as e:
console.print(f"[red][!][/red] pacman install failed (non-fatal). You may need to install some packages manually. Error: {e}")
else:
console.print("[red]Invalid package manager choice[/red]")
def prepare_install_dir():
@ -161,8 +162,11 @@ def create_launcher():
def final_messages():
console.print("\n" + Panel("[bold magenta]Installation complete[/bold magenta]\n\nType [bold cyan]hackingtool[/bold cyan] in terminal to start.", border_style="magenta"))
panel = Panel(
"[bold magenta]Installation complete[/bold magenta]\n\nType [bold cyan]hackingtool[/bold cyan] in terminal to start.",
border_style="magenta",
)
console.print(panel)
def main():
check_root()