Nmap Development mailing list archives

Re: Ncat/nsock TTL feature request


From: Henri Doreau <henri.doreau () gmail com>
Date: Wed, 19 Dec 2012 22:57:45 +0100

2012/12/19 Daniele Iamartino <danieleiamartino () gmail com>:
Hello,
ncat it's really a powerful tool, I use it quite everyday, really
thanks for this cool project!
For some network tests (e.g. NAT traversal hole punching) I sometimes
need to choose the TTL value (IPv6) or hop limit (IPv6). Why don't add
the possibility to choose this value in ncat using, let's say, -T
<value> option ?
Implementing it shouldn't be so hard since it's just a setsockopt like:

setsockopt(sock, IPPROTO_IP, IP_TTL, &(ttl), sizeof(ttl));
or
setsockopt(sock, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &(ttl), sizeof(ttl));

nsock should also be modified.

I would send the patch by myself but I know nmap/ncat more as a user
than as a developer and I'm still reviewing the code.

Anyone else supporting this feature request?

Thanks

- --
Daniele Iamartino
(aka Otacon22)

Hello,

could you elaborate a bit on the use case you have?

In case you feel like giving a try at patching nsock, you should have
a look at nsock_iod.c, nsock_pool.c and nsock_connect.c. An IOD is an
internal nsock structure that represents the socket (the actual FD
being in nsi->sd, see nsock_internal.h).

Regards

-- 
Henri
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: