Nmap Development mailing list archives

Re: Ncat/nsock TTL feature request


From: David Fifield <david () bamsoftware com>
Date: Wed, 19 Dec 2012 13:38:30 -0800

On Wed, Dec 19, 2012 at 06:09:56PM +0900, Daniele Iamartino wrote:
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.

-T isn't a good option to use because other netcats use it for "type of
service." --ttl would be better to match the Nmap option.

Speaking of which, such a facility in Nsock would be nice so that --ttl
will take effect within the Nmap phases that are handled by Nsock.

If you can make a patch for this, and it's not very disruptive, we'll
consider integrating it.

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


Current thread: