pnu-wis


Namepnu-wis JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/HubTou/wis/
SummaryBulk WHOIS search
upload_time2022-12-17 15:39:51
maintainer
docs_urlNone
authorHubert Tournier
requires_python>=3.3
licenseBSD 3-Clause License
keywords pnu-project
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://pypi.org/project/pnu-wis/)
<br>
pip install [PNU](https://pypi.org/project/PNU/)
<br>
pip install [pytnix](https://pypi.org/project/pytnix/)

# 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\]
\[-s|--summary\]
\[-S|--summaryonly\]
\[--debug\]
\[--help|-?\]
\[--version\]
\[--\]
KEYWORD
\[...\]

## DESCRIPTION
The **wis** utility searches for keyword(s) within bulk WHOIS database(s).

Beside saving multiple WHOIS queries, using pre-downloaded bulk WHOIS 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 file 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.

If you use the *-i|--inet4* and/or *-I|--inet6* option(s), you'll instead obtain only matching inetnum or inet6num records reformatted as a 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 a 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.

If you use the *-s|--summary* option, you'll get a summary of the record types found (from the first line of each matching record, before the colon).

If you use the *-S|--summaryonly* option you'll only get that.

### 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
-s\|--summary|Show a summary of the type of matching records
-S\|--summaryonly|Show only a summary of the type of matching records
--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 bulk WHOIS databases downloaded from the main [Regional Internet Registries (RIR)](https://www.iana.org/numbers) and [National Internet Registries (NIR)](https://en.wikipedia.org/wiki/National_Internet_registry).

The provided "fetch-db-WHOIS.sh" script can be used for doing this.

You can also use bulk RR (Routing Registries) databases, that you can download with the provided "fetch-db-RR.sh" script.

Be sure to read the databases 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:
```Shell
wis -d db -e excluded.txt keyword1 keyword2 keyword3
```

* to extract only the first line of WHOIS information about matching blocks:
```Shell
wis -d db -e excluded.txt -1 keyword1 keyword2 keyword3
```

* to extract an IPv4 network summary about matching blocks:
```Shell
wis -d db -e excluded.txt -i keyword1 keyword2 keyword3
```

* to extract an IPv4 host summary about matching blocks:
```Shell
wis -d db -e excluded.txt -ir keyword1 keyword2 keyword3
```

* to analyze a database record types:
```Shell
wis -f database_name.db.gz -S 
```

## SEE ALSO
[whois(1)](https://www.freebsd.org/cgi/man.cgi?query=whois)

## STANDARDS
The **wis** utility is not a standard UNIX command.

This implementation tries to follow the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide for [Python](https://www.python.org/) code.

## PORTABILITY
Tested OK under Windows.

## HISTORY
This implementation was made for the [PNU project](https://github.com/HubTou/PNU).

Its first use case was to identify all my company's IP addresses ranges through the world, helping to secure our networks and identify shadow IT...

The initial name of the command was "AS Search", but the resulting short form seemed problematic... So I went for a **wis**er name :smiley:

## LICENSE
It is available under the [3-clause BSD license](https://opensource.org/licenses/BSD-3-Clause).

## AUTHORS
[Hubert Tournier](https://github.com/HubTou)

## CAVEAT
Only the AFRINIC, RIPE, APNIC, APNIC/JPNIC, APNIC/TWNIC and APNIC/KISA databases have useful *domain*, *inetnum*, *inet6num* and *organisation* information.

LACNIC does not provide useful *inetnum* and *inet6num* information.

ARIN, APNIC/IDNIC, APNIC/CNNIC, APNIC/VNNIC and APNIC/IRINN do not provide *domain*, *inetnum*, *inet6num* and *organisation* information at all.

However you can find *route* information from all of them, which can then be used with regular WHOIS queries.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HubTou/wis/",
    "name": "pnu-wis",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.3",
    "maintainer_email": "",
    "keywords": "pnu-project",
    "author": "Hubert Tournier",
    "author_email": "hubert.tournier@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9c/b2/350770e5ff748de67c73cbd41f7c0cff565cb63373421073aab41185d608/pnu_wis-1.0.1.tar.gz",
    "platform": null,
    "description": "# Installation\nDepending 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:\n\npip install [pnu-wis](https://pypi.org/project/pnu-wis/)\n<br>\npip install [PNU](https://pypi.org/project/PNU/)\n<br>\npip install [pytnix](https://pypi.org/project/pytnix/)\n\n# WIS(1)\n\n## NAME\nwis - Bulk WHOIS Search\n\n## SYNOPSIS\n**wis**    \n\\[-1|--first\\]\n\\[-c|--case\\]\n\\[-d|--dirname DIR\\]\n\\[-e|--exclude FILE\\]\n\\[-f|--filename FILE\\]\n\\[-i|--inet4\\]\n\\[-I|--inet6\\]\n\\[-r|--range\\]\n\\[-s|--summary\\]\n\\[-S|--summaryonly\\]\n\\[--debug\\]\n\\[--help|-?\\]\n\\[--version\\]\n\\[--\\]\nKEYWORD\n\\[...\\]\n\n## DESCRIPTION\nThe **wis** utility searches for keyword(s) within bulk WHOIS database(s).\n\nBeside saving multiple WHOIS queries, using pre-downloaded bulk WHOIS databases enables to do plain text searches on all the WHOIS records.\n\nYou 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.\n\nUse the *-c|--case* option to make your searches case sensitive.\n\nUse the *-e|--exclude FILE* option to provide a one-excluded-case-insensitive-keyword-per-line file to filter out matching records.\n\nYou'll then obtain a list of records matching at least one of your keywords, and not matching any of the excluded keywords.\n\nIf you use the *-1|--first* option, you'll instead only obtain the first line of each matching record.\n\nIf you use the *-i|--inet4* and/or *-I|--inet6* option(s), you'll instead obtain only matching inetnum or inet6num records reformatted as a pipe-separated-values of networks:\n```\nstarting IP address|ending IP Address|netname|descr|org|country\n```\nIf you add the *-r|--range* option to the last ones, you'll instead obtain only matching inetnum or inet6num records reformatted as a pipe-separated-values of hosts:\n```\nIP address|type|subnet|netname|descr|org|country\n```\nWhere 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.\n\nIf you use the *-s|--summary* option, you'll get a summary of the record types found (from the first line of each matching record, before the colon).\n\nIf you use the *-S|--summaryonly* option you'll only get that.\n\n### OPTIONS\nOptions | Use\n------- | ---\n-1\\|--first|Show only the first line of each matching record\n-c\\|--case|Make searches case sensitive\n-d\\|--dirname DIR|Use databases from the DIR directory name\n-e\\|--exclude FILE|Exclude words from the FILE file name\n-f\\|--filename FILE|Use database from the FILE file name\n-i\\|--inet4|Show only reformatted inetnum records\n-I\\|--inet6|Show only reformatted inet6num records\n-r\\|--range|Show expanded inet(6)num ranges\n-s\\|--summary|Show a summary of the type of matching records\n-S\\|--summaryonly|Show only a summary of the type of matching records\n--debug|Enable debug mode\n--help\\|-?|Print usage and a short help message and exit\n--version|Print version and exit\n--|Options processing terminator\n\n## ENVIRONMENT\nThe WIS_DEBUG environment variable can also be set to any value to enable debug mode.\n\n## FILES\nThe **wis** utility uses bulk WHOIS databases downloaded from the main [Regional Internet Registries (RIR)](https://www.iana.org/numbers) and [National Internet Registries (NIR)](https://en.wikipedia.org/wiki/National_Internet_registry).\n\nThe provided \"fetch-db-WHOIS.sh\" script can be used for doing this.\n\nYou can also use bulk RR (Routing Registries) databases, that you can download with the provided \"fetch-db-RR.sh\" script.\n\nBe sure to read the databases respective terms of use before!\n\n## EXIT STATUS\nThe **wis** utility exits 0 on success, and >0 if an error occurs.\n\n## EXAMPLES\nAssuming 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:\n\n* to extract full WHOIS information about matching blocks:\n```Shell\nwis -d db -e excluded.txt keyword1 keyword2 keyword3\n```\n\n* to extract only the first line of WHOIS information about matching blocks:\n```Shell\nwis -d db -e excluded.txt -1 keyword1 keyword2 keyword3\n```\n\n* to extract an IPv4 network summary about matching blocks:\n```Shell\nwis -d db -e excluded.txt -i keyword1 keyword2 keyword3\n```\n\n* to extract an IPv4 host summary about matching blocks:\n```Shell\nwis -d db -e excluded.txt -ir keyword1 keyword2 keyword3\n```\n\n* to analyze a database record types:\n```Shell\nwis -f database_name.db.gz -S \n```\n\n## SEE ALSO\n[whois(1)](https://www.freebsd.org/cgi/man.cgi?query=whois)\n\n## STANDARDS\nThe **wis** utility is not a standard UNIX command.\n\nThis implementation tries to follow the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide for [Python](https://www.python.org/) code.\n\n## PORTABILITY\nTested OK under Windows.\n\n## HISTORY\nThis implementation was made for the [PNU project](https://github.com/HubTou/PNU).\n\nIts first use case was to identify all my company's IP addresses ranges through the world, helping to secure our networks and identify shadow IT...\n\nThe initial name of the command was \"AS Search\", but the resulting short form seemed problematic... So I went for a **wis**er name :smiley:\n\n## LICENSE\nIt is available under the [3-clause BSD license](https://opensource.org/licenses/BSD-3-Clause).\n\n## AUTHORS\n[Hubert Tournier](https://github.com/HubTou)\n\n## CAVEAT\nOnly the AFRINIC, RIPE, APNIC, APNIC/JPNIC, APNIC/TWNIC and APNIC/KISA databases have useful *domain*, *inetnum*, *inet6num* and *organisation* information.\n\nLACNIC does not provide useful *inetnum* and *inet6num* information.\n\nARIN, APNIC/IDNIC, APNIC/CNNIC, APNIC/VNNIC and APNIC/IRINN do not provide *domain*, *inetnum*, *inet6num* and *organisation* information at all.\n\nHowever you can find *route* information from all of them, which can then be used with regular WHOIS queries.\n\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License",
    "summary": "Bulk WHOIS search",
    "version": "1.0.1",
    "split_keywords": [
        "pnu-project"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "eed07121615fb2be0ef25cfd8fc28287",
                "sha256": "a8e6a9a60c2e8e0440cbdb1f2cca37bdacc7365f9b7b60bcea7082a7a5d8fa1b"
            },
            "downloads": -1,
            "filename": "pnu_wis-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eed07121615fb2be0ef25cfd8fc28287",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.3",
            "size": 12358,
            "upload_time": "2022-12-17T15:39:49",
            "upload_time_iso_8601": "2022-12-17T15:39:49.621989Z",
            "url": "https://files.pythonhosted.org/packages/c0/1b/8dc1cd8ae9d9522a296c9311bb79ff15db56e94c1ba3be14f1804b65e251/pnu_wis-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "d23d968c698db86852887169889316a8",
                "sha256": "056864506b1b9e400df16456f8036b1eaab48cad6a764e3977fe450c90e376eb"
            },
            "downloads": -1,
            "filename": "pnu_wis-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d23d968c698db86852887169889316a8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.3",
            "size": 14243,
            "upload_time": "2022-12-17T15:39:51",
            "upload_time_iso_8601": "2022-12-17T15:39:51.255150Z",
            "url": "https://files.pythonhosted.org/packages/9c/b2/350770e5ff748de67c73cbd41f7c0cff565cb63373421073aab41185d608/pnu_wis-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-17 15:39:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "HubTou",
    "github_project": "wis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pnu-wis"
}
        
Elapsed time: 0.05144s