WhoisSearch
WhoisSearch is a program that search in RIPE, APNIC and AFRINIC a list os user defined words and returns a CSV and JSON with the networks that contain at least one word of the list.
Installation
From pypi:
pip3 install whoissearch
From repo:
git clone https://github.com/hackliza/WhoisSearch.git
cd WhoisSearch
pip3 install .
Usage
To use this program, first, you need a list of words that you want to be searched (whitelist). Optionally, you can have a list of words that you want to exclude in the results (blacklist).
For example, you can have the following words in the whitelist:
foo
bar
example
and the following words in the blacklist:
food
bart
Then, you can run the program putting this words on a file or by command line as we show in the following examples:
whoissearch whitelist.txt -b blacklist.txt
whoissearch foo bar example -b food bart
whoissearch whitelist.txt -b food bart
When the program ends, you will get the following results:
{
"results": [
{
"inetnum": "212.0.145.176 - 212.0.145.183",
"netname": "HAFEZ-ALBARBARI",
"descr": "",
"country": "SD",
"admin_c": "MHAE1-AFRINIC",
"tech_c": "MHAE1-AFRINIC",
"remarks": "data has been transferred from RIPE Whois Database 20050221",
"notify": "",
"mnt_by": "SUDATEL-MNT",
"changed": "***@sudatel.net 20040619\n***@afrinic.net 20050205",
"status": "ASSIGNED PA",
"mnt_lower": "MNT-HIBA",
"created": "",
"last_modified": "",
"source": "AFRINIC",
"matched_word": "bar"
},
{
"inetnum": "212.52.131.0 - 212.52.131.255",
"netname": "UNIV-OUAGA",
"descr": "University of Ouagadougou\nBURKINA FASO/ousmane.barra@univ-ouaga.bf",
"country": "BF",
"admin_c": "FMS7-AFRINIC\nOS814-AFRINIC",
"tech_c": "FMS7-AFRINIC\nOS814-AFRINIC",
"remarks": "data has been transferred from RIPE Whois Database 20050221",
"notify": "",
"mnt_by": "FasoNet-SECURITY-MNT",
"changed": "***@univ-ouaga.bf 19980325\n***@ripe.net 20040429\n***@afrinic.net 20050205\n***@onatel.bf 20100716\n***@onatel.bf 20161013\n***@onatel.bf 20180612",
"status": "ASSIGNED PA",
"mnt_lower": "",
"created": "",
"last_modified": "",
"source": "AFRINIC",
"matched_word": "bar"
}
]
}
Databases are stored by default in folder .whoissearch_dbs, located at user directory. You can change this path with flag -d.
Results are stored by default in folder whoissearch_results, located at actual directory. You can change this path with flag -o.
For example, if you want to change directories of results and database, you can use something like:
whoissearch whitelist.txt -b food bart -o ./results -d ./db
The structure in folder where databases are stored is:
.
+-- AFRINIC.db.gz
+-- AFRINIC.db.txt
+-- APNIC.db.gz
+-- APNIC.db.txt
+-- RIPE.db.gz
+-- RIPE.db.txt
Finally, if you already have downloaded the databases, you can avoid this step by using the flag -n.
whoissearch whitelist.txt -b food bart -n
Behavior
- The program downloads the databases of RIPE, APNIC and AFRINIC from the official FTP servers.
- Then, parses the IPv4 network blocks.
- After that, the program classifies block in function of the words os the white and black lists.
- Finally, write the results in CSV and JSON format.
TODO
- Add download, parsing and classifying of ARIN and LACNIC.
- Search for IPv6 networks.
Metadata
Release files for whoissearch 0.1.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 |
|---|---|---|---|---|
| whoissearch-0.1.0.tar.gz | 8.1 kB | Without provenance | Details for whoissearch-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whoissearch-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for whoissearch-0.1.0-py3-none-any.whl |
Total release size: 30.2 kB
Release files / whoissearch-0.1.0.tar.gz
| Download URL | whoissearch-0.1.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac472734b987eb57cfa4efc6a2dfcfad450af2aaa01cb005ab88d91a7c2b165b
|
|
BLAKE2b-256 checksum How to use checksums |
0ee06a8b1706ee1898b1892e2b0c878bb1334d2e0a024c9c0647f04efc8e1d79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.3
|
Release files / whoissearch-0.1.0-py3-none-any.whl
| Download URL | whoissearch-0.1.0-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d11ca596f50b4b963efbdd1d392e3f62019f773388c0d36932ed3a35ac572f19
|
|
BLAKE2b-256 checksum How to use checksums |
11d47ec24c71ab4c62ff9d72ac6ce22b7c7fe5027c2a70aaccb7239c36146237
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.3
|
Security for whoissearch 0.1.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.