gscan
gscan is a lightweight, async-powered network port scanning library written in Rust.
It uses an internal asynchronous engine (powered by Tokio) to perform fast TCP port scans, while exposing a simple, blocking API suitable for small tools, scripts, and experiments.
Features
- Asynchronous core: Uses Tokio to scan many ports concurrently
- Simple API: No
async,await, or#[tokio::main]required by the caller - Bounded concurrency: Prevents resource exhaustion during large scans
- Timeout-based scanning: Avoids hanging connections
- Structured results: Returns parsed IP addresses and sorted port lists
Installation
Add this to your Cargo.toml:
[]
= "0.1.5"
Example: Scanning a Local Range
The library exposes a single public scanning function:
ScanResult Structure
Example: Scanning a Local Port Range
use gscan;
License
Distributed under the MIT License.