Skip to main content

Crate nmaprs

Crate nmaprs 

Source
Expand description

nmaprs — parallel network scanner with nmap-style CLI parsing.

Modules§

argv_expand
Expand nmap-style glued short options (-sS, -PS80, -T4) before clap parsing.
cli
cli submodule. nmap-compatible CLI surface. Parsing accepts the union of nmap --help and Nmap’s long_options table (nmap.cc); behavior parity is documented in README.
config
config submodule. Resolve crate::cli::Args into an executable ScanPlan.
discovery
discovery submodule. Host discovery before port scan. Skipped with -Pn / --no-ping.
fp_match
fp_match submodule. Nmap-compatible fingerprint expression matching — delegates to upstream expr_match in c/expr_match.c.
ftp_bounce
ftp_bounce submodule. FTP bounce TCP port scan (-b): use a misconfigured FTP server’s active PORT to probe targets.
help_tp
help_tp submodule. tp-style help output (MenkeTechnologies/temprs: banner, // columns, section rules). ANSI colors match temprs src/model/opts.rs (CYBERPUNK_TEMPLATE, BANNER, AFTER).
icmp_listen
icmp_listen submodule. ICMP / ICMPv6 destination-unreachable listeners to refine UDP scan (closed / filtered / open|filtered).
icmp_ping
icmp_ping submodule. ICMP timestamp (-PP) and address mask (-PM) host discovery (IPv4 only).
idle
idle submodule. TCP idle scan (-sI zombie[:probeport]): spoofed SYN from the zombie’s IPv4 toward targets, IP-ID sampling on the zombie (closed-port RST probes). IPv4 only; sequential probes so IP-ID deltas stay meaningful for one zombie.
ip_proto
ip_proto submodule. IP protocol scan (-sO): raw IPv4 / IPv6 headers + ICMP classification.
ipv6_l4
ipv6_l4 submodule. Locate the layer-4 header inside an IPv6 frame (fixed header + common extension headers).
net_util
net_util submodule. Shared network utilities (cached local-IP lookup, lock-free deadline).
nse
nse submodule. Built-in “script” probes (not full NSE/Lua). Parses --script / -sC and runs Rust builtins.
os_db
os_db submodule. Stream-parse Nmap nmap-os-db for fingerprint metadata (not full TCP/IP probe matching).
os_detect
os_detect submodule. Heuristic OS guess from ICMP TTL (-O / -A with -sn or ping).
os_fp_db
os_fp_db submodule. Full nmap-os-db reference fingerprints + MatchPoints scoring (Nmap compare_fingerprints / AVal_match).
os_scan
os_scan submodule. IPv4 TCP/IP OS detection probes (Nmap 2nd-gen): SEQ/OPS/WIN, ECN, T1–T7, U1, IE.
output
output submodule. Normal (-oN), grepable (-oG), and minimal XML (-oX) writers.
ping
ping submodule. ICMP host discovery (-sn) via raw ICMP echo request/reply (pnet). Falls back to system ping when raw sockets are unavailable (non-root).
ports
ports submodule. Port list resolution: -p, -F, --top-ports, exclusions, and -sO -F IP protocol subsets.
resume
resume submodule. --resume checkpoint: JSON list of completed (host, port) pairs.
scan
scan submodule. Parallel TCP connect and UDP probes (tokio + bounded concurrency).
scanflags
scanflags submodule. Parse Nmap-style --scanflags (TCP flag names).
sctp
sctp submodule. Raw SCTP scans (-sY INIT, -sZ COOKIE_ECHO) — CRC32c + pipelined recv like crate::syn.
skiddie
skiddie submodule. Script-kiddie (-oS) text transform — same rules as Nmap’s skid_output() in output.cc (50% substitution vs random case flip; A→4, E→3, I→!|1, O→0, S→$/z, Z↔S, z↔s).
syn
syn submodule. Raw half-open TCP scans (SYN / NULL / FIN / Xmas / ACK / Window / Maimon) via pnet (requires elevated privileges on most OSes).
target
target submodule. Target parsing: hostnames, IPv4/IPv6, CIDR, nmap-style IPv4 octet ranges, -iL lines.
trace
trace submodule. --traceroute using system traceroute / tracert.
vscan
vscan submodule. TCP/UDP service/version detection using Nmap nmap-service-probes (subset of Nmap behavior).

Functions§

run
Run the full pipeline: parse → plan → expand targets → scan → emit output.
run_from_cli_env
Initialize tracing, parse CLI args from the environment, and block on run.