Quick Network Scanner Library
Rust library for scanning network hosts asynchronously.
Currently only TCP connect scan is supported.
NOTE: you may need to increase the maximum allowed open files. E.g.:
See the library on crates.io.
Usage
Dependencies (Cargo.toml):
and then (src/main.rs):
use QScanner;
use Runtime;
tcp_cs
The project provides a simple scanner utility called tcp_cs that can be build
and used as follow:
See the help message for all the available options:
)
And here are a few usage examples:
# Single target, multiple port
# Scan local lan for SSH (assuming 192.168.1.0/24). In this case we reduce the
# timeout to 500ms.
# Use a domain name as target
# Use a file as target, the file must contain a target (IP, cidr or domain name)
# for each line
Docker Image
It's possible to build and use a Docker image configured for running tcp_cs.
NOTE: currently only Linux has been tested for building the Docker image.
Assuming Docker is installed on your machine and configured to run without sudo (if not, see here and here), proceed by building the image:
Then you can use the 0xor0ne/qscan Docker image for running the scanner:
the same thing can be done using the helper script:
Docker Image from hub.docker.com
Alternatively, it is possible to download and run a precompiled image from hub.docker.com:
Build Docker Image on MacOS (Experimental)
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc