A simple TCP port scanner written in C. (now with multithreading!)
makeThe program will be created at ./build/port_sniffer.
You can create an alias in your shell for easier access.
./build/port_sniffer -t <target_ip> -p <port_or_range> [options]Scan a single port:
./build/port_sniffer -t 192.168.1.1 -p 80Scan a range:
./build/port_sniffer -t 192.168.1.1 -p 1-1024Show only open ports:
./build/port_sniffer -t 192.168.1.1 -p 1-1024 -o-t <ip>: Target IPv4 address-p <port>: Port or range (e.g.80or1-1024)-o: Show open ports only-n: Legacy scan mode (single-threaded, no port cap)-m: Scan local machine (not yet implemented)-h: Help
- Multithreaded by default using a thread pool (32 workers)
- Ports are corrected automatically if out of range (1-65535)
- Only one scan type flag can be set at a time, conflicts fall back to TCP
- Run with no args and get an interactive prompt to fill in options
- SYN scan using raw sockets
- UDP scan
- Local machine / default gateway scan with
-m - Actual help output for
-h