Skip to main content

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 [-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 | python -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
        Set of IPs: -a,,
        Single CIDR block: -a
        Set of CIDR blocks: -a,
        Range of IPs: -a

[-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

  1. pip3 show nmap-query-tool; will show the install directory of the package
  2. cd <INSTALL DIRECTORY>/NmapQueryTool
  3. python3

You can also setup an alias for running the script: alias nmap-query="python3 ${pwd}/"

Project details

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.3.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

nmap_query_tool-1.1.3-py3-none-any.whl (18.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page