Repository navigation
M4 — multi-host group scan engine (sys::group), wired for -sS - #54
Merged
Merged
Conversation
Backlog #2, first sub-slice: scan a whole host group concurrently through ONE shared capture instead of one host at a time. Ports nmap's ultra_scan host-group model. sys::group (0 unsafe): a generic group engine — - RawScanKind trait factors the scan-type-specific bits (build_probe, match_reply, no-response default, BPF filter, protocol) so SYN/UDP/flag share one loop instead of near-identical per-host copies (also starts paying down the DRY-the-matchers follow-up). - group_scan drives a per-host HostScheduler + a GroupScheduler bounding total probes in flight; one AsyncCapture feeds all hosts, and each reply is demultiplexed to its host by SOURCE IP (SynReply now carries src_ip). Every host shares one encoded source-port range because the source address disambiguates them. - group_scan_targets buckets targets by egress route and runs one shared-capture group per route. - SynKind is the first RawScanKind impl; syn_scan_targets now delegates to it. core: SynReply gains src_ip (read from the reply's IPv4 source); match_syn_response fills it. Miri-clean. Verified as root: a two-host loopback group scan demultiplexes correctly (group_e2e), and the CLI `nmap-rs -sS -Pn -p P1,P2 127.0.0.1 127.0.0.2` reports each host's own port open and the other's closed — concurrent, one capture, routed by src IP. Gates: clippy (default + all-features) + fmt on pinned 1.97.0; miri clean; unsafe-audit 11/11 (no new unsafe); full suite green. Divergences ledgered (group-scan-shared-capture-demux-by-src, group-scan-per-route-bucketing). progress.json 34/43 DONE. Next sub-slices of #2: migrate -sU + flag scans onto this engine (retiring their per-target loops, DRYing the matchers); then UDP payloads; then SYN/flag ICMP back-fill. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JfEzHqD7a7TKDuUs5GwZ2w
kj299
marked this pull request as ready for review
July 25, 2026 01:51
kj299
pushed a commit
that referenced
this pull request
Nov 14, 2026
…habit Every step of nmap's IPv6-scans milestone ran its sabotage from a script written for the occasion. None bounded a run: one mutation made its test loop forever, was killed by hand after 96 s, and was then printed as CAUGHT with no failing test (LESSONS #54). Two ledger entries named, as their pins, tests that passed with the fix reverted (LESSONS #55). sabotage.py takes a JSON list of mutations. It requires the replaced span to occur once, restores from the saved bytes and bumps the mtime, kills a run at its timeout and calls that INCONCLUSIVE, counts only a failing test named in the output, and with `expect` only the test the ledger names (WRONG-TEST otherwise). It refuses to start over a backup a killed run left behind. Self-tested; run against nmap-rs in a separate worktree. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01JfEzHqD7a7TKDuUs5GwZ2w
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backlog #2, first sub-slice: the multi-host group scan engine — scan a whole host group concurrently through one shared capture instead of one host at a time. Ports nmap's
ultra_scanhost-group model.What lands
sys::group(0 unsafe) — a generic group engine:RawScanKindtrait factors the scan-type-specific bits (build_probe,match_reply, no-response default, BPF filter, protocol), so SYN/UDP/flag will share one loop instead of near-identical per-host copies — this also starts paying down the "DRY the matchers" follow-up.group_scandrives a per-hostHostScheduler+ aGroupSchedulerbounding total probes in flight; oneAsyncCapturefeeds all hosts, and each reply is demultiplexed to its host by source IP (SynReplynow carriessrc_ip). Every host shares one encoded source-port range because the source address disambiguates them.group_scan_targetsbuckets targets by egress route and runs one shared-capture group per route.SynKindis the firstRawScanKindimpl;syn_scan_targetsnow delegates to it.core:
SynReplygainssrc_ip(read from the reply's IPv4 source);match_syn_responsefills it. Miri-clean.Verified as root (
--features pcap)group_e2e: a two-host loopback scan (127.0.0.1 + 127.0.0.2, each with its own open port) demultiplexes correctly.Each host's own port open, the other's closed — concurrent, one capture, routed by src IP.
Gates
clippy (default + all-features) + fmt on pinned 1.97.0 · miri clean · unsafe-audit 11/11 (no new unsafe) · full suite green · divergences ledgered (
group-scan-shared-capture-demux-by-src,group-scan-per-route-bucketing) · progress.json 34/43 DONE.Remaining sub-slices of backlog #2
-sU+ flag scans onto this engine (this PR does SYN).payload.cc).🤖 Generated with Claude Code
https://claude.ai/code/session_01JfEzHqD7a7TKDuUs5GwZ2w
Generated by Claude Code