Bulk WhoIs Search
Project description
Installation
Depending on if you want only this tool, the full set of PNU tools, or PNU plus a selection of additional third-parties tools, use one of these commands:
pip install pnu-wis
pip install PNU
pip install pytnix
:warning: This tool is not yet included in the PNU and pytnix distributions
WIS(1)
NAME
WIS - Bulk WhoIs Search
SYNOPSIS
wis
[-1|--first]
[-c|--case]
[-d|--dirname DIR]
[-e|--exclude FILE]
[-f|--filename FILE]
[-i|--inet4]
[-I|--inet6]
[-r|--range]
[--debug]
[--help|-?]
[--version]
[--]
KEYWORD
[...]
DESCRIPTION
The wis utility searches for keyword(s) within WhoIs bulk database(s).
Beside saving multiple WHOIS queries, using pre-downloaded WhoIs bulk databases enables to do plain text searches on all the WhoIs records.
You can either select one specific database (in plain text or gzipped format) using the -f|--filename FILE option, or/and a directory containing all your databases using the -d|--dirname DIR option.
Use the -c|--case option to make your searches case sensitive.
Use the -e|--exclude FILE option to provide a one-excluded-case-insensitive-keyword-per-line to filter out matching records.
You'll then obtain a list of records matching at least one of your keywords, and not matching any of the excluded keywords.
If you use the -1|--first option, you'll instead only obtain the first line of each matching record (whether it is an inetnum, inet6num, organisatio, aut-num, role, route or mntner record).
If you use the -i|--inet4 and/or -I|--inet6 option(s), you'll instead obtain only matching inetnum or inet6num records reformatted as pipe-separated-values of networks:
starting IP address|ending IP Address|netname|descr|org|country
If you add the -r|--range option to the last ones, you'll instead obtain only matching inetnum or inet6num records reformatted as pipe-separated-values of hosts:
IP address|type|subnet|netname|descr|org|country
Where type is either "Network" for the first address in a subnet, "Broadcast" for the last address in a subnet or "IP address" for the rest.
OPTIONS
Options | Use |
---|---|
-1|--first | Show only the first line of each matching record |
-c|--case | Make searches case sensitive |
-d|--dirname DIR | Use databases from the DIR directory name |
-e|--exclude FILE | Exclude words from the FILE file name |
-f|--filename FILE | Use database from the FILE file name |
-i|--inet4 | Show only reformatted inetnum records |
-I|--inet6 | Show only reformatted inet6num records |
-r|--range | Show expanded inet(6)num ranges |
--debug | Enable debug mode |
--help|-? | Print usage and a short help message and exit |
--version | Print version and exit |
-- | Options processing terminator |
ENVIRONMENT
The WIS_DEBUG environment variable can also be set to any value to enable debug mode.
FILES
The wis utility uses WhoIs bulk databases downloaded from the main Regional Internet Registries (RIR).
The provided "fetch-db.sh" script can be used for doing this.
Be sure to read their respective terms of use before!
EXIT STATUS
The wis utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
Assuming that you have installed the available bulk WhoIs databases (in gzipped format) in a directory named "db", and that you made a one-excluded-keyword-per-line file named "excluded.txt", use the following commands:
- to extract full WhoIs information about matching blocks:
wis -d db -e excluded.txt keyword1 keyword2 keyword3
- to extract only the first line of WhoIs information about matching blocks:
wis -d db -e excluded.txt -1 keyword1 keyword2 keyword3
- to extract an IPv4 network summary about matching blocks:
wis -d db -e excluded.txt -i keyword1 keyword2 keyword3
- to extract an IPv4 host summary about matching blocks:
wis -d db -e excluded.txt -ir keyword1 keyword2 keyword3
SEE ALSO
STANDARDS
The wis utility is not a standard UNIX command.
This implementation tries to follow the PEP 8 style guide for Python code.
PORTABILITY
To be tested under Windows.
HISTORY
This implementation was made for the PNU project.
The initial name of the command was "AS Search", but the resulting short form seemed problematic... So I went for a wiser name :-)
LICENSE
It is available under the 3-clause BSD license.
AUTHORS
CAVEAT
LACNIC (Latin America and Caribbean NIC) does not provide a very useful bulk WhoIs database...
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
File details
Details for the file pnu_wis-0.9.0.tar.gz
.
File metadata
- Download URL: pnu_wis-0.9.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3a1d36cfad0973b450337b2cd863e30d2c14aabb9eb8f5a6b71273b08f03e58 |
|
MD5 | c81945517133614c78ad09efada9848e |
|
BLAKE2b-256 | 0a97f345e922e43becd8bf919f961bdec64891dd54cfb0ce5dd22f0e032b292d |
File details
Details for the file pnu_wis-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: pnu_wis-0.9.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0d6a6b8b404581aaf91f037d9e96eeff35a379dea487ebaafb20cba14c4a7ff |
|
MD5 | 4ede53ea858f103bc34fd3c88a4597ce |
|
BLAKE2b-256 | fe5fe2cf762e11dcf1c936add7022e84083ddd2d7707a82a0c8c9f4345c95c8f |