Simple reimplementation of the command nmap
in C.
ft_nmap is a network scanning tool modeled after nmap
. It supports both IPv4 and IPv6, capable of executing various TCP
(ACK, SYN, FIN, NULL, XMAS) and UDP
scans. Besides port scanning, it can perform service detection, traceroute, uptime detection and ping scans. It's able to be threaded up to 250 threads.
Do make
and then run :
sudo ./ft_nmap [-h6urvVm] [-p ports] [-s techniques] [-f file] [-t threads] <host>
You are requiered to run the program with sudo because the program uses raw sockets (
SOCK_RAW
with the socket function for the sending socket).
The following options and arguments are handled by the program:
options:
-h: display this help
-p <ports>: scan the specified ports (default: 1-1024, eg. 1-5,80)
-s <techniques>: scan with the specified techniques (default: ASFNXU)
A: ACK, S: SYN, F: FIN, N: NULL, X: XMAS, U: UDP
-f <file>: scan the specified hosts within the file (<host> not needed)
-t <threads>: scan with the specified amount of threads (default: 0)
-6: use IPv6
-u: ping host before scanning
-r: traceroute host before scanning
-v: verbose mode
-V: very verbose mode
-m: check the uptime of the host
arguments:
<host>: host to scan
First of, you should read the docs recommended in our ft_ping and ft_traceroute projects.
The only documentation we used for this project is from nmap.org, which is the official documentation of the nmap
command. It's very complete and explains everything you need to know about network scanning.
We have made simple diagrams for each scan techniques, which you can find below:
Alexandre Hallaine (ahallain) |
Assxios (droge) |