An asynchronous network scanner in Rust that scans IP addresses and port ranges, collects banner information, and identifies CVE vulnerabilities (Common Vulnerabilities and Exposures). Optionally, results can be saved as a JSON file.
- π Asynchronous network scanning with configurable concurrency and timeout
- π§Ύ Banner detection to identify service information (e.g., HTTP servers)
- π CVE detection via Vulners API (optional)
- πΎ Output as JSON file
- βοΈ CLI using Clap
- π (Optional) REST API with Rocket
tokioβ Asynchronous runtimerocketβ Web framework (optional)reqwestβ HTTP clientserdeβ Serialization/Deserializationanyhowβ Error handlingclapβ CLI argument parsing
git clone https://github.com/dein-benutzername/rust-network-scanner.git
cd rust-network-scanner
cargo build --releasecargo run -- scan \
192.168.1.1 \
--ports 80,443,22 \
--timeout 1000 \
--concurrency 200 \
--cve \
--output output.json| Argument | Description |
|---|---|
target |
Target IP or range (e.g 192.168.0.1, 10.0.0.0/24) |
--ports |
Comma-separated list of ports or ranges (80, 22-25, 443) |
--timeout |
Timeout per connection (ms) [default: 500] |
--concurrency |
Number of parallel connections [default: 100] |
--cve |
Enable CVE detection |
--output |
Optional path to JSON output file |
src/
βββ cli/ # Command-line parsing
βββ network/ # Network functions: scanning, CVE queries, etc.
βββ services/ # File-writing services, etc.
βββ routes/ # Optional Rocket API endpoints
βββ thread_executor/ # Parallel processing
βββ models/ # Structs & data models
βββ main.rs # Entry pointThe scanner integrates the Vulners API to detect vulnerabilities based on service banners (e.g., Apache/2.4.41).
The code is prepared to run as a REST API using Rocket. To enable the API, uncomment the following section in main.rs:
#[launch]
fn rocket() -> _ {
rocket::build()
.mount("/api", routes::scan::routes())
.mount("/api", routes::health::routes())
}π‘ Security
The scanner can be linked with vulnerability databases like Vulners to identify known vulnerabilities based on banners or server information.
MIT β feel free to use, modify, and share.