A tool for parsing and dynamically querying nmap scan data
Project description
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"
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
nmap_query_tool-1.1.8.tar.gz
(14.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nmap_query_tool-1.1.8.tar.gz.
File metadata
- Download URL: nmap_query_tool-1.1.8.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using 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+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65b13366796d326a493a8794d0a7722cfc284c56712ab55941d0b8f397c3f414
|
|
| MD5 |
8daf35f1c4e506b032926f2ddd008fd9
|
|
| BLAKE2b-256 |
5290829919047ba072cf70c6011dfea661c7b6d7f3cc11257ff9b164a1127953
|
File details
Details for the file nmap_query_tool-1.1.8-py3-none-any.whl.
File metadata
- Download URL: nmap_query_tool-1.1.8-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using 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+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5b037b49338d92922efc1ec38b25c19c9aeb98f9d60b29122a29e43d912b315
|
|
| MD5 |
48e70ef0e9da2b9de96cae5b97c78576
|
|
| BLAKE2b-256 |
6c76b032c2a5464f2232caa0c8bf56767fbe7aa93f3a22f82f4db22041ae57ab
|