Skip to content

Keep library scans quiet by default#916

Open
Bortlesboat wants to merge 1 commit into
bee-san:masterfrom
Bortlesboat:fix/706-quiet-library
Open

Keep library scans quiet by default#916
Bortlesboat wants to merge 1 commit into
bee-san:masterfrom
Bortlesboat:fix/706-quiet-library

Conversation

@Bortlesboat

Copy link
Copy Markdown

What changed

  • make Scanner::new quiet by default for library consumers
  • add an explicit with_open_port_output() opt-in used by the CLI
  • replace the remaining UDP bind println! with debug logging
  • cover both the quiet library default and the CLI opt-in

Why

Scanner::run() returns its discovered sockets, but it also printed each open socket directly to stdout. That made the library difficult to embed in applications that own their output. Keeping output disabled on a normal library-created scanner lets callers use the return value without unsolicited stdout, while the RustScan binary explicitly opts into the existing incremental display.

Fixes #706.

Validation

  • cargo test scanner::tests — 11 passed
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

The complete cargo test invocation entered the repository's network/timing integration tests and exceeded a two-minute local command limit without reporting a failure; the full scanner unit suite completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rustcan API Library is too noisy in stdout

1 participant