Relative Content

Tag Archive for rustportnmapport-scanning

Scanning a specific range of ports by default in Rust

I’m trying to build an nmap-like CLI port scanning tool in Rust. I want to ensure that if the user doesn’t pass the optional –ports flag in their command, the tool scans a range of commonly used ports and outputs their state, service and other relevant information. However, when no –ports flag is passed, I’m scanning a very large number of ports instead of the commonly used ports. This is what the output looks like for the command cargo run -- --host scanme.nmap.org: