Skip to main content

LeakIX API Client

Project description

🚀 LeakPy

LeakPy is a third-party client designed to seamlessly interact with the leakix.net API using Python.

Note: This is not the official LeakIX client. Always refer to the Official LeakIX Python Client for the official client.

📥 Installation

To install LeakPy via PyPi:

pip install leakpy

🖥️ CLI Usage

To see all available commands and options:

$ leakpy -h

Options:

usage: leakpy [-h] [-s {service,leak}] [-p PAGES] [-q QUERY] [-P PLUGINS] [-o OUTPUT]
              [-f FIELDS] [-i] [-r] [-lp] [-lf]

options:
  -h, --help            show this help message and exit
  -s {service,leak}, --scope {service,leak}
                        Type Of Informations
  -p PAGES, --pages PAGES
                        Number Of Pages
  -q QUERY, --query QUERY
                        Specify The Query
  -P PLUGINS, --plugins PLUGINS
                        Specify The Plugin(s)
  -o OUTPUT, --output OUTPUT
                        Output File
  -f FIELDS, --fields FIELDS
                        Fields to extract from the JSON, comma-separated. For example:
                        'protocol,ip,port'
  -i, --interactive     Activate interactive mode.
  -r, --reset-api       Reset the saved API key
  -lp, --list-plugins   List Available Plugins
  -lf, --list-fields    List all possible fields from a sample JSON.

Interactive Mode:

When using the -i or --interactive option, LeakPy enters an interactive mode, allowing users to input commands directly:

$ leakpy -i

Once inside the interactive mode, users are greeted with:

Welcome to LeakPy interactive mode!
Type 'help' for available commands.

The available commands include:

Available Commands:
exit           : Exit the interactive mode.
help           : Display this help menu.
set            : Set a particular setting. Usage: set <setting_name> <value>
run            : Run the scraper with the current settings.
list-fields    : List all possible fields from a sample JSON.
list-plugins   : List available plugins.
show           : Display current settings.

📘 Library Documentation

LeakixScraper

The LeakixScraper class offers a direct and user-friendly interface to the leakix.net API.

Initialization:

from leakpy.scraper import LeakixScraper

scraper = LeakixScraper(api_key="Your_API_Key")

Methods:

  • execute(scope, query, pages, plugin, fields)

    Conduct a search on leakix.net.

    Arguments:

    • scope (str): Type of information to search for (e.g., "service" or "leak").
    • query (str): The specific search query.
    • pages (int): The number of pages to fetch.
    • plugin (str): Specify the plugins to use (e.g., "PulseConnectPlugin, SharePointPlugin").
    • fields (str): Specify the fields to extract from the JSON data, separated by commas (e.g., "event_source, host, ip, port").

    Example:

    results = scraper.execute(scope="leak", query='+country:"France"', pages=5, plugin="PulseConnectPlugin", fields="event_source, host, ip, port")
    for result in results:
        print("Event Source:", result.get("event_source"))
        print("Host:", result.get("host"))
        print("IP:", result.get("ip"))
        print("Port:", result.get("port"))
        print("-" * 20)
    

🚫 Disclaimer

LeakPy is an independent tool and has no affiliation with leakix.net. The creators of LeakPy cannot be held responsible for any misuse or potential damage resulting from using this tool. Please use responsibly, and ensure you have the necessary permissions when accessing any data.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leakpy-1.6.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leakpy-1.6.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file leakpy-1.6.2.tar.gz.

File metadata

  • Download URL: leakpy-1.6.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for leakpy-1.6.2.tar.gz
Algorithm Hash digest
SHA256 d196806496e791d2cdc7b12471c7554da4fd2276eec671dc3a7f87b00441a243
MD5 3d475c69b019bcb1c70ed6dbe2b4faf0
BLAKE2b-256 f8111d39a4286b55f41312137e6cc3b619f5e8899a1cad6c8ae5cfedd93c54ba

See more details on using hashes here.

File details

Details for the file leakpy-1.6.2-py3-none-any.whl.

File metadata

  • Download URL: leakpy-1.6.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for leakpy-1.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b946effb964ee28417b2e449f5e04e8359582f981bf19911873564284f32d0f
MD5 3e1c1918235e1cc022442eb54b9cd491
BLAKE2b-256 264682d92c5ade2af29e68a6624ddb9b931cce2016906e71a219c6429196ea1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page