Commit graph

5 commits

Author SHA1 Message Date
Hardik Zinzuvadiya
536568b72d 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)
2026-03-15 19:55:00 +05:30
Hardik Zinzuvadiya
d63df74193 Add install.sh one-liner and fix install.py to detect local source
install.sh (new):
- Standalone bash installer for curl | sudo bash one-liner
- Detects package manager (apt-get, pacman, dnf, brew)
- Installs prerequisites: git, python3, pip, venv
- Checks Python >= 3.10
- Clones repo with --depth 1 (shallow, faster)
- Creates venv + installs requirements
- Creates /usr/bin/hackingtool launcher
- Creates ~/.hackingtool/ dirs with correct ownership (SUDO_USER)

install.py:
- Add _is_source_dir() — detects if install.py is being run from a local
  clone (hackingtool.py exists alongside it)
- install_source() replaces git_clone() — copies source to /usr/share/
  instead of re-cloning when running from a local clone
- Falls back to git clone --depth 1 when not in a source directory
- Eliminates the redundant clone-after-clone pattern

README.md / README_template.md:
- Add one-liner install as primary method
- Keep manual git clone + install.py as alternative
- Remove sudo from hackingtool run command (launcher handles it)
2026-03-15 17:37:57 +05:30
Hardik Zinzuvadiya
3953a280ad Fix Docker sudo error, 99 back navigation, and empty input exit
install.py:
- sudo prefix now determined by euid (== 0 means root) not by OS name
- Previously used 'sudo ' for all Linux — breaks inside Docker where we
  run as root but sudo is not installed
- Single priv variable computed once at top of install_system_packages()

Dockerfile:
- Add python3-venv back to apt installs
- Was removed as 'unused' but install.py uses 'python3 -m venv' to create
  the virtualenv in APP_INSTALL_DIR; missing package caused venv failure

core.py (HackingTool.show_options + HackingToolsCollection.show_options):
- 99 always returns now instead of sys.exit() when parent is None
  Previously: sub-menus with no parent called sys.exit() — since
  interact_menu() never passes parent, pressing 99 in any category
  exited the entire program instead of returning to the main menu
- Empty Enter (blank input) now continues the loop instead of
  defaulting to "99" and triggering exit
  Previously: Prompt default="99" meant pressing Enter without typing
  anything was treated as choosing exit
- "Exit" label on 99 row changed to "Main Menu" since it now returns
2026-03-15 16:34:06 +05:30
Hardik Zinzuvadiya
08f1e3e063 Phase 3: Installation & path overhaul 2026-03-15 13:54:30 +05:30
Modark
7df27d8383
Feat/rich UI menu lovely (#567) 2025-10-14 11:32:18 +05:30