NMAP Query Tool
Post-processor for nmap output that allows fast, simple filtering of data both interactively and inline (i.e. via a bash pipe).
Usage: python nmap-query.py [-h] [-p PORTS] [-a IPS] [-os OS] [-d DEVICE_TYPE] [-c] [-i NMAP_SCAN_RESULTS_FILE] [-o OUTPUT_FILENAME] [-q]
Note: the nmap scan results can be provided either through an input file or from STDIN (through a pipe)
Example: nmap -sV 10.0.0.0/24 | python nmap-query.py -q
[-h | --help]: Will print the help/usage message
[-p | --ports] PORTS: specify one or more (open) ports to filter on. The following input formats are accepted:
Single port number: -p 22
Set of port numbers: -p 22,80,443
[-a | --ip-addrs] IPS: specify one or more IP addresses on which to filter. The following input formats are accepted:
Single IP: -a 10.0.0.1
Set of IPs: -a 10.0.0.1,10.0.0.2,10.0.0.3
Single CIDR block: -a 10.0.0.0/24
Set of CIDR blocks: -a 10.0.0.0/24,10.0.1.0/24
Range of IPs: -a 10.0.0.1-4
[-os | --operating-system] OS: specify one or more operating systems on which to filter. The following input formats are accepted:
Single operating system: -os Windws
Set of operating systems: -os Windows,Linux
[-d | --device-type] DEVICE_TYPE: specify one or more device types on which to filter. The following input formats are accepted:
Single device type: -d router
Set of device types: -d router,switch
[-c | --output-csv]: use CSV as the output format
[-i | --input-file] NMAP_SCAN_RESULTS_FILE: specify the name of the input file (i.e. the file which contains the results of the Nmap scan)
[-o | --output-file] OUTPUT_FILENAME: specify the name of the output file
[-q | --query-mode]: enter the interactive query mode
Locate script install location
pip3 show nmap-query-tool; will show the install directory of the packagecd <INSTALL DIRECTORY>/NmapQueryToolpython3 nmap_query_tool.py
You can also setup an alias for running the script: alias nmap-query="python3 ${pwd}/nmap_query.py"
Metadata
Release files for nmap-query-tool 1.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nmap_query_tool-1.1.8.tar.gz | 14.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nmap_query_tool-1.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.1 kB
Release files / nmap_query_tool-1.1.8.tar.gz
| Download URL | nmap_query_tool-1.1.8.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65b13366796d326a493a8794d0a7722cfc284c56712ab55941d0b8f397c3f414
|
|
BLAKE2b-256 checksum How to use checksums |
5290829919047ba072cf70c6011dfea661c7b6d7f3cc11257ff9b164a1127953
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15+
|
Release files / nmap_query_tool-1.1.8-py3-none-any.whl
| Download URL | nmap_query_tool-1.1.8-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5b037b49338d92922efc1ec38b25c19c9aeb98f9d60b29122a29e43d912b315
|
|
BLAKE2b-256 checksum How to use checksums |
6c76b032c2a5464f2232caa0c8bf56767fbe7aa93f3a22f82f4db22041ae57ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15+
|