Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

alexandre-hallaine/ft_nmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft_nmap

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.

Usage

Do make and then run :

sudo ./ft_nmap [-h6urvVm] [-p ports] [-s techniques] [-f file] [-t threads] <host>

ft_nmap

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

Docs

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:

  • ACK: ACK

  • SYN: SYN

  • FIN NULL XMAS: FIN_NULL_XMAS

  • UDP: UDP

MADE WITH LOVE BY :


Alexandre Hallaine (ahallain)

Intra 42

Assxios (droge)

Intra 42

Releases

No releases published

Packages

No packages published

Languages