Implementation:0xSteph Pentest ai Menu Interactive Launcher
| Knowledge Sources | |
|---|---|
| Domains | CLI, Interactive_Menu, Tool_Discovery |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
Concrete tool for interactive numeric-menu tool discovery and launch, provided by the pentest-ai CLI module.
Description
The menu module provides a "Z4nzu/hackingtool"-style interactive launcher for users without an LLM client. It offers 14 categories of security tools (recon, web, AD, cloud, mobile, wireless, credentials, exploitation, reverse engineering, forensics, steganography, OSINT, phishing, and stress testing) with numeric navigation, search, tag filtering, and keyword-based agent recommendation. The menu is read-mostly: selecting a tool produces the exact CLI invocation to run, but does not silently launch scans.
Usage
Import the run function when you need to launch the interactive menu via ptai menu. The menu is for users who want to drive pentest-ai's underlying tools without setting up an LLM subscription.
Code Reference
Source Location
- Repository: 0xSteph_Pentest_ai
- File: cli/menu.py
- Lines: 1-524
Signature
MENU_CATEGORIES: list[dict[str, Any]] # 14 category definitions
def run() -> int:
"""Entry point invoked by `ptai menu`."""
Import
from cli.menu import run, MENU_CATEGORIES
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| stdin | str | Yes | User input from terminal (numeric choice, /search, t tag, r recommend, etc.) |
Outputs
| Name | Type | Description |
|---|---|---|
| exit code | int | 0 on normal quit |
Usage Examples
Launch the Menu
from cli.menu import run
# Starts the interactive loop
exit_code = run()
# User navigates with numbers, /search, t <tag>, r for recommendations
Use the Catalog Programmatically
from cli.menu import MENU_CATEGORIES
for cat in MENU_CATEGORIES:
print(f"{cat['id']}. {cat['name']} ({len(cat['tools'])} tools)")
for name, desc, cmd in cat["tools"]:
print(f" - {name}: {desc}")