1
0
mirror of https://github.com/Z4nzu/hackingtool.git synced 2026-06-09 00:16:18 +02:00
Commit Graph

14 Commits

Author SHA1 Message Date
Hardik Zinzuvadiya 26e38aea6e Feature: Show installed status (✔/✘) next to each tool
core.py:
- Add is_installed property to HackingTool class
  Checks: (1) shutil.which() for binary from first RUN_COMMAND,
  (2) os.path.isdir() for git clone target directory
  Handles "cd foo && binary" and "sudo binary" patterns
- Add status column to HackingToolsCollection.show_options() table
  ✔ (green) = installed, ✘ (dim) = not installed
- Archived/back rows updated for extra column
2026-03-15 18:07:40 +05:30
Hardik Zinzuvadiya 7b1950c9a5 Redesign header: full HACKING TOOL art + ? and q in all sub-menus
hackingtool.py:
- Replace 6-line "HT" art with full 12-line "HACKING TOOL" block letters
- Right side gains 3 more info lines: python version, arch, status
- 12 art lines paired with 12 stat lines for consistent separator
- Layout optimized for wide terminals (100+ chars); gracefully
  truncates on narrow ones

core.py — ? and q support in all sub-menus:
- Add _show_inline_help() function: compact navigation reference
  (1-N select, 99 back, 98 project page, ? help, q quit)
- HackingTool.show_options(): parse ? → inline help, q → SystemExit
- HackingToolsCollection.show_options(): same ? and q handling
- Both menus now show hint bar: "Enter number · ? help · q quit"
- Prompt changed from "[?] Select" to ">" for consistency with main menu
- q/quit/exit raises SystemExit(0) to cleanly exit from any depth
2026-03-15 17:28:21 +05:30
Hardik Zinzuvadiya 2834bd6964 Restore Description column and 1-based numbering in collection menus
HackingToolsCollection.show_options():
- Add Description column back (was dropped during restructure)
- Show first line of description; '—' for tools with no description
- Switch to box.SIMPLE_HEAD with show_lines=True for row separators
- Numbering changed from 0-based to 1-based (index 1..N)
- Input validation updated: 1 <= choice <= len(active) with active[choice-1]
2026-03-15 16:46:39 +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 a46f01005b Phase 1+2: Fix all 30 critical bugs and 4 security vulnerabilities 2026-03-15 13:54:03 +05:30
Modark 7df27d8383 Feat/rich UI menu lovely (#567) 2025-10-14 11:32:18 +05:30
Christian Clauss e885d19f8a Minor fixes 2023-03-04 16:02:23 +01:00
Christian Clauss 14ef376b57 Update core.py 2022-12-03 19:08:24 +01:00
Christian Clauss 161825411e Update core.py 2022-06-13 13:02:58 +02:00
Christian Clauss 2283ee3d91 Update core.py 2022-06-13 12:59:39 +02:00
Christian Clauss 6db6a615ed Do not use bare except:
Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on.  Prefer `except Exception:`.  If you're sure what you're doing, be explicit and write `except BaseException:`.
2022-06-13 12:56:48 +02:00
mokrunka ed2c9dd969 fix my mistake on f-string in core.py 2020-12-23 08:56:28 -08:00
mokrunka 381908e12f update some more typos; change print from .format to f-strings for readability 2020-12-18 17:14:36 -08:00
naveennamani eaa920a7e3 Refactored the whole project
List of changes

+ Handling information about a tool has been improved a lot by providing a `HackingTool` class, which takes care of showing the options, running the selected option, executing the required commands
+ This class is designed with flexibililty and simplicity in mind, so adding a new tool is a lot easier, mention TITLE, DESCRIPTION, list of INSTALL_COMMANDS, RUN_COMMANDS and PROJECT_URL and there you go...

+ grouping all the `HackingTool`s is also made super simpler by providing a `HackingToolsCollection` class which groups the tools into their respective categories. Just add the instances of `HackingTool` classes to the TOOLS property of the `HackingToolsCollection`.

+ Refactored all the tools into separate files based on their categories.
+ Added a READM_template.md and generate_readme.py script to automatically generate Table of contents and the list of tools available automatically.
+ Now each tool in the README.md points to its project url if provided. This makes it easier to visit the project from the readme.
2020-08-14 16:41:59 +05:30