Thu 12 Aug 2021

A fast port scanner in 100 lines of Rust

To write a fast port scanner, a programming language requires:

  • A Good I/O model, not to eat all the resources of the system.
  • High-level abstractions and a good packaging system to isolate low-level code and reuse it easily.
  • To be type and memory safe, because who wants offensive tools with vulnerabilities?
  • And, ideally, to be compiled, because most of the time, it’s worth trading a little bit of compile time for extreme runtime speed.

Guess what? These are precisely Rust’s selling points. So let see how to build a high-speed port scanner in 100 lines of Rust.

Source: A fast port scanner in 100 lines of Rust, an article by Sylvain Kerkour.