Commit graph

8 commits

Author SHA1 Message Date
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
64b9062c9e Improve Dockerfile, docker-compose, add .dockerignore
Dockerfile:
- Add '# syntax=docker/dockerfile:1' to enable BuildKit features
- Add LABEL metadata (OCI image spec)
- Remove unused apt packages: sudo, python3-venv
- Replace --no-cache-dir with --mount=type=cache for pip (faster rebuilds)
- Add comments explaining each decision

docker-compose.yml:
- Remove deprecated 'version:' field (Compose v2 ignores it, shows warning)
- Add 'image: hackingtool:latest' tag for clarity
- Add 'restart: unless-stopped' for production service
- Add 'hackingtool-dev' profile service with live source volume mount
  so dev workflow (edit without rebuild) is separate from default run
- Clarify volume purpose in comments

.dockerignore (new):
- Exclude .git/, images/, __pycache__/, .github/, *.md, tests/
- Prevents multi-hundred-MB build context; dramatically reduces image size
- Keeps layer cache more stable (README changes no longer bust COPY layer)

README.md / README_template.md:
- Replace single-line Docker snippet with 3-option step-by-step guide:
  Option A: docker run -it --rm (no Compose)
  Option B: docker compose up -d + exec (recommended)
  Option C: docker compose --profile dev (live source mount)
- Add docker compose down / down -v stop instructions
2026-03-15 14:27:36 +05:30
Hardik Zinzuvadiya
daf253d255 Phase 11: requirements.txt and Dockerfile cleanup
- requirements.txt: remove boxes, lolcat (system CLI tools not pip packages),
  flask (unused), requests (unused at runtime); pin rich>=13.0.0
- Dockerfile: add --break-system-packages to pip3 install (PEP 668 compliance
  on Kali/Debian externally-managed Python environments)
2026-03-15 13:55:05 +05:30
Hardik Zinzuvadiya
a46f01005b Phase 1+2: Fix all 30 critical bugs and 4 security vulnerabilities 2026-03-15 13:54:03 +05:30
JinnaBalu
1c2cbbbe2a Optimized Dockerfile for layer cache and moved all the installations for cache not to rerun the same layer for every code change for Docker container. 2023-09-01 12:32:42 +05:30
Christian Clauss
3fd3ce4cb3
Dockerfile: Use pip dependency resolver
Now that pip has a real dependency resolver, use it to install ALL pip dependencies in a single Docker layer.
* https://pip.pypa.io/en/stable/topics/dependency-resolution
* https://docs.docker.com/storage/storagedriver/#images-and-layers
2023-03-05 09:12:02 +01:00
Christian Clauss
d201837d51
requirement.txt --> requirements.txt 2023-03-04 14:30:24 +01:00
Víctor García
108bf23272 Add Docker 2022-12-02 22:16:16 +01:00