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
clisubmodule. nmap-compatible CLI surface. Parsing accepts the union ofnmap --helpand Nmap’slong_optionstable (nmap.cc); behavior parity is documented in README.- config
configsubmodule. Resolvecrate::cli::Argsinto an executableScanPlan.- discovery
discoverysubmodule. Host discovery before port scan. Skipped with-Pn/--no-ping.- fp_
match fp_matchsubmodule. Nmap-compatible fingerprint expression matching — delegates to upstreamexpr_matchinc/expr_match.c.- ftp_
bounce ftp_bouncesubmodule. FTP bounce TCP port scan (-b): use a misconfigured FTP server’s activePORTto probe targets.- help_tp
help_tpsubmodule.tp-style help output (MenkeTechnologies/temprs: banner,//columns, section rules). ANSI colors matchtemprssrc/model/opts.rs(CYBERPUNK_TEMPLATE,BANNER,AFTER).- icmp_
listen icmp_listensubmodule. ICMP / ICMPv6 destination-unreachable listeners to refine UDP scan (closed/filtered/open|filtered).- icmp_
ping icmp_pingsubmodule. ICMP timestamp (-PP) and address mask (-PM) host discovery (IPv4 only).- idle
idlesubmodule. 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_protosubmodule. IP protocol scan (-sO): raw IPv4 / IPv6 headers + ICMP classification.- ipv6_l4
ipv6_l4submodule. Locate the layer-4 header inside an IPv6 frame (fixed header + common extension headers).- net_
util net_utilsubmodule. Shared network utilities (cached local-IP lookup, lock-free deadline).- nse
nsesubmodule. Built-in “script” probes (not full NSE/Lua). Parses--script/-sCand runs Rust builtins.- os_db
os_dbsubmodule. Stream-parse Nmapnmap-os-dbfor fingerprint metadata (not full TCP/IP probe matching).- os_
detect os_detectsubmodule. Heuristic OS guess from ICMP TTL (-O/-Awith-snor ping).- os_
fp_ db os_fp_dbsubmodule. Fullnmap-os-dbreference fingerprints + MatchPoints scoring (Nmapcompare_fingerprints/AVal_match).- os_scan
os_scansubmodule. IPv4 TCP/IP OS detection probes (Nmap 2nd-gen): SEQ/OPS/WIN, ECN, T1–T7, U1, IE.- output
outputsubmodule. Normal (-oN), grepable (-oG), and minimal XML (-oX) writers.- ping
pingsubmodule. ICMP host discovery (-sn) via raw ICMP echo request/reply (pnet). Falls back to systempingwhen raw sockets are unavailable (non-root).- ports
portssubmodule. Port list resolution:-p,-F,--top-ports, exclusions, and-sO -FIP protocol subsets.- resume
resumesubmodule.--resumecheckpoint: JSON list of completed(host, port)pairs.- scan
scansubmodule. Parallel TCP connect and UDP probes (tokio+ bounded concurrency).- scanflags
scanflagssubmodule. Parse Nmap-style--scanflags(TCP flag names).- sctp
sctpsubmodule. Raw SCTP scans (-sYINIT,-sZCOOKIE_ECHO) — CRC32c + pipelined recv likecrate::syn.- skiddie
skiddiesubmodule. Script-kiddie (-oS) text transform — same rules as Nmap’sskid_output()inoutput.cc(50% substitution vs random case flip;A→4,E→3,I→!|1,O→0,S→$/z,Z↔S,z↔s).- syn
synsubmodule. Raw half-open TCP scans (SYN / NULL / FIN / Xmas / ACK / Window / Maimon) viapnet(requires elevated privileges on most OSes).- target
targetsubmodule. Target parsing: hostnames, IPv4/IPv6, CIDR, nmap-style IPv4 octet ranges,-iLlines.- trace
tracesubmodule.--tracerouteusing systemtraceroute/tracert.- vscan
vscansubmodule. TCP/UDP service/version detection using Nmapnmap-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.