Quick Start
Installation
pip install leakpy
API Key Setup
Get your API key from LeakIX (48 characters).
$ leakpy config set
Basic Usage
CLI:
$ leakpy search -q '+country:"France"' -p 5
$ leakpy lookup host 157.90.211.37
# Raw JSON output (for scripting/piping)
$ leakpy --raw search -q '+country:"France"' -p 5
# Example output (for search):
# http://192.168.1.1:80
# https://10.0.0.1:443
# ssh://172.16.0.1:22
Python:
from leakpy import LeakIX
client = LeakIX()
if not client.has_api_key():
client.save_api_key("your_48_character_api_key_here")
# Events are streamed page by page in real-time
events = client.search(scope="leak", query='+country:"France"', pages=5)
for event in events:
# Events are processed as they arrive, no waiting for all pages
if event.ip and event.port:
print(f"{event.protocol}://{event.ip}:{event.port}")
# Example output:
# http://192.168.1.1:80
# https://10.0.0.1:443
# ssh://172.16.0.1:22
See API Reference for all available methods.