| Crates.io | nmap-helper |
| lib.rs | nmap-helper |
| version | 0.1.1 |
| created_at | 2025-04-01 18:34:28.211269+00 |
| updated_at | 2025-04-01 18:34:28.211269+00 |
| description | Some utilities for working with Nmap scan results (https://nmap.org) |
| homepage | https://github.com/net-shaper/nmap-helper |
| repository | https://github.com/net-shaper/nmap-helper |
| max_upload_size | |
| id | 1615220 |
| size | 85,996 |
A Rust-based command-line utility for processing and working with Nmap output files. This tool helps you convert Nmap output formats and generate targeted Nmap commands from previous scan results.
make
make install
cargo build --release
cp target/release/nmap-helper /path/to/install/dir
Convert Nmap XML or greppable output to JSON:
# Convert from file
nmap-helper convert input.xml
nmap-helper convert input.gnmap
# Convert with pretty-printing
nmap-helper convert input.xml --pretty
# Convert to output file
nmap-helper convert input.xml -o output.json
# Read from stdin
cat input.xml | nmap-helper convert
# Force input format
nmap-helper convert input.txt --format json
Generate targeted Nmap commands from previous scan results:
# Basic usage
nmap-helper nmap input.xml
# Sort output by IP
nmap-helper nmap input.xml --sort
# Add additional Nmap arguments
nmap-helper nmap input.xml --nmap-args="-sV -sC"
# Generate a single command for all targets
nmap-helper nmap input.xml --single
# Insert targets into a custom flag
nmap-helper nmap input.xml --insert-target="-oA {}.results"
Basic per-host commands:
$ nmap-helper nmap scan.xml
nmap -p 80,443 192.168.1.1
nmap -p 22,80,443 192.168.1.2
Single command for all hosts:
$ nmap-helper nmap scan.xml --single
nmap -p 22,80,443 192.168.1.1,192.168.1.2
With additional Nmap arguments:
$ nmap-helper nmap scan.xml --nmap-args="-sV -sC"
nmap -sV -sC -p 80,443 192.168.1.1
With inserted targets:
$ nmap-helper nmap scan.xml --insert-target="-oA {}.results"
nmap -oA 192.168.1.1.results -p 80,443 192.168.1.1
nmap-helper convert [OPTIONS] [INPUT]
Arguments:
[INPUT] Input Nmap file (XML or greppable format), omit to read from stdin
Options:
-o, --output <FILE> Output JSON file (defaults to stdout if not specified)
-p, --pretty Pretty-print the JSON output
-f, --format <FORMAT> Force input format (xml or gnmap), otherwise auto-detected
-h, --help Print help
nmap-helper nmap [OPTIONS] [INPUT]
Arguments:
[INPUT] Input Nmap file (XML or greppable format), omit to read from stdin
Options:
--sort Sort output by IP address
--nmap-args <ARGS> Additional nmap arguments to append to the command
--single Output a single nmap command for all IPs
--insert-target <FLAG> Add a flag with the target(s) inserted at {} placeholder
-h, --help Print help
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.