Installation • Usage • Acknowledgements
iprecon is a small CLI tool you can use to get WHOIS data for IP addresses which a focus on determining IP ownership.
Accepts lists of IPs from files or piped via stdin and outputs in different formats (textual table, CSV or JSON).
Output per IP is concise and kept to a single line for easy grepping and quick visual inspection.
Installation
Run pip install iprecon to get it from PyPI.
Then run iprecon --help to see if it worked.
Alternatively, clone and install requirements from requirements.txt (virtual environment highly recommended).
Usage
To run iprecon you have to give it a list of IP addresses to check.
It expects simple lists with one IP per file.
Do it in two ways:
- from file:
iprecon --from-file /path/to/ips.txt - piped from stdin:
cat /path/to/ips.txt | iprecon
You can output to different formats:
iprecon -o text: outputs an ASCII table (terminal)iprecon -o csv: outputs a CSV fileiprecon -o json: outputs a JSON file
Output is always printed to stdout.
Redirect to a file if required (e.g., iprecon -o json > out.json to store a JSON file).
Errors are ignored silently, e.g., if IPs have invalid formats or are private.
To see errors on stderr, request verbose output with iprecon -v.
WHOIS data can be requested in different ways.
Generally speaking, there is the legacy WHOIS protocol which is text-based and difficult to parse.
There is also RDAP, which is an HTTP-based protocol returning structured data.
See here for more information.
By default, iprecon uses RDAP but if for any reason you get nonsense try if iprecon --request-method whois works better.
The tool is not fast and you may have to wait long when IP lists are large.
Try iprecon --request-method rdap-bulk in those cases, which tries to speed up but as much as possible but you may get banned.
There is also a delay because of setup so it will actually be slower on small lists.
You will also not get any intermediate output.
All results are shown at the end.
Acknowledgements
iprecon is nothing more than a tiny wrapper around github.com/secynic/ipwhois,
which is the library actually doing all the work.
Think of it as a command line interface to the library.
It has nice documentation you should read if you want to
know what is actually going on.
Metadata
Release files for iprecon 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iprecon-1.0.0.tar.gz | 11.0 kB | Without provenance | Details for iprecon-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iprecon-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for iprecon-1.0.0-py3-none-any.whl |
Total release size: 19.6 kB
Release files / iprecon-1.0.0.tar.gz
| Download URL | iprecon-1.0.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2c686149f88345c6d58aaa16746b1d56bff28c2a2be950a49f12b2b2e17443e
|
|
BLAKE2b-256 checksum How to use checksums |
9cd2a449accd3f533a1c439bd92ca82d23377b71d7453caf87d80e317d018f9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / iprecon-1.0.0-py3-none-any.whl
| Download URL | iprecon-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51ba68db97f00ab998fa7b4ba136eab18ac9105df832634f75599a7df6c73510
|
|
BLAKE2b-256 checksum How to use checksums |
beb24a76ed0daef8e8ae8278672cbe7ce7a06fbbbab06d108099215851d50073
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for iprecon 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.