mirror of
https://github.com/Z4nzu/hackingtool
synced 2026-05-22 08:28:57 +00:00
Fix 12 issues from Copilot PR review (#590)
post_exploitation.py: - Rename INSTALL_OS -> SUPPORTED_OS in Havoc class (typo, field was ignored) - Sliver: replace curl|sudo bash pipe with download-then-execute pattern ddos.py: - Add DDoSTool() to DDOSTools.TOOLS list (was defined but unreachable) phishing_attack.py: - Rename class Evilginx2 -> Evilginx3 (installs v3 via go install) - Update instance in TOOLS list to match - Fix stale comment: wireless_attack_tools.py -> wireless_attack.py forensics.py: - Remove installable=False from Guymager (conflicted with INSTALL_COMMANDS) tool_manager.py: - Skip sudo prefix when already root (os.geteuid() == 0), matching the pattern already used in install.py install.py: - Add chown -R root:root after cp -a to prevent git "dubious ownership" errors when the source clone has different ownership update.sh: - Add git config safe.directory before pull to prevent dubious ownership - Add --upgrade flag to pip install so dependencies actually update os_detect.py: - Add pkg (FreeBSD) entries to PACKAGE_INSTALL_CMDS, PACKAGE_UPDATE_CMDS, and REQUIRED_PACKAGES — was detected but had no command mappings (KeyError) Skipped (not applicable): - #1 subprocess import: already fixed in prior commit - #11 Path.home() under sudo: by design (installer runs as root)
This commit is contained in:
parent
73980f1130
commit
536568b72d
8 changed files with 15 additions and 10 deletions
|
|
@ -158,6 +158,8 @@ def install_source() -> bool:
|
|||
if APP_INSTALL_DIR.exists():
|
||||
subprocess.run(["rm", "-rf", str(APP_INSTALL_DIR)], check=True)
|
||||
subprocess.run(["cp", "-a", str(source_dir), str(APP_INSTALL_DIR)], check=True)
|
||||
# Fix ownership so git doesn't complain about "dubious ownership"
|
||||
subprocess.run(["chown", "-R", "root:root", str(APP_INSTALL_DIR)], check=False)
|
||||
console.print("[success]✔ Source copied (no re-clone needed)[/success]")
|
||||
return True
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ PACKAGE_INSTALL_CMDS: dict[str, str] = {
|
|||
"zypper": "zypper install -y {packages}",
|
||||
"apk": "apk add {packages}",
|
||||
"brew": "brew install {packages}",
|
||||
"pkg": "pkg install -y {packages}",
|
||||
}
|
||||
|
||||
PACKAGE_UPDATE_CMDS: dict[str, str] = {
|
||||
|
|
@ -89,6 +90,7 @@ PACKAGE_UPDATE_CMDS: dict[str, str] = {
|
|||
"zypper": "zypper update -y",
|
||||
"apk": "apk update && apk upgrade",
|
||||
"brew": "brew update && brew upgrade",
|
||||
"pkg": "pkg update && pkg upgrade -y",
|
||||
}
|
||||
|
||||
# Core system packages needed per package manager
|
||||
|
|
@ -101,6 +103,7 @@ REQUIRED_PACKAGES: dict[str, list[str]] = {
|
|||
"ruby", "golang", "php", "java-17-openjdk-headless"],
|
||||
"zypper": ["git", "python3-pip", "curl", "wget", "ruby", "go", "php"],
|
||||
"brew": ["git", "python3", "curl", "wget", "ruby", "go", "php"],
|
||||
"pkg": ["git", "python3", "py39-pip", "curl", "wget", "ruby", "go", "php83"],
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ class Saphyra(HackingTool):
|
|||
|
||||
class DDOSTools(HackingToolsCollection):
|
||||
TITLE = "DDOS Attack Tools"
|
||||
TOOLS = [SlowLoris(), Asyncrone(), UFONet(), GoldenEye(), Saphyra()]
|
||||
TOOLS = [DDoSTool(), SlowLoris(), Asyncrone(), UFONet(), GoldenEye(), Saphyra()]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -73,8 +73,6 @@ class Guymager(HackingTool):
|
|||
RUN_COMMANDS = ["sudo guymager"]
|
||||
PROJECT_URL = "https://guymager.sourceforge.io/"
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(installable=False)
|
||||
|
||||
|
||||
class Toolsley(HackingTool):
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class HiddenEye(HackingTool):
|
|||
PROJECT_URL = "https://github.com/Morsmalleo/HiddenEye"
|
||||
|
||||
|
||||
class Evilginx2(HackingTool):
|
||||
class Evilginx3(HackingTool):
|
||||
TITLE = "Evilginx3"
|
||||
SUPPORTED_OS = ["linux"]
|
||||
DESCRIPTION = (
|
||||
|
|
@ -136,7 +136,7 @@ class QRJacking(HackingTool):
|
|||
PROJECT_URL = "https://github.com/cryptedwolf/ohmyqr"
|
||||
|
||||
|
||||
# Bug 10 fix: WifiPhisher removed from phishing tools — it belongs in wireless_attack_tools.py
|
||||
# Bug 10 fix: WifiPhisher removed from phishing tools — it belongs in wireless_attack.py
|
||||
|
||||
|
||||
class BlackEye(HackingTool):
|
||||
|
|
@ -237,7 +237,7 @@ class PhishingAttackTools(HackingToolsCollection):
|
|||
Setoolkit(),
|
||||
SocialFish(),
|
||||
HiddenEye(),
|
||||
Evilginx2(),
|
||||
Evilginx3(),
|
||||
ISeeYou(),
|
||||
SayCheese(),
|
||||
QRJacking(),
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ class Sliver(HackingTool):
|
|||
TITLE = "Sliver (C2 Framework)"
|
||||
DESCRIPTION = "Cross-platform adversary emulation/red team C2 framework — mTLS, HTTP(S), DNS, WireGuard."
|
||||
INSTALL_COMMANDS = [
|
||||
"curl https://sliver.sh/install | sudo bash",
|
||||
"curl -sSf https://sliver.sh/install -o /tmp/sliver-install.sh",
|
||||
"sudo bash /tmp/sliver-install.sh",
|
||||
]
|
||||
RUN_COMMANDS = ["sliver --help"]
|
||||
PROJECT_URL = "https://github.com/BishopFox/sliver"
|
||||
|
|
@ -68,7 +69,7 @@ class Sliver(HackingTool):
|
|||
class Havoc(HackingTool):
|
||||
TITLE = "Havoc (C2 Framework)"
|
||||
DESCRIPTION = "Modern post-exploitation C2 framework with EDR evasion. Cobalt Strike alternative."
|
||||
INSTALL_OS = ["linux"]
|
||||
SUPPORTED_OS = ["linux"]
|
||||
INSTALL_COMMANDS = [
|
||||
"git clone https://github.com/HavocFramework/Havoc.git",
|
||||
"cd Havoc && make",
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class UpdateTool(HackingTool):
|
|||
mgr = CURRENT_OS.pkg_manager
|
||||
cmd = PACKAGE_UPDATE_CMDS.get(mgr)
|
||||
if cmd:
|
||||
priv = "" if CURRENT_OS.system == "macos" else "sudo "
|
||||
priv = "" if (CURRENT_OS.system == "macos" or os.geteuid() == 0) else "sudo "
|
||||
# shell=True needed — cmd contains && chains; strings are hardcoded, not user input
|
||||
subprocess.run(f"{priv}{cmd}", shell=True, check=False)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -21,11 +21,12 @@ fi
|
|||
echo "[✔] Internet OK"
|
||||
|
||||
echo "[*] Pulling latest changes..."
|
||||
git -C "$INSTALL_DIR" config --local safe.directory "$INSTALL_DIR"
|
||||
git -C "$INSTALL_DIR" pull --rebase
|
||||
|
||||
echo "[*] Updating Python dependencies..."
|
||||
if [[ -f "$INSTALL_DIR/venv/bin/pip" ]]; then
|
||||
"$INSTALL_DIR/venv/bin/pip" install -q -r "$INSTALL_DIR/requirements.txt"
|
||||
"$INSTALL_DIR/venv/bin/pip" install -q --upgrade -r "$INSTALL_DIR/requirements.txt"
|
||||
else
|
||||
echo "[WARN] venv not found — skipping pip update. Run install.py to create it."
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue