LeakIX API Client
Project description
🚀 LeakPy
LeakPy is a third-party client designed to seamlessly interact with the LeakIX 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
🔑 API Key
Get your API key from LeakIX (48 characters). On first use, you'll be prompted to enter it. Reset: leakpy -r
Secure Storage: The API key is stored securely using your system's keychain (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux). If keyring is not available, it falls back to file storage with restrictive permissions (600).
API Response Caching: LeakPy automatically caches API responses to reduce unnecessary API calls. The cache uses a default TTL of 5 minutes. Clear the cache with leakpy --clear-cache.
🖥️ CLI Usage
To see all available commands and options:
$ leakpy -h
Options:
[~] LeakPy 2.0.0
usage: leakpy [-h] [-s {service,leak}] [-p PAGES] [-q QUERY] [-P PLUGINS] [-o OUTPUT] [-f FIELDS] [-b]
[-r] [--clear-cache] [-lp] [-lf] [-v] [--silent]
options:
-h, --help show this help message and exit
-s {service,leak}, --scope {service,leak}
Search scope: 'leak' or 'service' (default: leak)
-p PAGES, --pages PAGES
Number of pages to fetch (default: 2)
-q QUERY, --query QUERY
Search query string
-P PLUGINS, --plugins PLUGINS
Plugin(s) to use (comma-separated)
-o OUTPUT, --output OUTPUT
Output file path
-f FIELDS, --fields FIELDS
Fields to extract (comma-separated, e.g. 'protocol,ip,port' or 'full')
-b, --bulk Use bulk mode (requires Pro API)
-r, --reset-api Reset saved API key
--clear-cache Clear the API response cache
-lp, --list-plugins List available plugins
-lf, --list-fields List all possible fields from sample data
-v, --version show program's version number and exit
--silent Suppress all output (useful for scripting)
📘 Library Documentation
LeakIXScraper
The LeakIXScraper class offers a direct and user-friendly interface to the LeakIX API.
Usage:
from leakpy import LeakIXScraper
scraper = LeakIXScraper(api_key="Your_API_Key", verbose=False)
# Search
results = scraper.run(
scope="leak",
pages=5,
query='+country:"France"',
fields="protocol,ip,port",
output="results.txt"
)
📚 Documentation
Full documentation: https://leakpy.readthedocs.io/
See EXAMPLES.md for more examples.
🚫 Disclaimer
LeakPy is an independent tool and has no affiliation with LeakIX. 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file leakpy-2.0.1.tar.gz.
File metadata
- Download URL: leakpy-2.0.1.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1959bbbaf29c538a0c6224fc8768baabc95bcf08e09f85c5bc84ade1514a0829
|
|
| MD5 |
7fc730a82e6615e28fc39611b83608f9
|
|
| BLAKE2b-256 |
036f20bb8d02743cf1612b86f3f61160b8d804ec0217877bc85e86159f2afabb
|
File details
Details for the file leakpy-2.0.1-py3-none-any.whl.
File metadata
- Download URL: leakpy-2.0.1-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c21859c98520d1b3fc34a64150412ac6e8d31485ca8e0351e91f955d95b691a6
|
|
| MD5 |
f2d1a8f792dcf42c85b5ee88519f8952
|
|
| BLAKE2b-256 |
1577de9f5ab67131e10c173881abfd18cf94ecd7d0b67962742908ebab292e5e
|