Skip to main content

Python wrapper for LeakCheck API & also a CLI tool

Project description

LeakCheck API

LeakCheck <3 Python

Discord PyPI - Downloads PyPI Uptime Robot ratio (30 days) GitHub

Dependencies:

  • Python >= 3.5
  • requests
  • tabulate
  • pysocks
  • setuptools
  • wheel

Installation:

pip3 install leakcheck

Or download tarball / git clone and execute

python3 setup.py install

First start:

To start working with this package you need to obtain personal API key from here and link IP address of your server or personal computer. It can be IPv6 as well as IPv4.

Public API can be used without IP linking.

Package automatically creates ".pylcapi" file in the home directory on the first startup. Then, API key and/or proxy settings can be loaded from there.

Using as a CLI:

usage: leakcheck [-h] [--key KEY] [--proxy PROXY] [--type TYPE] [-lo] [-p]
             query

CLI version of LeakCheck API (v1.0.2). Licensed under MIT license

positional arguments:
query          What are we going to search?

optional arguments:
-h, --help     show this help message and exit
--key KEY      Set an API key (taken from config by default)
--proxy PROXY  Set proxy (supported: HTTP/HTTPS/SOCKS4/SOCKS5, default:
                empty)
--type TYPE    Set a type of the query (default: auto)
-lo            Print lines only (default: False
-p             Lookup privately (hashes data with SHA256, then truncates
                hash to 24 characters; works for email, pass_email only,
                default: False)

Using as a library:

from leakcheck import LeakCheckAPI

# Initialising API class
api = LeakCheckAPI()

# API key setting
api.set_key("YOUR_KEY")

# Now we're ready to make our first request
# A lookup type is detected automatically. To explicitly set it, see below
result = api.lookup("example@example.com") # list of dicts

# A request with the lookup type
result = api.lookup("example@example.com", "email") # list of dicts

Using a proxy:

# HTTP/HTTPS/SOCKS4/SOCKS5 supported
# Handled by requests[proxy], requests[socks]
api.set_proxy("socks5://127.0.0.1:8123")

Getting your IP:

from leakcheck import LeakCheckAPI

# Initialising API class
api = LeakCheckAPI()

ip = api.getIP() # string

Getting your limits:

from leakcheck import LeakCheckAPI

# Initialising API class
api = LeakCheckAPI()

# API key setting
api.set_key("YOUR_KEY")

limits = api.getLimits() # dict

Response errors:

Error Description
Missing params (key, check, type) Some params haven't passed in the request
Invalid type Type you provide is invalid
API Key is wrong Key you provide is invalid
API Key is blocked Your key is blocked due to some reasons, contact support
No license on this key Key you provide does not have a license
Your query contains invalid characters There are some forbidden characters in your query
Enter at least 3 characters to search Query passed without minimal number of characters
Invalid email E-mail type is specified, but your query is not a mail
IP linking is required IPs are not linked or invalid
Not found There are no results
Too many entries, try to concretize your query You made a search that contains too many entries, try to search "alex@" instead of "alex"

Server Errors:

Error Description Resolution
429 Too Many Requests Your server is sending too many automated requests. API is limited by 3 requests/second per one IP. Try to reduce amount of sendings.

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

leakcheck-1.0.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

leakcheck-1.0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file leakcheck-1.0.2.tar.gz.

File metadata

  • Download URL: leakcheck-1.0.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for leakcheck-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a3781c3fa59a2f23212f3d3004180604cf2e3fef247199e23c159d398176aad1
MD5 dfd4752abb697126e638c1c56c98fff3
BLAKE2b-256 8c77018ebc616d6e4e215cb43e43cfdce4d6492430fd7a862e34302874eb2850

See more details on using hashes here.

File details

Details for the file leakcheck-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: leakcheck-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for leakcheck-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a81f23e36b5c9f94b88b6bd762c74377ebea079ae110468a40fa3afd89c09c0
MD5 ed88fc731664b047aa1cb4326c16d510
BLAKE2b-256 67d56be3815c342da327df928700640f5f8f9ba5b5a16b36f2cea5318d405bc4

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