pscan

Crates.iopscan
lib.rspscan
version0.1.0
created_at2025-12-31 00:22:13.663713+00
updated_at2025-12-31 00:22:13.663713+00
descriptionSYN Port Scanner written in Rust, with range and decoy scanning support.
homepage
repository
max_upload_size
id2013667
size40,329
Bastián Valencia (bsttiv)

documentation

README

PScan - Port Scanner written in Rust

PScan is a Rust SYN Port Scanner. More specifically, it uses the SYN Port Scanning technique to probe a server for open ports.

Pscan also includes the Decoy spoofing option (like the Nmap option). I am also planning to implement Banner Scanning.

Disclaimer

I wrote this program as a personal project merely for educational purposes. For professional objectives, prefer other tools such as the well known Nmap or Armada (also written in Rust).

Usage

First, to install pscan, run

foo@bar:~$ cargo install pscan

Then, you must give CAP_NET_RAW Linux capability to pscan binary:

foo@bar:~$ sudo setcap 'cap_net_raw+ep' /path/to/pscan

Then, check the help flag to see all the options

foo@bar:~$ pscan -h
SYN Port Scanner written in Rust, with range and decoy scanning support.

Usage: pscan [OPTIONS] --target <TARGET> --port <PORT> --interface <INTERFACE>

Options:
  -t, --target <TARGET>
  -p, --port <PORT>
  -i, --interface <INTERFACE>
  -d, --decoy <DECOY>
      --interfaces
  -h, --help                   Print help
  -V, --version                Print version

Want to see the interfaces you can use for port scanning?

foo@bar:~$ pscan --interfaces
- Interface name: lo | Interface MAC: 00:00:00:00:00:00 | Interface IPs: 127.0.0.1
- ...

Then you can scan a target ip (example 0.0.0.0) for open ports (range 1-443) with your interface (lets say eth0) like this:

foo@bar:~$ pscan -t 0.0.0.0 -p 1-443 -i eth0
Open port: 0.0.0.0:80

TODO

  • Better error handling
  • Maybe sending the RST request back after a SYN + ACK response
  • Complete the decoy implementation
  • Optimize the timeout for each request
  • Make the program end (LOL)

References

Commit count: 0

cargo fmt