Skip to content

Commit e0a8777

Browse files
committed
docs(docs): add README to every project directory \n\n Version: release/0.2.119 \n\n create 21 new READMEs and update 3 existing ones; covers cli, core, modules, templates, sessions, tools, parquets, tests, static, lazyscripts, playbooks, lazyadversaries, scripts, lazyown-docker, lazygui, vpn, docs, lazyc2, modules_ext, modules/backdoor, modules/integrations, modules/rootkit, modules/win_rootkit, cli/commands; remove emojis from lazyaddons and plugins READMEs; update skills README with 95 tool count and collab note \n\n LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \n\n LazyOwn/ https://grisuno.github.io/LazyOwn/ \n\n \n\n Fecha: vie 15 may 2026 19:02:47 -04 \n\n Hora: 1778886167
1 parent c826a81 commit e0a8777

32 files changed

Lines changed: 3299 additions & 2082 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
# Changelog
33

44

5+
### Documentación
6+
7+
### Otros
8+
9+
* * docs(docs): add README to every project directory \n\n Version: release/0.2.119 \n\n create 21 new READMEs and update 3 existing ones; covers cli, core, modules, templates, sessions, tools, parquets, tests, static, lazyscripts, playbooks, lazyadversaries, scripts, lazyown-docker, lazygui, vpn, docs, lazyc2, modules_ext, modules/backdoor, modules/integrations, modules/rootkit, modules/win_rootkit, cli/commands; remove emojis from lazyaddons and plugins READMEs; update skills README with 95 tool count and collab note \n\n LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \n\n LazyOwn/ https://grisuno.github.io/LazyOwn/ \n\n \n\n Fecha: vie 15 may 2026 19:02:47 -04 \n\n Hora: 1778886167
10+
11+
512
### Documentación
613

714
### Otros

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12971,6 +12971,13 @@ No description available.
1297112971
# Changelog
1297212972

1297312973

12974+
### Documentación
12975+
12976+
### Otros
12977+
12978+
* * docs(docs): CLAUDE.md update with beacon family, collab, and onboarding \n\n Version: release/0.2.118 \n\n add sections 15c-15e covering blacksandbeacon Linux BOF, collab_bp team server, and QUICKSTART onboarding; update repository map, C2 surface, sessions table, and cheatsheet \n\n LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \n\n LazyOwn/ https://grisuno.github.io/LazyOwn/ \n\n \n\n Fecha: vie 15 may 2026 16:11:13 -04 \n\n Hora: 1778875873
12979+
12980+
1297412981
### Nuevas características
1297512982

1297612983
### Otros

cli/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# cli
2+
3+
Shell-layer extensions for the LazyOwn cmd2 CLI. Every file here plugs into
4+
`LazyOwnShell` without touching the 27k-line `lazyown.py` core directly. The
5+
layer follows strict Dependency Inversion: each module depends on small
6+
`typing.Protocol` interfaces rather than on the concrete shell class.
7+
8+
## Files
9+
10+
| File | Purpose |
11+
|------|---------|
12+
| `wizard.py` | Guided first-run setup. Walks the operator through rhost, lhost, domain, device, os_id, api_key, and SecLists paths. Auto-detects lhost from the routing table. Zero imports from `lazyown.py` or `lazyc2.py`. |
13+
| `aliases.py` | Dynamic alias resolver. Alias templates keep `{rhost}` / `{lhost}` placeholders and are rendered against `self.params` at execution time. `DynamicAliasResolver` + `cli/aliases.yaml` drive this. |
14+
| `aliases.yaml` | Declarative alias definitions consumed by `aliases.py`. |
15+
| `graph_advisor.py` | Reads `graphify-out/graph_lazyown.json` and answers three queries: fuzzy node search, graph neighbour walk, and next-step recommendation weighted by recent activity. Caches by `(path, mtime)`. |
16+
| `reactive_hints.py` | `register_postcmd_hook` callback. After every `do_*` fires, prints one dim line of graph-driven next-step suggestions. Controlled by `enable_inline_hints` in `payload.json`. |
17+
| `dashboard_tui.py` | Full-screen Textual TUI dashboard. Launched by the `dashboard` CLI command. Refreshes every 5 seconds. Reads `payload.json`, `sessions/world_model.json`, `sessions/tasks.json`, session CSV, and credential files. |
18+
| `cli_enhancements.py` | Fuzzy command finder (`fz`), interactive parameter form (`form`), live scan tail (`status_tail`), log grep (`grep_log`), hot addon reloader (`reload_addons`), and payload-aware Tab completer. |
19+
| `fuzzy_picker.py` | Curses-driven fuzzy dropdown anchored at the bottom of the terminal. Opens on Tab when two or more completions exist. Navigation: arrow keys, Page Up/Down, Backspace to refine, Enter or Tab to insert. |
20+
| `palette.py` | Phase-aware command palette. Reads the command index and filters by engagement phase. |
21+
| `palette_command.py` | cmd2 command and Tab-completer for the `palette` verb. |
22+
| `palette_graph.py` | Graph-backed palette scoring. Merges fuzzy text rank with graph centrality. |
23+
| `palette_telemetry.py` | Records palette usage to improve future ranking. |
24+
| `banner_config.py` | Powerlevel10k-style prompt segment wizard. Manages the neon-box prompt configuration stored in `payload.json`. |
25+
| `exploit_advisor.py` | Suggests exploits based on discovered service versions. Backed by the parquet knowledge bases. |
26+
| `engagement_hooks.py` | Pre/post-command hooks that update `sessions/world_model.json` after each command. |
27+
| `ops_commands.py` | Operational commands loaded as a cmd2 `CommandSet`. |
28+
| `protips.py` | Context-sensitive tips printed below the prompt. |
29+
| `registry.py` | Central registry of CLI extensions. Used by `lazyown.py` to auto-discover and wire command sets. |
30+
| `show.py` | Display helpers for tabular output inside the shell. |
31+
| `assign.py` | `assign` and `set` command logic extracted for reuse. |
32+
| `command_index.json` | Pre-built index of every `do_*` command, alias, addon, and plugin. Rebuilt by `scripts/build_command_index.py`. |
33+
| `commands/` | cmd2 `CommandSet` subpackage. See `commands/README.md`. |
34+
35+
## Design rules
36+
37+
- No file in `cli/` may import `lazyown.py` or `lazyc2.py`.
38+
- Output goes through `rich.console.Console`, never raw `print()`, so ANSI
39+
handling is correct on all terminals and piped output.
40+
- Graph-dependent features (`reactive_hints`, `graph_advisor`, `palette_graph`)
41+
degrade silently when `graphify-out/graph_lazyown.json` is absent — no
42+
error, no output.
43+
- `wizard.py` takes a `params: dict` and a `save: Callable` injected by the
44+
caller. It never reads `payload.json` directly.
45+
46+
## Rebuild the command index
47+
48+
```bash
49+
python scripts/build_command_index.py
50+
```
51+
52+
Run this after adding a new `do_*` command, alias, addon, or plugin so Tab
53+
completion and `fz` reflect the change immediately.

cli/commands/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# cli/commands
2+
3+
cmd2 `CommandSet` subpackage. Each file here defines a `CommandSet` class
4+
that is auto-discovered by `cli/registry.py` and wired into `LazyOwnShell`
5+
at startup. This keeps the main `lazyown.py` free of audit-specific command
6+
logic while still surfacing the commands in the same CLI namespace.
7+
8+
## Files
9+
10+
| File | CommandSet | Commands provided |
11+
|------|-----------|-------------------|
12+
| `audit.py` | `AuditCommandSet` | `fz`, `form`, `status_tail`, `grep_log`, `reload_addons`, `audit_complete_keys` |
13+
| `diagnostics.py` | `DiagnosticsCommandSet` | Framework health checks, version info |
14+
| `_base.py` | `BaseCommandSet` | Shared helpers inherited by all command sets |
15+
| `__init__.py` || Package marker; exports the `CommandSet` classes for auto-discovery |
16+
17+
## Adding a command set
18+
19+
1. Create `cli/commands/<name>.py`.
20+
2. Define a class that subclasses `cmd2.CommandSet`.
21+
3. Add `do_*` methods following the same conventions as `lazyown.py` commands.
22+
4. Import and register it in `cli/commands/__init__.py`.
23+
5. `cli/registry.py` picks it up on the next shell start.
24+
25+
Do not place commands here that need `self.params` write-back — those belong
26+
in `lazyown.py` because `CommandSet` instances do not own the params dict.
27+
Read-only inspection and display commands are the right fit for this package.

core/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# core
2+
3+
Shared foundation layer imported by both `lazyown.py` and `lazyc2.py`. Contains
4+
the canonical `Config` class, cryptographic utilities, validation helpers, and
5+
low-level protocol constants. Nothing in `core/` imports from `lazyown.py`,
6+
`lazyc2.py`, or `modules/`.
7+
8+
## Files
9+
10+
| File | Purpose |
11+
|------|---------|
12+
| `config.py` | Canonical `Config` class. Wraps the `payload.json` dict and exposes keys as attributes (`cfg.rhost`) and via `__getitem__` (`cfg["rhost"]`). Returns `None` for missing keys. **This is the single definition**`utils.py` re-exports it for backwards compatibility but must not redefine it. |
13+
| `crypto.py` | Cryptographic primitives: XOR encrypt/decrypt for beacon encoding, AES-256 helpers, and key/IV generation. |
14+
| `validators.py` | Input validation functions: IP address format check, port range check, safe path validation. Used by CLI commands before they touch `payload.json` or the filesystem. |
15+
| `protocols.py` | `typing.Protocol` definitions shared across `cli/`, `modules/`, and `skills/`: `PayloadProvider`, `CommandLister`, `TerminalIO`, `LLMBackend`, `MemoryStore`, `Selector`. Enables Dependency Inversion without circular imports. |
16+
| `console.py` | Rich console singleton and ANSI colour helpers used by `print_msg`, `print_warn`, `print_error`. |
17+
| `__init__.py` | Re-exports `Config`, `load_payload`, and the validators so callers can do `from core import Config`. |
18+
19+
## Usage
20+
21+
```python
22+
from core import Config
23+
from core.validators import check_rhost, check_lhost
24+
25+
cfg = Config({"rhost": "10.10.11.5", "lhost": "10.10.14.3"})
26+
print(cfg.rhost) # "10.10.11.5"
27+
print(cfg["nonexistent"]) # None
28+
29+
if not check_rhost(cfg.rhost):
30+
print("rhost is not set")
31+
```
32+
33+
## Rules
34+
35+
- `core/` has no runtime dependencies beyond the Python standard library and
36+
`rich`. Never add `flask`, `cmd2`, or any framework import here.
37+
- `Config` is defined exactly once in `core/config.py`. The `utils.py`
38+
re-export exists for backwards compatibility with the large existing codebase
39+
but adds no new logic.
40+
- All validators return `bool` — they never raise, never print, never log.
41+
Callers decide what to do on failure.

0 commit comments

Comments
 (0)