Repository navigation
Conversation
…ound A subnet sweep for one port printed the batch-size hint for every host without that port. When any host answered with an open port, or a closed one under --closed, replies got through at this batch size and timeout, so batch size and timeout are unlikely to be the cause and the hint is skipped. When nothing was found it is printed once for all targets. Fixes bee-san#795
demrom
marked this pull request as ready for review
October 20, 2026 23:42
This branch has not been deployed
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.
Fixes #795
Sweeping a subnet for a few ports, as in
rustscan -a 192.168.178.0/24 -p 443,80, prints the batch-size hint for every host that has none of them open. When one host answers, that is 255 copies of a three-paragraph warning around a single result line.When any host answers, replies got through at this batch size and timeout, so the other hosts most likely have nothing open on those ports. The hint now prints once, and only when no host answered:
didn't find any open ports for 192.0.2.1didn't find any open ports on any of the 256 addresses--closed: no hint (so under--closeda single host that refused the connection no longer gets it either)The check lives in
no_open_ports_warning(), so it is unit-tested without scanning. Four tests cover the cases above. Three of them fail with the old per-host loop.Every step of
just testpasses (tests, both clippy runs,fmt --check, docs). I also ran each case, including a single host with--closed, on a real LAN and got the output listed above. If you'd rather word the multi-host hint differently, I'll change it here.