Need a tcp scanner template/proof-of-concept in Rust? Here you go!
To use tcpscan-rs in your project, add a dependency to your Cargo.toml
tcpscan-rs = { git = "https://github.com/rustysec/tcpscan-rs.git" }
and
extern crate tcpscan_rs
use tcpscan_rs::Scanner
to the top of your source file
This project is now a Crate with a simple example included. You can build the the example by simple
cargo build --example simple
and invoking the executable as
./tcpscnanner 445,135,22 127.0.0.1,192.168.0.1,192.168.0.2
or simply
cargo run --example simple 445,135,22 127.0.0.1,192.168.0.1,192.168.0.2
This is a single threaded TCP scanner using futures-rs, metal io, and tokio to provide socket asynchronicity. The goal is to acheive similar functionality to a scanner written in C++ with Boost's ASIO. Obviously, there is a lot of work to be done here, and hopefully it will simply grow into a helper library (Crate) for easy inclusion into other projects.
I have tested this under linux x86 and x64 as well as 64bit Windows using x86_64-pc-windows-gnu
with mingw.