Agent API_p17 - grisuno/LazyOwn GitHub Wiki

API (page 17 of 23)

Previous: API_p16.md

modules/traffic_recorder.py

Imported by: cli/commands/lazyops.py, modules/lazy_bridge.py, modules/lazy_loop.py, modules/lazy_proxy.py, skills/autonomous_daemon.py, skills/lazyown_mcp.py, tests/test_engage_gates.py, tests/test_lazy_evidence.py, tests/test_lazy_parity.py, tests/test_lazy_proxy.py, tests/test_safety_gates.py

  • url_template (function) modules/traffic_recorder.py:69 def url_template(url) -- Collapse numeric path segments so similar URLs group together.
  • TrafficRecorder.__init__ (method) modules/traffic_recorder.py:94 def __init__(self, base_dir) -- Create storage directories and initialize the index.
  • TrafficRecorder.record (method) modules/traffic_recorder.py:138 def record(self, method, url, status, req_body, resp_body, content_type, req_headers, resp_headers, host, port... -- Persist one exchange and return its descriptor.
  • TrafficRecorder.since (method) modules/traffic_recorder.py:230 def since(self, rowid, limit) -- Page exchanges newer than a rowid watermark for loop ingestion.
  • TrafficRecorder.latest_rowid (method) modules/traffic_recorder.py:247 def latest_rowid(self) -- Return the current max rowid (0 when the index is empty).
  • TrafficRecorder.query (method) modules/traffic_recorder.py:253 def query(self, host, status, limit, offset, task) -- Page exchanges with optional host, status and task filters.
  • TrafficRecorder.get_body (method) modules/traffic_recorder.py:275 def get_body(self, exchange_id) -- Load the stored body document for one exchange.
  • TrafficRecorder.read_body (method) modules/traffic_recorder.py:284 def read_body(self, exchange_id, part, offset, length) -- Read one body in ranges like a blob store.
  • TrafficRecorder.count (method) modules/traffic_recorder.py:317 def count(self) -- Return the total number of recorded exchanges.
  • TrafficRecorder.backfill_fts (method) modules/traffic_recorder.py:343 def backfill_fts(self, batch) -- Index stored bodies missing from the FTS table.
  • TrafficRecorder.search_body (method) modules/traffic_recorder.py:382 def search_body(self, query, limit) -- Full-text search request/response bodies.
  • TrafficRecorder.export_archive (method) modules/traffic_recorder.py:451 def export_archive(self, path, limit, task) -- Export the index plus bodies into a portable zip archive.
  • TrafficRecorder.import_archive (method) modules/traffic_recorder.py:493 def import_archive(self, path) -- Merge an archive exported by :meth:export_archive.
  • TrafficRecorder.import_inbox (method) modules/traffic_recorder.py:554 def import_inbox(self, inbox_dir) -- Import every zip dropped in the inbox, moving handled files away.
  • TrafficRecorder.gc (method) modules/traffic_recorder.py:587 def gc(self, older_than_sec) -- Delete exchanges older than a cut-off with their bodies and index rows.

modules/ttp_coverage.py

Depends on: core/logging.py Imported by: cli/commands/caldera.py

modules/ttpscope_bridge.py

Depends on: core/logging.py, core/safe_exec.py, modules/atomic_resolver.py, skills/lazyown_parquet_db.py Imported by: skills/lazyown_mcp.py

modules/unified_bridge.py

Depends on: core/logging.py, modules/event_bus.py, modules/lazyown_bridge.py, modules/mcp_agent_bridge.py, modules/state_manager.py, modules/toposwarm_bridge.py Imported by: lazyown.py

modules/unified_dashboard.py

Depends on: cli/graph_advisor.py, core/logging.py, modules/dashboard_engine.py, modules/exploit_recommender.py, modules/live_surface.py, modules/world_model.py, skills/hive_mind.py, skills/lazyown_policy.py Imported by: skills/lazyown_mcp.py, tests/test_unified_dashboard.py

modules/venator.py

modules/vuln_bot_cli.py

Depends on: modules/vulnbot.py

modules/vulnbot.py

Depends on: core/logging.py, modules/agent_runner.py, modules/ai_model.py, modules/llm_factory.py, modules/logging_config.py Imported by: modules/vuln_bot_cli.py

modules/websocket_beacon.py

Depends on: core/hardening.py

modules/win_rootkit/backup.c

modules/win_rootkit/mrhyde.c

modules/win_rootkit/win_rin3_rootkit.cs

modules/win_rootkit/win_ring3_rootkit.c

modules/win_rootkit/win_ring3_rootkit.cpp

modules/workspace.py

Imported by: tests/test_lazy_loop.py

  • root (function) modules/workspace.py:21 def root() -- Return (and create) the workspace root directory.
  • resolve (function) modules/workspace.py:27 def resolve(rel) -- Resolve a workspace-relative path, refusing escapes.
  • list_entries (function) modules/workspace.py:46 def list_entries(rel) -- List one directory with names, kinds and sizes.
  • read_text (function) modules/workspace.py:63 def read_text(rel, limit) -- Read one file, truncated to the byte limit.
  • write_text (function) modules/workspace.py:72 def write_text(rel, content) -- Write one file, creating parents; returns the character count.
  • make_dir (function) modules/workspace.py:83 def make_dir(rel) -- Create one directory (parents included).
  • remove (function) modules/workspace.py:90 def remove(rel) -- Delete a file or directory tree inside the workspace.

modules/world_model.py

Depends on: cli/commands/enum.py, core/logging.py Imported by: cli/commands/exploit_migrated.py, cli/commands/help_ui.py, cli/commands/mcp_bridge.py, cli/commands/pwn.py, cli/ops_commands.py, lazyc2.py, modules/atomic_exploit_bridge.py, modules/exploit_recommender.py, modules/integrations/nuclei_parser.py, modules/intelligence_engine.py, modules/killchain.py, modules/lazy_bridge.py, modules/lazy_intel.py, modules/live_surface.py, modules/operation.py, modules/planner.py, modules/playbook_engine.py, modules/state_manager.py, modules/unified_dashboard.py, skills/autonomous_daemon.py, skills/lazyown_mcp.py, tests/conftest.py, tests/integration_autonomous_flow.py, tests/test_autonomous_ops.py, tests/test_core_modules.py, tests/test_killchain_snapshot.py, tests/test_killchain_unified.py, tests/test_killchain_unified_v2.py, tests/test_moe_rl_swan.py, tests/test_ops_loot_phase.py, tests/test_phase1_data_gaps.py, tests/test_world_model_extended.py

modules/yaml_generator.py

Depends on: modules/ai_model.py, modules/llm_factory.py

modules/yara_scanner.py

Imported by: cli/commands/postexp_migrated.py, modules/intelligence_engine.py

  • YaraScanner.__init__ (method) modules/yara_scanner.py:31 def __init__(self, rules_dir, auto_compile)
  • YaraScanner.ensure_directory (method) modules/yara_scanner.py:41 def ensure_directory(self) -- Create the YARA rules directory if it does not exist.
  • YaraScanner.compile_all (method) modules/yara_scanner.py:54 def compile_all(self) -- Compile all .yar files in the rules directory.
  • YaraScanner.scan_file (method) modules/yara_scanner.py:98 def scan_file(self, filepath, timeout) -- Scan a single file with all compiled YARA rules.
  • target (function) modules/yara_scanner.py:137 def target()
  • YaraScanner.scan_directory (method) modules/yara_scanner.py:187 def scan_directory(self, directory, recursive, extensions, max_files) -- Scan all files in a directory recursively.
  • YaraScanner.add_rule (method) modules/yara_scanner.py:258 def add_rule(self, name, content) -- Add a new YARA rule to the rules directory.
  • YaraScanner.list_rules (method) modules/yara_scanner.py:277 def list_rules(self) -- List all YARA rules in the rules directory.
  • YaraScanner.download_community_rules (method) modules/yara_scanner.py:300 def download_community_rules(self) -- Attempt to download community YARA rules from popular repositories.
  • YaraScanner.ioc_scan (method) modules/yara_scanner.py:328 def ioc_scan(self, target_path, iocs) -- Scan for IOCs (hashes, strings, registry keys) in a file/directory.
  • create_default_rules (function) modules/yara_scanner.py:371 def create_default_rules() -- Create a set of default YARA rules for common threats.

plugins/generate_c_reverse_shell.lua

plugins/generate_cleanup_commands.lua

plugins/generate_html_payload.lua

plugins/generate_lateral_command.lua

plugins/generate_linux_asm_reverse_shell.lua

plugins/generate_linux_raw_shellcode.lua

plugins/generate_lolbird.lua

plugins/generate_msfvenom_loader.lua

plugins/generate_msfvenom_loader_windows.lua

plugins/generate_reverse_shell.lua

plugins/generate_stub.lua

plugins/init_plugins.lua

plugins/kerberos_harvest.lua

plugins/lolbas_certutil_download_exec.lua

plugins/lolbas_certutil_exe.lua

plugins/lolbas_wmic_xsl_execution.lua

plugins/parse_nmap_with_xmlstarlet.lua

plugins/run_nuclei_on_nmap_files.lua

plugins/run_python_rev_c2.lua

plugins/rundll32_sct_from_url.lua

plugins/validate_shellcode.lua

plugins/visualize_network.lua

poc_tui/app.py

Depends on: cli/commands/containers.py, lazyown.py Imported by: poc_tui/__main__.py, poc_tui/run.py, poc_tui/test_app.py

  • ShellBackend.__init__ (method) poc_tui/app.py:47 def __init__(self, base_dir)
  • ShellBackend.import_shell_class (method) poc_tui/app.py:53 def import_shell_class(self) -- Import LazyOwnShell in the main thread (required for signal handlers).
  • ShellBackend.start (method) poc_tui/app.py:71 def start(self) -- Instantiate LazyOwnShell (must be called from main thread).
  • ShellBackend.run (method) poc_tui/app.py:83 def run(self, cmd) -- Execute a command and return its captured output.
  • ShellBackend.get_commands (method) poc_tui/app.py:106 def get_commands(self) -- Return {command_name: help_text} from the live shell.
  • ShellBackend.get_aliases (method) poc_tui/app.py:119 def get_aliases(self)
  • ShellBackend.stop (method) poc_tui/app.py:124 def stop(self)
  • DashboardPanel.__init__ (method) poc_tui/app.py:140 def __init__(self, base_dir)
  • DashboardPanel.compose (method) poc_tui/app.py:144 def compose(self)
  • DashboardPanel.refresh_data (method) poc_tui/app.py:165 def refresh_data(self, backend, cmd_count) -- Pull latest state from the LIVE shell params (not stale disk file).
  • PluginBrowser.__init__ (method) poc_tui/app.py:198 def __init__(self)
  • PluginBrowser.compose (method) poc_tui/app.py:201 def compose(self)
  • PluginBrowser.update_commands (method) poc_tui/app.py:207 def update_commands(self, commands)
  • OutputPanel.__init__ (method) poc_tui/app.py:248 def __init__(self)
  • OutputPanel.compose (method) poc_tui/app.py:252 def compose(self)
  • OutputPanel.write_renderable (method) poc_tui/app.py:258 def write_renderable(self, renderable) -- Write a Rich renderable (no markup parsing applied).
  • OutputPanel.write_markup (method) poc_tui/app.py:263 def write_markup(self, text) -- Write a trusted internal string with Rich markup.
  • OutputPanel.append_command (method) poc_tui/app.py:268 def append_command(self, cmd)
  • OutputPanel.append_result (method) poc_tui/app.py:273 def append_result(self, text, success) -- Write real shell output, converting ANSI — never markup-parsed.
  • OutputPanel.append_error (method) poc_tui/app.py:283 def append_error(self, text) -- Write a TUI-side error message (plain, no markup from unsafe text).
  • OutputPanel.append_system (method) poc_tui/app.py:287 def append_system(self, text) -- Write a TUI-side status message.
  • LazyOwnTUI.__init__ (method) poc_tui/app.py:394 def __init__(self, base_dir)
  • LazyOwnTUI.compose (method) poc_tui/app.py:405 def compose(self)
  • LazyOwnTUI.on_mount (method) poc_tui/app.py:418 def on_mount(self) -- Start the real cmd2 shell backend.
  • LazyOwnTUI.execute_command (method) poc_tui/app.py:470 def execute_command(self, cmd_str) -- Send command to real cmd2 shell, display captured output.
  • LazyOwnTUI.action_clear_output (method) poc_tui/app.py:539 def action_clear_output(self)
  • LazyOwnTUI.action_tab_complete (method) poc_tui/app.py:544 def action_tab_complete(self)
  • LazyOwnTUI.action_toggle_sidebar (method) poc_tui/app.py:549 def action_toggle_sidebar(self)
  • LazyOwnTUI.action_refresh_dashboard (method) poc_tui/app.py:555 def action_refresh_dashboard(self)
  • LazyOwnTUI.action_quit (method) poc_tui/app.py:561 def action_quit(self) -- Clean shutdown: drop the queue, stop the shell, exit the app.
  • LazyOwnTUI.on_command_submitted (method) poc_tui/app.py:577 def on_command_submitted(self, event)
  • LazyOwnTUI.on_key (method) poc_tui/app.py:586 def on_key(self, event)
  • main (function) poc_tui/app.py:629 def main()

poc_tui/config.py

Imported by: poc_tui/plugin_loader.py

poc_tui/plugin_loader.py

Depends on: poc_tui/config.py

poc_tui/run.py

Depends on: poc_tui/app.py

readmeneitor.py

  • normalize_trailing_newline (function) readmeneitor.py:74 def normalize_trailing_newline(output_path) -- Collapse a generated file tail to exactly one newline.
  • load_command_index (function) readmeneitor.py:83 def load_command_index(index_path) -- Load and parse the command index JSON file.
  • build_command_map (function) readmeneitor.py:104 def build_command_map(index_data) -- Build a lookup dict from command name to its metadata.
  • extract_docstrings_from_file (function) readmeneitor.py:132 def extract_docstrings_from_file(filepath) -- Parse a single Python file with AST and extract docstrings of do_* methods.
  • extract_docstrings_from_dir (function) readmeneitor.py:161 def extract_docstrings_from_dir(dirpath) -- Recursively scan a directory for Python files and extract all do_* docstrings.
  • group_commands_by_phase (function) readmeneitor.py:187 def group_commands_by_phase(cmd_map) -- Group command names by their kill-chain phase.
  • extract_functions_from_file (function) readmeneitor.py:209 def extract_functions_from_file(filepath) -- Parse a Python file with AST and extract docstrings of public functions.
  • write_utils_md (function) readmeneitor.py:241 def write_utils_md(functions, output_path) -- Generate UTILS.md with a helper-function reference for [utils.py](https://github.com/grisuno/LazyOwn/blob/146a52570ef792d1ec01ec4d3709b0c159990e47/utils.py).
  • write_commands_md (function) readmeneitor.py:276 def write_commands_md(cmd_map, docstrings, groups, output_path) -- Generate COMMANDS.md with a table of contents and per-phase command reference.
  • convert_to_html (function) readmeneitor.py:343 def convert_to_html(md_path, html_path) -- Convert the generated Markdown file to HTML using pandoc.
  • main (function) readmeneitor.py:379 def main() -- Entry point: scan sources, load metadata, and generate reference docs.

run_topoexploit_agent.sh

scripts/activate_migrations.py

scripts/backfill_addon_os_trigger.py

scripts/check_contract_manifest.py

Imported by: tests/test_contract_manifest.py

scripts/devtools/command_audit.py

Depends on: lazyown.py

scripts/devtools/core_smoke.py

Depends on: core/hardening.py, core/payload_schema.py, modules/db.py, modules/killchain.py, modules/payload_factory.py

Next: API_p18.md