Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

v2.0.4

Choose a tag to compare

@github-actions github-actions released this 13 Nov 19:34
· 33 commits to main since this release
f9394f4

[2.0.4] - 2025-11-13

Added

  • Complete CLI Refactoring: Major overhaul of the command-line interface with git-like subcommand structure
    • New Command Structure: All commands now follow hierarchical subcommand pattern (leakpy <command> <subcommand> [options])
    • search Command: Search LeakIX for leaks or services
      • Supports query strings, field extraction, bulk mode, and file output
    • lookup Command with Subcommands: Lookup information about specific IPs, domains, or subdomains
      • leakpy lookup host <IP> - Get detailed information about a specific IP address
      • leakpy lookup domain <domain> - Get detailed information about a domain and its subdomains
      • leakpy lookup subdomains <domain> - Get list of subdomains for a specific domain
    • list Command with Subcommands: List available plugins or fields
      • leakpy list plugins - List all available LeakIX plugins
      • leakpy list fields - List all available fields from sample queries
    • config Command with Subcommands: Manage API key configuration
      • leakpy config set [API_KEY] - Set or update API key (interactive or direct)
      • leakpy config reset - Delete stored API key
    • cache Command with Subcommands: Manage API response cache
      • leakpy cache clear - Clear all cached API responses
      • leakpy cache set-ttl <MINUTES> - Set cache TTL in minutes
      • leakpy cache show-ttl - Display current cache TTL setting
    • stats Command with Subcommands: Display statistics and metrics with visualizations
      • leakpy stats cache - Display cache statistics with visualizations
      • leakpy stats overview - Display overview of all statistics
      • leakpy stats query - Analyze and display statistics from search queries (by country, protocol, port, etc.)
    • Enhanced Help Display: ASCII banner now automatically displays when showing help messages (--help or -h)
      • Banner appears in README.md and documentation homepage for better brand recognition
      • Banner is automatically suppressed in --silent mode for scripting compatibility
    • Batch Processing Support: All lookup commands now support batch processing via -i/--input option
      • Process multiple IPs or domains from a file (one per line)
      • Progress bars and summary statistics for batch operations
      • JSON output format for batch results
    • Improved Display Options: New options for controlling output display
      • --limit option to control number of services/leaks displayed (default: 50)
      • --all option to display all results without limit
      • Better formatted tables with consistent styling across all lookup types
  • New Library Methods: Expanded Python library API with new functionality
    • get_host(ip, fields="full", output=None): Get detailed information about a specific IP address
      • Returns dictionary with 'Services' and 'Leaks' keys containing l9event objects
      • Supports field extraction and file output
    • get_domain(domain, fields="full", output=None): Get detailed information about a domain
      • Returns dictionary with 'Services' and 'Leaks' keys containing l9event objects
      • Includes subdomain information and associated services
    • get_subdomains(domain, output=None): Get list of subdomains for a specific domain
      • Returns list of dictionaries with subdomain, distinct_ips, and last_seen information
      • Supports file output for easy integration
    • get_plugins(): Get list of available LeakIX plugins
      • Returns list of plugin names
    • get_all_fields(data, current_path=None): Extract all available fields from a data object
      • Returns set of all field paths (e.g., "protocol", "geoip.country_name", "service.software.name")
      • Supports nested field discovery
    • get_cache_stats(): Get comprehensive cache statistics
      • Returns dictionary with total_entries, active_entries, expired_entries, TTL information, and cache file details
    • get_cache_ttl(): Get current cache TTL in minutes
    • set_cache_ttl(minutes): Configure cache TTL programmatically
    • clear_cache(): Clear all cached API responses programmatically
    • delete_api_key(): Delete stored API key from secure storage
    • analyze_query_stats(results, fields=None, top=10, all_fields=False): Analyze query results and extract statistics
      • Returns QueryStats object with dot notation access (e.g., stats.total, stats.fields.protocol.http)
      • Supports object-oriented field extraction with callables
      • Flexible field specification (string, list, dict, or callable)
      • Can analyze from live queries or JSON files

Fixed

  • CI Workflow: Fixed import test to use correct module names (leakpy.leakix.LeakIX instead of deprecated leakpy.scraper.LeakIXScraper)
  • Test Suite: Fixed test_api_key_manager_read_nonexistent to properly mock keyring and prevent reading from system keychain