Commit Graph
1066 Commits
Author SHA1 Message Date
bee eae9fce582 Make the baseline benchmark adapter whitespace clean 2026-10-01 18:43:57 +01:00
bee 74e1e056ff Document final Tokio performance comparison and remaining overhead 2026-10-01 18:42:55 +01:00
bee 42427e88c1 Poll I/O directly before initializing timeout state 2026-10-01 18:33:26 +01:00
bee 81a55fcf6b Keep timeout state small for immediately ready operations 2026-10-01 18:30:40 +01:00
bee e83641fca8 Avoid precise timer registration for early socket replies 2026-10-01 18:23:15 +01:00
bee b5fedf363a Retain the existing timer backend for short scan deadlines 2026-10-01 18:15:05 +01:00
bee 62ed937768 Preserve timeout precision and avoid unnecessary timer allocation 2026-10-01 18:08:36 +01:00
bee 397526df8a Document real TCP and UDP runtime benchmarks 2026-10-01 17:59:36 +01:00
bee 2e57686260 Migrate scanner from async-std to Tokio 2026-10-01 17:38:30 +01:00
Syed Ghufran HassanandAutumn Skerritt cfb8645901 Refactor SocketIterator for allocation-free performance (#945)
* Refactor SocketIterator for allocation-free performance

Refactor SocketIterator to eliminate boxing and improve memory efficiency. Update documentation and tests to reflect changes.

* fix(socket_iterator): fix clone test off-by-one and skip private doc example

- clone_resumes_independently expected None after 3 of 4 sockets; assert
  the exact remaining sequence for both the original and the clone.
- The struct doc example referenced a placeholder crate and a private
  module, so it could never compile as a doctest; mark it ignore.
- Add a test for empty IP/port inputs covering size_hint and the
  FusedIterator promise.

---------

Co-authored-by: Autumn Skerritt <[email protected]>
2026-10-01 22:03:40 +09:00
ReacherandAutumn Skerritt d7cdad29c6 refactor(main): avoid per-IP script list clones and safer ulimit fallback (#905)
Small cleanups in main.rs:

- Iterate over the parsed scripts by reference and clone only the script being run, instead of cloning the whole list for every IP.
- Use `or_default()` for the per-IP port map.
- If the soft file-descriptor limit does not fit in a `usize` (32-bit targets), fall back to `DEFAULT_FILE_DESCRIPTORS_LIMIT` instead of `usize::MAX`, which bypassed all batch-size adjustments.
- Fix a typo.

The effective-batch-size warning fix originally proposed here landed via #921.

Co-authored-by: Autumn Skerritt <[email protected]>
2026-10-01 20:24:16 +09:00
dependabot[bot] ea9e6f0736 build(deps): bump toml from 1.1.5+spec-1.1.0 to 1.1.6+spec-1.1.0 (#931)
Bumps [toml](https://github.com/toml-rs/toml) from 1.1.5+spec-1.1.0 to 1.1.6+spec-1.1.0.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v1.1.5...toml-v1.1.6)

---
updated-dependencies:
- dependency-name: toml
  dependency-version: 1.1.6+spec-1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-01 20:23:25 +09:00
dependabot[bot] 2c854eb551 build(deps): bump clap from 4.6.2 to 4.6.7 (#934)
Bumps [clap](https://github.com/clap-rs/clap) from 4.6.2 to 4.6.7.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/main/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.2...clap_complete-v4.6.7)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.6.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-01 20:23:10 +09:00
dependabot[bot] 1c3fd8c378 build(deps): bump rand from 0.10.2 to 0.10.3 (#936)
Bumps [rand](https://github.com/rust-random/rand) from 0.10.2 to 0.10.3.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.10.2...0.10.3)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.10.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-01 20:22:54 +09:00
onsaliandAutumn Skerritt 4e64b5f00a feat: optional interval between scanned ports (#713)
New opt-in `--interval <MS>` option (also `interval` in the config file): after a port has been scanned on every address, wait that many milliseconds before scanning the next port, for slow, low-noise scans. Within a port `--batch-size` still limits concurrency; with the default of 0 scanning behaviour is unchanged.

Library: `Scanner::with_interval(Duration)` is added; `Scanner::new()` is unchanged.

Co-authored-by: Autumn Skerritt <[email protected]>
2026-10-01 20:19:49 +09:00
fabianbeesandAutumn Skerritt faa21b7d14 feat: option to also list closed ports (#736)
New `--closed` option (also `closed = true` in the config file) that additionally lists TCP ports that actively refused the connection: printed live as `Closed ip:port` and summarised under `closed ports:` at the end (also in greppable mode). Scripts are never run against closed ports, and without `--closed` scanning behaviour is unchanged.

Library: `Scanner::with_closed_ports()` and `Scanner::run_with_status() -> Vec<PortStatus>` are added; `Scanner::new()` and `run()` are unchanged.

Co-authored-by: Autumn Skerritt <[email protected]>
2026-10-01 20:14:48 +09:00
satyanand choudharyandAutumn Skerritt bf74950995 feat: support comma-separated multi-range port input (#852)
`-r/--range` now accepts several comma-separated ranges, e.g. `-r 1-100,200-300,5000-5100`. Overlapping/adjacent ranges are merged; random order uses the existing LCG walk extended over the merged ranges (every port visited exactly once), serial order follows the input order and skips duplicates. Reversed ranges (`300-200`) are now rejected instead of underflowing.

`range` in the config file keeps accepting the old `{ start = 1, end = 1000 }` table and additionally accepts `"1-500,1000-2500"` or `[[1, 500], [1000, 2500]]`.

Library API: `input::PortRange { start, end }` is replaced by `input::PortRanges(Vec<(u16, u16)>)`; `PortStrategy::pick` keeps its signature otherwise.

Fixes #835.

Co-authored-by: Autumn Skerritt <[email protected]>
2026-10-01 20:09:16 +09:00
Niklas Saari c027ebc7da test(address): cover CIDR notation with host bits set (#899)
Add regression tests for CIDR inputs whose host bits are set (e.g. `192.168.1.13/29` -> 192.168.1.8–15, `192.168.1.5/23`, `10.0.0.7/30`). The parsing itself was already fixed on master by 3bdac9c (IpInet accepts host bits), so the proposed normalize_cidr helper was dropped as unreachable.
2026-10-01 19:59:17 +09:00
DanDrewManand0xxreacher 183eafd22e fix: honor configured batch size on Windows and reject unsupported --ulimit (#921)
On native Windows, use the configured `-b/--batch-size` instead of a hard-coded 3000, and report the effective batch size (not the raw CLI value) in the "no open ports" hint on all platforms. `--ulimit` is hidden from Windows help and rejected on Windows (exit code 2), including when it comes from the config file. Unix batch-size/ulimit inference is unchanged.

Effective-batch-size reporting fix originally identified by @0xxreacher in #905.

Co-authored-by: 0xxreacher <[email protected]>
2026-10-01 19:57:28 +09:00
ChrisJr404 e497adf530 fix(config): use canonical XDG path for default config (#904)
Look for the config file at the XDG-style `$XDG_CONFIG_HOME/rustscan/config.toml` first (via `dirs::config_dir()`, so the platform equivalent on macOS/Windows), then fall back to the previous `$XDG_CONFIG_HOME/.rustscan.toml` and `~/.rustscan.toml` locations so existing configs keep working.

Fixes #741.
2026-10-01 19:55:08 +09:00
Chase Dustin 9ef667caed perf(scanner): precompute UDP payload lookup (#886)
Build a port -> payload lookup once per UDP scan instead of cloning the whole nmap payload BTreeMap into every scanned socket and scanning it linearly. Payload selection keeps the previous "last match wins" semantics.

Adds a socket-free micro-benchmark (benches/benchmark_helpers.rs) and lookup tests (tests/udp_payload_lookup.rs).
2026-10-01 19:54:38 +09:00
Andrew Barnes 002f736073 fix: keep library scans quiet by default (#916)
`Scanner` no longer prints each open socket to stdout by default, so library users can embed it and use the returned sockets without unsolicited output. The CLI opts in via the new `Scanner::with_open_port_output()` builder. The UDP socket bind error is now logged at debug level instead of printed.

Fixes #706.
2026-10-01 19:52:04 +09:00
kyd 1c2a982320 fix(build): decode literal text in UDP payload probes (#938)
Rewrite the nmap-payloads decoder in build.rs to follow Nmap's C-style escape format: `\xNN` and single-character escapes are decoded, all other characters are kept literally, and multi-line quoted segments are concatenated. Literal protocol text (e.g. the SNMP `public` community string, NetBIOS names, SSDP headers) was previously dropped, producing malformed probes. Also strip CR line endings when reading nmap-payloads.

Adds regression tests pinning the SNMP (161) and SSDP (1900) probe bytes.

Fixes #933.
2026-10-01 19:48:04 +09:00
jk 9644b3a2cd fix: exit quietly on closed stdout and survive missing SystemRoot (#941)
Route all user-facing stdout writes through tui::println_safe, which exits 0 on BrokenPipe (e.g. `rustscan -g ... | head`) instead of panicking (fatal under panic = "abort"). On Windows, skip hickory-resolver's system configuration and hosts file when SystemRoot is unset, falling back to the existing cloudflare_tls resolver.

Fixes #939, fixes #940.
2026-10-01 19:43:53 +09:00
herbenderblerandAutumn Skerritt a21bbb31bb ci: run the test suite on arm64 Linux runners (#868)
Add the GitHub-hosted ubuntu-24.04-arm runner to the test matrix so the suite runs natively on arm64 Linux (macos-latest already covers arm64 macOS; build.yml already cross-builds armv7/aarch64 Linux binaries), and document ARM support in docs/arm-support.md.

Fixes #683.

Co-authored-by: Autumn Skerritt <[email protected]>
2026-10-01 19:42:49 +09:00
Brad CowieandAutumn Skerritt 8b143f8ad7 ci: upload build artifacts to GitHub releases (#858)
Build release archives with houseabsolute/actions-rust-release and publish them (plus the .deb and checksums) to the GitHub release when a tag is pushed. CD now runs on pushes to master and tags only.

Also: read-only default workflow token (publish job gets contents: write), third-party actions pinned to release SHAs, fail on unmatched release assets, and the disabled trigger-less dependabot auto-merge workflow is removed.

Fixes #700, fixes #801.

Co-authored-by: Autumn Skerritt <[email protected]>
2026-10-01 19:41:56 +09:00
Sujyot KambleandAutumn Skerritt 111316f446 ci: replace deprecated actions-rs toolchain in test workflow (#853)
Replace the deprecated actions-rs/toolchain action with actions-rust-lang/setup-rust-toolchain (pinned to v1.17.0, clippy + rustfmt components, built-in cache and default RUSTFLAGS disabled) and restrict the workflow token to contents: read.

Co-authored-by: Autumn Skerritt <[email protected]>
2026-10-01 19:32:38 +09:00
Autumn (Bee) 8be97b841d test: clean obsolete executable fixtures and CI hooks (#943) 2026-10-01 18:05:37 +09:00
Autumn (Bee) 7446a42e56 test: remove network scans and external script execution (#942) 2026-10-01 17:44:10 +09:00
Autumn (Bee) e9ba3fa547 Merge pull request #935 from rezamqds/master
Fixes a typo in the Scriptfile parser comment (Sriptfile → Scriptfile) and improves the wording for clarity.
2026-09-21 19:26:33 +09:00
rezamqds 9a45d26e99 Fix typo in Scriptfile comment
Fix typo in comment about Scriptfile parser
2026-09-20 17:28:35 +03:30
rezamqds 6cb99747e1 Fix typo in Scriptfile comment
Clarify comment on scriptfile parser behavior
2026-09-20 17:28:31 +03:30
rezamqds bc80fbbad4 Fix typo in Scriptfile comment
Fix comment for clarity in test_script.py
2026-09-20 17:27:10 +03:30
rezamqds 3168580b86 Fix typo in Scriptfile comment
Fix comment for clarity in test_script.pl
2026-09-20 17:24:58 +03:30
Autumn (Bee) 2e78c22644 Merge pull request #930 from bee-san/fix/dependabot-clippy
chore: merge Dependabot updates and restore stable Clippy checks
2026-09-16 15:31:58 +09:00
Autumn Skerritt 996f818b5e Merge remote-tracking branch 'origin/dependabot/cargo/log-0.4.34' into fix/dependabot-clippy 2026-09-16 06:13:58 +00:00
Autumn Skerritt 90c5c1766b Merge commit '55c9f2a1c87b63f23363f6626954b871bbf4ab8e' into fix/dependabot-clippy 2026-09-16 06:13:37 +00:00
Autumn Skerritt f570d9ff8e Merge commit 'ce880ebe8c83be476d217f96ca26c2f90e6261c3' into fix/dependabot-clippy 2026-09-16 06:13:36 +00:00
Autumn Skerritt 42a3c87c83 Merge commit '64f60a97eddd7a0445be732175f272960ae1bd08' into fix/dependabot-clippy
# Conflicts:
#	Cargo.toml
2026-09-16 06:13:36 +00:00
Autumn Skerritt 1e93f44d8b Merge commit 'a084c1b3b9d6831074ff1929316a14a510e32430' into fix/dependabot-clippy 2026-09-16 06:12:26 +00:00
Autumn Skerritt bf290d7c7f Merge commit 'c668636a619ca96906be7d0b2aaf4ed0356560e3' into fix/dependabot-clippy 2026-09-16 06:12:26 +00:00
Autumn Skerritt 160dc7a3a2 Merge commit '730f709fd631955582993bc03d2aab5f580aa63c' into fix/dependabot-clippy 2026-09-16 06:12:26 +00:00
Autumn Skerritt 2d52f239ca Merge commit '827acd9cb00255662954cc36b5a90f6dbe5ba54f' into fix/dependabot-clippy 2026-09-16 06:12:26 +00:00
Autumn Skerritt 5900974fda Merge commit 'f9bc5abf212d85154d91b973f4761ac62950db11' into fix/dependabot-clippy 2026-09-16 06:12:26 +00:00
Autumn Skerritt d0d388c813 Merge commit '82c1a9373adfce5345c1745f90c9984656fbadc3' into fix/dependabot-clippy 2026-09-16 06:12:26 +00:00
Autumn Skerritt 5492dd729c fix: satisfy current stable Clippy without suppressing checks 2026-09-16 06:12:25 +00:00
Autumn Skerritt b84f1fa046 Merge remote-tracking branch 'origin/master' into fix/dependabot-clippy 2026-09-16 06:05:38 +00:00
dependabot[bot] 3d4db2b6a1 build(deps): bump log from 0.4.32 to 0.4.34
Bumps [log](https://github.com/rust-lang/log) from 0.4.32 to 0.4.34.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.32...0.4.34)

---
updated-dependencies:
- dependency-name: log
  dependency-version: 0.4.34
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-09-16 06:05:03 +00:00
dependabot[bot] 1967598d96 build(deps): bump dirs from 6.0.0 to 7.0.0 (#924)
Bumps dirs from 6.0.0 to 7.0.0.

---
updated-dependencies:
- dependency-name: dirs
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-16 15:02:40 +09:00
dependabot[bot] 94be5711d9 build(deps): bump toml from 1.1.2+spec-1.1.0 to 1.1.5+spec-1.1.0
Bumps [toml](https://github.com/toml-rs/toml) from 1.1.2+spec-1.1.0 to 1.1.5+spec-1.1.0.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v1.1.2...toml-v1.1.5)

---
updated-dependencies:
- dependency-name: toml
  dependency-version: 1.1.5+spec-1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-09-07 09:03:00 +00:00