Commit graph

20 commits

Author SHA1 Message Date
Hardik Zinzuvadiya
30c4fce61b Feature: Open Folder option to manually access tool directory
HackingTool:
- Add _get_tool_dir() — finds the tool's local directory by checking:
  1. Git clone target dir (from INSTALL_COMMANDS)
  2. "cd foo && bar" pattern in RUN_COMMANDS
  3. Binary location via shutil.which() → dirname
- Add open_folder() — opens the tool's directory in a new shell ($SHELL)
  so the user can inspect files, run manual install steps, or debug
  If dir not found: shows a helpful message with git clone command
- Added as option 4 in every tool menu (Install, Run, Update, Open Folder)
- Updated inline help to mention the tool menu options
2026-03-15 18:51:19 +05:30
Hardik Zinzuvadiya
91135bdf5f Fix is_installed crash on sub-collections (OtherTools)
OtherTools.TOOLS contains HackingToolsCollection instances (like
SocialMediaBruteforceTools) which don't have the is_installed property.
- Guard is_installed access with hasattr() in both the status column
  and the not_installed count for Install All
- Sub-collections show blank status; individual tools show ✔/✘
2026-03-15 18:41:32 +05:30
Hardik Zinzuvadiya
511a651e0a UI: Dual-line prompt and inline /query search
Prompt style (all menus):
- Replace bare '>' with '╰─>' connected to the hint bar above
- Hint bar uses Claude CLI style: first letter highlighted in cyan,
  rest dimmed (/search  tags  recommend  ?help  quit)
- Creates a visual dual-line input area similar to Claude Code CLI

Inline search:
- Typing /subdomain at the main prompt immediately searches and
  shows results — no second "enter query" prompt needed
- /  (bare slash) still opens the interactive search prompt
- s  still works as a search alias
- search_tools() now accepts optional query parameter

core.py sub-menus:
- Same dual-line prompt style: hint bar + ╰─>
- Compact hint: ?help  quit  99 back
2026-03-15 18:37:20 +05:30
Hardik Zinzuvadiya
fd8d757461 Feature: Update command for each tool (option 3 in tool menu)
HackingTool:
- Add update() method — detects install method from INSTALL_COMMANDS
  and runs the appropriate update:
  git clone → git -C <dir> pull
  pip install → pip install --upgrade
  go install → re-runs go install (fetches latest)
  gem install → gem update
- Checks is_installed first; shows warning if not installed
- Added as option 3 in every tool's OPTIONS menu (Install, Run, Update)
2026-03-15 18:13:37 +05:30
Hardik Zinzuvadiya
81690e3c7c Feature: Install all tools in a category (option 97)
HackingToolsCollection.show_options():
- Count not-installed tools using is_installed property
- Show option 97 'Install all (N not installed)' when N > 0
- On select: iterates all not-installed tools, calls tool.install()
  with progress counter (1/N, 2/N, ...) and error handling per tool
- Hidden when all tools are already installed
- Updated inline help to mention option 97
2026-03-15 18:12:35 +05:30
Hardik Zinzuvadiya
61690a427e Feature: Tag-based filtering with auto-derived tags (t command)
core.py:
- Add TAGS field to HackingTool class (list[str], default empty)
- Allows manual tag override per tool

hackingtool.py:
- Add _get_all_tags() — builds tag index from 19 regex rules that
  auto-derive tags from tool TITLE + DESCRIPTION (osint, scanner, c2,
  web, cloud, mobile, wireless, forensics, reversing, etc.)
- Manual TAGS on a tool class take priority over auto-derived
- Add filter_by_tag() — shows all available tags with tool counts,
  user picks a tag, results shown with installed status, select to
  jump directly into tool.show_options()
- Wire t/tag/tags/filter commands into interact_menu()
- Search also matches against TAGS field
- Updated hint bar: / search · t tags · ? help · q quit
- Updated help overlay with tag filter entry
2026-03-15 18:11:28 +05:30
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