Skip to content

Agent API_p25

grisun0 edited this page Oct 29, 2026 · 2 revisions

API (page 25 of 25)

Previous: API_p24.md

static/js/vis-network.min.js

Depends on: cli/show.py, core/process.py, lazyown-docker/init.sh

static/js/xterm-addon-web-links-0.5.0.js

static/js/xterm.js

Depends on: lazyown-docker/init.sh, modules/colors.py, skills/claude_md_orchestrator/parser.py

telegram_c2.py

Depends on: core/parsers.py, lazyown.py, modules/llm_adapter.py

telegram_hermes.py

Depends on: core/parsers.py

tests/run_mutation_api_authz.py

tests/run_mutation_c2_route_auth.py

tests/run_mutation_outcome_bus.py

tests/run_mutation_trigger_policy.py

Depends on: tests/mutation_common.py

tools/contract_check.py

tools/extract_cluster.py

  • fragment_name (function) tools/extract_cluster.py:29 def fragment_name(fragment) -- Return the function name defined by an extracted source fragment.
  • collect_methods (function) tools/extract_cluster.py:41 def collect_methods(source_text, wanted) -- Collect verbatim source of wanted methods in class-definition order.
  • build_module (function) tools/extract_cluster.py:66 def build_module(target_class, phase, category, title, methods, extra_imports) -- Render the new pending CommandSet module source.
  • main (function) tools/extract_cluster.py:141 def main() -- Extract the requested cluster and write the target module.

tools/gen_demo_gifs.py

Imported by: tools/gen_demo_gifs_extra.py

tools/gen_demo_gifs_extra.py

Depends on: tools/gen_demo_gifs.py

tools/generate_metasploitable_gym.py

tools/set_lazyaddon_updates.py

utils.py

Depends on: cli/banner_config.py, core/config.py, core/console.py, core/crypto.py, core/dependencies.py, core/logging.py, core/parsers.py, core/process.py, core/safe_subprocess.py, core/validators.py, modules/backdoor/server.c, modules/lazyencoder_decoder.py, skills/claude_md_orchestrator/parser.py Imported by: banner.py, cli/commands/_base.py, cli/commands/ai.py, cli/commands/anti_forensics.py, cli/commands/applocker_bypass.py, cli/commands/bitm.py, cli/commands/bof_registry.py, cli/commands/c2_profile.py, cli/commands/c2_session.py, cli/commands/caldera.py, cli/commands/campaign.py, cli/commands/catalog.py, cli/commands/cicd.py, cli/commands/cli_auth.py, cli/commands/cloud.py, cli/commands/collaboration.py, cli/commands/command_and_control.py, cli/commands/command_and_control_migrated.py, cli/commands/containers.py, cli/commands/cred.py, cli/commands/cred_migrated.py, cli/commands/crystal_ball.py, cli/commands/daemon_ctl.py, cli/commands/database.py, cli/commands/defaults.py, cli/commands/demo.py, cli/commands/dns_exfil.py, cli/commands/dpapi.py, cli/commands/edr_detect.py, cli/commands/encoding.py, cli/commands/enum.py, cli/commands/estorides.py, cli/commands/evasive_payload.py, cli/commands/exfiltration.py, cli/commands/exploit.py, cli/commands/exploit_migrated.py, cli/commands/exploitgym.py, cli/commands/golden_paths.py, cli/commands/gym_matrix.py, cli/commands/help_ui.py, cli/commands/infra.py, cli/commands/lab.py, cli/commands/lateral.py, cli/commands/lateral_migrated.py, cli/commands/lazy_creds.py, cli/commands/lazy_dorks.py, cli/commands/lazy_oob.py, cli/commands/lazy_passgen.py, cli/commands/lazyloop.py, cli/commands/lazyops.py, cli/commands/marketplace.py, cli/commands/mcp_bridge.py, cli/commands/misc_migrated.py, cli/commands/mobile_macos.py, cli/commands/module_manager.py, cli/commands/nethelpers.py, cli/commands/params_ops.py, cli/commands/payload_generation.py, cli/commands/persist.py, cli/commands/persist_migrated.py, cli/commands/phishing_wizard.py, cli/commands/pivoting.py, cli/commands/postexp.py, cli/commands/postexp_migrated.py, cli/commands/privilege_escalation.py, cli/commands/pwn.py, cli/commands/recon.py, cli/commands/recon_migrated.py, cli/commands/redteam_gym.py, cli/commands/resource_scripting.py, cli/commands/retry_ops.py, cli/commands/scan.py, cli/commands/scan_migrated.py, cli/commands/session_ops.py, cli/commands/shellsys.py, cli/commands/sleep_obfuscation.py, cli/commands/socks_proxy.py, cli/commands/supply_chain.py, cli/commands/surface.py, cli/commands/ux.py, cli/commands/verb_admin.py, cli/commands/winbox_gym.py, cli/retry_support.py, contrib/legacy/lazysmbrelay.py, lazyc2.py, lazyc2/blueprints/phishing.py, lazyown.py, modules/atomic_cli.py, modules/c2_builder.py, modules/lazy_intel.py, modules/lazy_loop.py, modules/lazy_runner.py, modules/listener_manager.py, modules/winbox_gym.py, slack_c2_bot.py, tests/test_api_key_resolution.py, tests/test_audit_remediation.py, tests/test_boyscout_contracts.py, tests/test_fuzzy_picker.py, tests/test_lazy_worker_safety.py, tests/test_php2shell_addon.py, tests/test_retry_session.py, tests/test_scope_guard.py, tests/test_security_hardening_v5.py, tests/test_single_implementation.py

  • lazyown_set_config (function) utils.py:324 def lazyown_set_config(key, value, config_obj) -- Persist a key to [payload.json](https://github.com/grisuno/LazyOwn/blob/27adabfcf3a409d438f902c6bf85643758299844/payload.json) and refresh any live config object.
  • needs_sudo (function) utils.py:358 def needs_sudo(command) -- Return True when any shell segment of the command runs sudo/doas.
  • sudo_available (function) utils.py:382 def sudo_available() -- Return whether sudo can run unattended right now.
  • redact_secrets (function) utils.py:434 def redact_secrets(text) -- Mask API keys and credentials embedded in a command line.
  • parse_ip_mac (function) utils.py:454 def parse_ip_mac(input_string) -- Extracts IP and MAC addresses from a formatted input string using a regular expression.
  • create_arp_packet (function) utils.py:476 def create_arp_packet(src_mac, src_ip, dst_ip, dst_mac) -- Constructs an ARP packet with the given source and destination IP and MAC addresses.
  • send_packet (function) utils.py:511 def send_packet(packet, iface) -- Sends a raw ARP packet over the specified network interface.
  • load_version (function) utils.py:529 def load_version() -- Load the version number from the 'version.json' file.
  • parse_bool (function) utils.py:555 def parse_bool(value) -- Interpret a configuration value as a boolean.
  • signal_handler (function) utils.py:573 def signal_handler(sig, frame) -- Handles signals such as Control + C and shows a message on how to exit.
  • activate_virtualenv (function) utils.py:598 def activate_virtualenv(venv_path) -- Activates a virtual environment and starts an interactive shell.
  • parse_proc_net_file (function) utils.py:623 def parse_proc_net_file(file_path) -- Internal function to parse a /proc/net file and extract network ports.
  • get_open_ports (function) utils.py:667 def get_open_ports() -- Internal function to get open TCP and UDP ports on the operating system.
  • rotate_char (function) utils.py:686 def rotate_char(c, shift) -- Internal function to rotate characters for ROT cipher.
  • get_network_info (function) utils.py:708 def get_network_info() -- Retrieves network interface information with their associated IP addresses.
  • get_git_info (function) utils.py:743 def get_git_info()
  • get_venv_info (function) utils.py:762 def get_venv_info()
  • getprompt (function) utils.py:783 def getprompt() -- Render the configurable Neon Box prompt for the cmd2 shell.
  • copy2clip (function) utils.py:801 def copy2clip(text) -- Copia el texto proporcionado al portapapeles usando xclip.
  • clean_output (function) utils.py:821 def clean_output(output) -- Removes color escape sequences and other non-printable characters.
  • teclado_usuario (function) utils.py:834 def teclado_usuario(filename) -- Processes a file to extract and display characters from specific write sequences.
  • salida_strace (function) utils.py:870 def salida_strace(filename) -- Lee un archivo, extrae texto desde secuencias de escritura y muestra el contenido reconstruido.
  • exploitalert (function) utils.py:906 def exploitalert(content) -- Process and display results from ExploitAlert.
  • packetstormsecurity (function) utils.py:945 def packetstormsecurity(content) -- Process and display results from PacketStorm Security.
  • nvddb (function) utils.py:983 def nvddb(content) -- Process and display results from the National Vulnerability Database.
  • find_ss (function) utils.py:1029 def find_ss(keyword) -- Find CVEs in the National Vulnerability Database based on a keyword.
  • find_ea (function) utils.py:1091 def find_ea(keyword) -- Find exploits in ExploitAlert based on a keyword.
  • find_ps (function) utils.py:1141 def find_ps(keyword) -- Find exploits in PacketStorm Security based on a keyword.
  • run (function) utils.py:1173 def run(command) -- Executes a shell command using the subprocess module, capturing its output.
  • is_exist (function) utils.py:1232 def is_exist(file) -- Check if a file exists.
  • get_domain (function) utils.py:1261 def get_domain(url) -- Extracts the domain from a given URL.
  • generate_random_cve_id (function) utils.py:1278 def generate_random_cve_id() -- Generate a random CVE identifier in the form CVE-{year}-{code}.
  • generate_certificates (function) utils.py:1290 def generate_certificates() -- Generates a certificate authority (CA), client certificate, and client key.
  • generate_emails (function) utils.py:1373 def generate_emails(full_name, domain) -- Generate email permutations based on the provided full name and domain.
  • clean_url (function) utils.py:1433 def clean_url(host) -- Checks if the last character is a slash and removes it if so.
  • random_string (function) utils.py:1440 def random_string(length) -- Generates a random alphanumeric string.
  • generate_http_req (function) utils.py:1446 def generate_http_req(host, port, uri, custom_header, cmd) -- Generates an HTTP request with the Shellshock payload.
  • format_openssh_key (function) utils.py:1470 def format_openssh_key(raw_key) -- Formats a raw OpenSSH private key string to the correct OpenSSH format.
  • format_rsa_key (function) utils.py:1502 def format_rsa_key(raw_key) -- Formats a raw RSA private key string to the correct PEM format.
  • is_package_installed (function) utils.py:1533 def is_package_installed(package_name) -- Check if a Python package is installed.
  • extract (function) utils.py:1544 def extract(string, extract_flag) -- Extracts and processes specific hexadecimal sequences from a string based on a flag.
  • clean_html (function) utils.py:1568 def clean_html(html_string) -- Remove HTML tags from a string.
  • get_credentials (function) utils.py:1595 def get_credentials(file, ncred) -- Searches for credential files with the pattern 'credentials*.txt' and allows the user to select one.
  • obfuscate_payload (function) utils.py:1651 def obfuscate_payload(payload) -- Obfuscates a payload string by converting its characters into hexadecimal format, with additional comments for every...
  • read_payloads (function) utils.py:1676 def read_payloads(file_path) -- Reads a file containing payloads and returns a list of properly formatted strings.
  • inject_payloads (function) utils.py:1698 def inject_payloads(urls, payload_url, request_timeout) -- Sends HTTP requests to a list of URLs with injected payloads for testing XSS vulnerabilities.
  • send_request (function) utils.py:1723 def send_request(raw_url)
  • handle_forms (function) utils.py:1760 def handle_forms(content, url)
  • prompt (function) utils.py:1798 def prompt(label, default) -- Return the prompt in the function do_xss
  • add (function) utils.py:1806 def add(str_part, delimiter, i) -- Adds a delimiter between string parts if it's not the first part.
  • detect_delimiter (function) utils.py:1823 def detect_delimiter(foo_bar) -- Detects the delimiter used in the input string (e.g., "-", "_", ".").
  • transform (function) utils.py:1842 def transform(parts, delimiter, casing) -- Transforms a list of string parts based on the chosen casing style.
  • handle (function) utils.py:1872 def handle(input_str) -- Splits the input string into parts based on delimiters or mixed casing.
  • get_users_dic (function) utils.py:1902 def get_users_dic(txt) -- List all .txt files in the 'sessions/' directory and prompt the user to select one by number.
  • get_hash (function) utils.py:1937 def get_hash(dir) -- Searches for hash files with the pattern 'hash*.txt' and allows the user to select one.
  • is_digit (function) utils.py:1978 def is_digit(the_digit) -- Check if the given character is a digit.
  • crack_password (function) utils.py:1990 def crack_password(crypttext) -- Crack a Cisco Type 7 password.
  • get_terminal_size (function) utils.py:2030 def get_terminal_size()
  • halp (function) utils.py:2039 def halp() -- Display the help panel for the LazyOwn RedTeam Framework.
  • ensure_tmux_session (function) utils.py:2094 def ensure_tmux_session(session_name) -- Ensure that a tmux session is active.
  • get_xml (function) utils.py:2130 def get_xml(directory) -- Retrieves a list of XML files from the specified directory.
  • get_domain_from_xml (function) utils.py:2143 def get_domain_from_xml(xml_file) -- Extracts the first domain or IP address from an Nmap scan XML file.
  • shellcode_to_sylk (function) utils.py:2173 def shellcode_to_sylk(shellcode_path)
  • get_banner (function) utils.py:2198 def get_banner(ip, port)
  • list_binaries (function) utils.py:2215 def list_binaries(directory) -- List all executable binaries in the specified directory.
  • select_binary (function) utils.py:2235 def select_binary(binaries) -- Prompt the user to select a binary from a list.
  • decode (function) utils.py:2260 def decode(data) -- Decodes base64 data received from the server output.
  • get_command (function) utils.py:2278 def get_command(url, lhost) -- Reads a command from standard input and initiates a thread to send the command to the target server.
  • send_command (function) utils.py:2289 def send_command(cmd, url, lhost) -- Constructs and sends an SQL payload with xp_cmdshell and certutil for command execution and exfiltration.
  • activate_server (function) utils.py:2317 def activate_server(httpd, url, lhost) -- Activates the HTTP server and fetches the first command from the user.
  • Spray (function) utils.py:2328 def Spray(domain, users, password, target_url, wait, verbose, more_verbose)
  • ProcessResults (function) utils.py:2375 def ProcessResults(results, outfile)
  • generate_index (function) utils.py:2390 def generate_index(repo_dir) -- Generates an APT repository structure and index files for proper compatibility.
  • replace_variables (function) utils.py:2440 def replace_variables(command, variables) -- Replace variables in a command string with their corresponding values.
  • create_caldera_config (function) utils.py:2461 def create_caldera_config(file_path) -- Creates a Caldera configuration file with the specified content at the given file path.
  • extract_banners (function) utils.py:2557 def extract_banners(xml_file) -- Extract banner information from an XML file.
  • scrape_news (function) utils.py:2606 def scrape_news() -- Makes a request to the Hacker News page and extracts titles, links, and scores.
  • display_news (function) utils.py:2641 def display_news(titles, links, scores) -- Creates a pandas DataFrame and prints it, showing titles, links, and scores.
  • htmlify (function) utils.py:2655 def htmlify(data) -- Wrap C2 comms in html and html2 code to make requests look more legitimate
  • de_htmlify (function) utils.py:2666 def de_htmlify(data) -- Cleant wrap C2 comms of html and html2 code to get the command from request
  • is_port_in_use (function) utils.py:2678 def is_port_in_use(port, host)
  • return_creds (function) utils.py:2687 def return_creds()
  • query_arin_ip (function) utils.py:2701 def query_arin_ip(ip) -- Queries ARIN whois API for organization information of an IP address.
  • get_org (function) utils.py:2720 def get_org(data) -- Extracts organization name from ARIN whois response data.
  • load_adversary (function) utils.py:2737 def load_adversary()
  • replace_placeholders (function) utils.py:2743 def replace_placeholders(template, replacements) -- Replace placeholders in a template string with values from a dictionary.
  • replace_command_placeholders (function) utils.py:2761 def replace_command_placeholders(command, params) -- Replace placeholders in a command string with values from a params dictionary.
  • replace_match (function) utils.py:2779 def replace_match(match)
  • parse_nmap_csv (function) utils.py:2787 def parse_nmap_csv(csv_path)
  • query_ollama (function) utils.py:2801 def query_ollama(prompt, model) -- Sends query to Ollama and returns model response.
  • preprocess_llm_response (function) utils.py:2816 def preprocess_llm_response(response) -- Pre-process LLM response to handle common issues before YAML parsing
  • manual_yaml_extraction (function) utils.py:2851 def manual_yaml_extraction(content) -- Fallback method to manually extract YAML data from malformed content
  • create_synthetic_yaml (function) utils.py:2917 def create_synthetic_yaml(nmap_services) -- Create a basic synthetic YAML playbook when all else fails
  • parse_yaml_response (function) utils.py:2990 def parse_yaml_response(content) -- Improved function to extract and parse YAML content from LLM response with better error handling and recovery attempts
  • fix_common_yaml_issues (function) utils.py:3025 def fix_common_yaml_issues(yaml_content) -- Fixes common YAML formatting issues
  • aggressive_yaml_fix (function) utils.py:3065 def aggressive_yaml_fix(yaml_content) -- More aggressive YAML fixing for recovery attempts
  • save_playbook (function) utils.py:3096 def save_playbook(playbook_data, playbook_name) -- Guarda el playbook generado en disco
  • load_knowledge_base (function) utils.py:3108 def load_knowledge_base(knowledge_file) -- Carga la base de conocimientos personalizada.
  • anti_debug (function) utils.py:3116 def anti_debug()
  • create_msfshellcoder_parser (function) utils.py:3125 def create_msfshellcoder_parser()
  • load_user_aliases (function) utils.py:3145 def load_user_aliases() -- Carga los aliases del archivo JSON si existe.
  • SimpleHTTPRequestHandler.log_request (method) utils.py:3170 def log_request(self)
  • SimpleHTTPRequestHandler.log_message (method) utils.py:3173 def log_message(self)
  • SimpleHTTPRequestHandler.do_GET (method) utils.py:3176 def do_GET(self) -- Serve certutil callback using centralized payload config.
  • IP2ASN.__init__ (method) utils.py:3196 def __init__(self)
  • IP2ASN.open_file (method) utils.py:3201 def open_file(self, filename) -- Open and parse the IP-to-ASN file.
  • IP2ASN.open_reader (method) utils.py:3206 def open_reader(self, reader) -- Parse the reader stream, handling both regular and gzipped files.
  • IP2ASN.as_of_ip (method) utils.py:3246 def as_of_ip(self, ip) -- Return the ASN associated with the given IP address.
  • IP2ASN.as_name (method) utils.py:3261 def as_name(self, asn) -- Get the AS name by ASN.
  • IP2ASN.as_country (method) utils.py:3265 def as_country(self, asn) -- Get the country by ASN.
  • VulnerabilityScanner.__init__ (method) utils.py:3302 def __init__(self, user_agent, max_workers, sessions_dir, description_language) -- Initialize the scanner with configurable network and storage knobs.
  • VulnerabilityScanner.search_cves (method) utils.py:3328 def search_cves(self, service) -- Return CVE records matching the supplied service banner.
  • VulnerabilityScanner.persist (method) utils.py:3398 def persist(self, service, target, cves) -- Persist cves to sessions/vulns_<target>.json.
  • VulnerabilityScanner.pretty_print (method) utils.py:3435 def pretty_print(self, cves_details) -- Render cves_details as semicolon-separated rows in the shell.

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally