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] [-r] [-lp] [-lf]

options:
  -h, --help            show this help message and exit
  -s {service,leak}, --scope {service,leak}
                        Specify the type of information you're looking for.
  -p PAGES, --pages PAGES
                        Specify the number of pages to retrieve.
  -q QUERY, --query QUERY
                        Specify your search query.
  -P PLUGINS, --plugins PLUGINS
                        Specify the plugin(s) to use.
  -o OUTPUT, --output OUTPUT
                        Specify the output file path.
  -f FIELDS, --fields FIELDS
                        Fields to extract from the JSON data, comma-separated (e.g., 'protocol,ip,port').
  -r, --reset-api       Reset the saved API key.
  -lp, --list-plugins   List all available plugins.
  -lf, --list-fields    List all possible fields from a sample JSON.

📘 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.5.7.tar.gz (6.5 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.5.7-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for leakpy-1.5.7.tar.gz
Algorithm Hash digest
SHA256 f2486368b641bf0eca47a8bcf0f9b3abfc7d301f37f820a4df8cca956d1b1927
MD5 b0c4ef722c3cfa2f856d3f0fdea9e8aa
BLAKE2b-256 e5fa61a2c29de5590173afe6d3fb5c599fb0819bc3fad9d147666beb09c6fab6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: leakpy-1.5.7-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0be614426f577a76dafaef81e83864f093dae2828e72ec143889ddfa7160d01c
MD5 4020d73d180869601962af886bb96acf
BLAKE2b-256 30a879362166f868b1fcfcba6fb741608af2c783b9b21a533f8131a01c67b45b

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