mirror of
https://github.com/Z4nzu/hackingtool
synced 2026-05-24 01:18:39 +00:00
Phase 13 (cont): Final os.system cleanup
- anonsurf.py: os.system("sudo anonsurf stop") → subprocess.run list form
- tool_manager.py: os.system(f"{priv}{cmd}") → subprocess.run(shell=True)
(shell=True justified: cmd is from hardcoded PACKAGE_UPDATE_CMDS dict, not user input)
This commit is contained in:
parent
d1bcca5675
commit
974896bf10
2 changed files with 4 additions and 2 deletions
|
|
@ -24,8 +24,9 @@ class AnonymouslySurf(HackingTool):
|
|||
super().__init__([("Stop", self.stop)])
|
||||
|
||||
def stop(self):
|
||||
import subprocess
|
||||
console.print("[bold magenta]Stopping Anonsurf...[/bold magenta]")
|
||||
os.system("sudo anonsurf stop")
|
||||
subprocess.run(["sudo", "anonsurf", "stop"])
|
||||
|
||||
|
||||
class Multitor(HackingTool):
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ class UpdateTool(HackingTool):
|
|||
cmd = PACKAGE_UPDATE_CMDS.get(mgr)
|
||||
if cmd:
|
||||
priv = "" if CURRENT_OS.system == "macos" else "sudo "
|
||||
os.system(f"{priv}{cmd}")
|
||||
# shell=True needed — cmd contains && chains; strings are hardcoded, not user input
|
||||
subprocess.run(f"{priv}{cmd}", shell=True, check=False)
|
||||
else:
|
||||
console.print("[warning]Unknown package manager — update manually.[/warning]")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue