feature: ttl complete

This commit is contained in:
0x35c
2025-05-31 16:44:27 +02:00
parent dbed6dc7cd
commit 0f8d184aee

View File

@ -67,7 +67,7 @@ static void *create_packet(const struct scan *data, size_t packet_size)
iphdr->tot_len = packet_size; iphdr->tot_len = packet_size;
iphdr->id = htons(54321); iphdr->id = htons(54321);
iphdr->frag_off = 0; iphdr->frag_off = 0;
iphdr->ttl = 48; iphdr->ttl = data->ttl;
iphdr->protocol = isudp ? IPPROTO_UDP : IPPROTO_TCP; iphdr->protocol = isudp ? IPPROTO_UDP : IPPROTO_TCP;
iphdr->saddr = inet_addr(data->host->ip); iphdr->saddr = inet_addr(data->host->ip);
iphdr->daddr = inet_addr(data->dest_addr); iphdr->daddr = inet_addr(data->dest_addr);