diff options
Diffstat (limited to 'python-leakcheck.spec')
-rw-r--r-- | python-leakcheck.spec | 438 |
1 files changed, 438 insertions, 0 deletions
diff --git a/python-leakcheck.spec b/python-leakcheck.spec new file mode 100644 index 0000000..be2513f --- /dev/null +++ b/python-leakcheck.spec @@ -0,0 +1,438 @@ +%global _empty_manifest_terminate_build 0 +Name: python-leakcheck +Version: 1.0.2 +Release: 1 +Summary: Python wrapper for LeakCheck API & also a CLI tool +License: MIT License +URL: https://github.com/LeakCheck/leakcheck-api +Source0: https://mirrors.aliyun.com/pypi/web/packages/8c/77/018ebc616d6e4e215cb43e43cfdce4d6492430fd7a862e34302874eb2850/leakcheck-1.0.2.tar.gz +BuildArch: noarch + +Requires: python3-requests +Requires: python3-pysocks +Requires: python3-tabulate + +%description +# LeakCheck API + + +<p align="center"> +<img alt="Discord" src="https://img.shields.io/discord/626798391162175528"> +<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/leakcheck"> +<img alt="PyPI" src="https://img.shields.io/pypi/v/leakcheck"> +<img alt="Uptime Robot ratio (30 days)" src="https://img.shields.io/uptimerobot/ratio/m787582856-3411c8623fccb7e99d3dfc1f"> +<img alt="GitHub" src="https://img.shields.io/github/license/leakcheck/leakcheck-api"> +</p> + +## 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](https://leakcheck.net/api_s) 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. + + +%package -n python3-leakcheck +Summary: Python wrapper for LeakCheck API & also a CLI tool +Provides: python-leakcheck +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-leakcheck +# LeakCheck API + + +<p align="center"> +<img alt="Discord" src="https://img.shields.io/discord/626798391162175528"> +<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/leakcheck"> +<img alt="PyPI" src="https://img.shields.io/pypi/v/leakcheck"> +<img alt="Uptime Robot ratio (30 days)" src="https://img.shields.io/uptimerobot/ratio/m787582856-3411c8623fccb7e99d3dfc1f"> +<img alt="GitHub" src="https://img.shields.io/github/license/leakcheck/leakcheck-api"> +</p> + +## 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](https://leakcheck.net/api_s) 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. + + +%package help +Summary: Development documents and examples for leakcheck +Provides: python3-leakcheck-doc +%description help +# LeakCheck API + + +<p align="center"> +<img alt="Discord" src="https://img.shields.io/discord/626798391162175528"> +<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/leakcheck"> +<img alt="PyPI" src="https://img.shields.io/pypi/v/leakcheck"> +<img alt="Uptime Robot ratio (30 days)" src="https://img.shields.io/uptimerobot/ratio/m787582856-3411c8623fccb7e99d3dfc1f"> +<img alt="GitHub" src="https://img.shields.io/github/license/leakcheck/leakcheck-api"> +</p> + +## 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](https://leakcheck.net/api_s) 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. + + +%prep +%autosetup -n leakcheck-1.0.2 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-leakcheck -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.2-1 +- Package Spec generated |