add: multi scan

This commit is contained in:
2025-07-02 07:09:54 -05:00
parent a5d663fa9a
commit afde93c7cf
8 changed files with 133 additions and 104 deletions

View File

@ -4,26 +4,26 @@
#include "host.h"
typedef enum {
SCAN_NULL,
SCAN_SYN,
SCAN_ACK,
SCAN_FIN,
SCAN_XMAS,
SCAN_UDP,
SCAN_ALL,
} e_scantype;
#define SCAN_NULL (1 << 0)
#define SCAN_SYN (1 << 1)
#define SCAN_ACK (1 << 2)
#define SCAN_FIN (1 << 3)
#define SCAN_XMAS (1 << 4)
#define SCAN_UDP (1 << 5)
#define SCAN_ALL (SCAN_NULL | SCAN_SYN | SCAN_ACK | SCAN_FIN | SCAN_XMAS | SCAN_UDP)
[[__maybe_unused__]] static const char *types_str[] = {
"NULL", "SYN", "ACK", "FIN", "XMAS", "UDP",
};
#define NB_SCAN (sizeof(types_str) / sizeof(*types_str))
struct scan {
struct host host;
char *dest_addr;
uint16_t port_start;
uint16_t port_end;
e_scantype type;
uint8_t type;
uint8_t ttl;
uint8_t max_retries;
struct response *responses;