On Mon, Feb 06, 2012 at 04:47:45AM +0000, Mark Lumsden wrote: > There is a CAVEAT section in the man page that should also be > amended, I suspect.
Heh, whoops. :) > Although useless on the initaiting machine, is it of any use to > be able to scan a range of UDP ports, for diagnotic reasons, and > to see what is received (or not) on the receiving machine? As in, > can anything be infered from the opens reaching (or not) > the scanned machine? >From what I can tell, no traffic is actually generated on the initaiting machine.. nothing in tcpdump anyway. The output from -z -u is entirely bogus, even shows "succeeded!" for nonexistent hosts. -Bryan. Index: nc.1 =================================================================== RCS file: /cvs/src/usr.bin/nc/nc.1,v retrieving revision 1.59 diff -u -p -u -r1.59 nc.1 --- nc.1 4 Oct 2011 08:34:34 -0000 1.59 +++ nc.1 6 Feb 2012 05:19:41 -0000 @@ -258,7 +258,9 @@ Specifies that should just scan for listening daemons, without sending any data to them. It is an error to use this option in conjunction with the .Fl l -option. +or +.Fl u +options. .El .Pp .Ar destination @@ -448,9 +450,3 @@ Original implementation by *Hobbit* .br Rewritten with IPv6 support by .An Eric Jackson Aq [email protected] . -.Sh CAVEATS -UDP port scans will always succeed -(i.e. report the port as open), -rendering the -.Fl uz -combination of flags relatively useless. Index: netcat.c =================================================================== RCS file: /cvs/src/usr.bin/nc/netcat.c,v retrieving revision 1.103 diff -u -p -u -r1.103 netcat.c --- netcat.c 4 Oct 2011 08:34:34 -0000 1.103 +++ netcat.c 6 Feb 2012 05:19:41 -0000 @@ -276,6 +276,8 @@ main(int argc, char *argv[]) errx(1, "cannot use -p and -l"); if (lflag && zflag) errx(1, "cannot use -z and -l"); + if (uflag && zflag) + errx(1, "cannot use -z and -u"); if (!lflag && kflag) errx(1, "must use -l with -k");
