Nmap Development mailing list archives
Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10
From: David Fifield <david () bamsoftware com>
Date: Mon, 11 Jan 2010 15:05:04 -0700
On Fri, Jan 08, 2010 at 01:33:19PM -0800, Fyodor wrote:
On Fri, Jan 08, 2010 at 05:32:00PM +0100, Denys Vlasenko wrote:Hi, Every reimplementation of netcat seems to try to break this syntax: nc -l -p 123 # listen on local port 123 GNU nc, openbsd's nc all have it broken. And ncat is no exception. "You too, Brutus". IIRC they even break it in different ways - they have different ways to specify local port: as a parameter to -l option, as a standalone port parameter etc... AARRGGHH... This makes users' lives harder for no apparent benefit.One difference between ncat and those other reimplementations is that we don't use the name "nc". So you can have both installed at once, and if you specifically request "ncat", then you know what syntax you're going to get. I think our syntax for listening on port 123 ("ncat -l 123") is preferable to the longer "nc -l -p 123". And as David noted, we do give an error message which explains the problem if you try to use -p with -l. That being said, I also agree with David that it would be reasonable for us to just "do what the user wants" in the -l -p case. At least as long as the code change is simple. I think a warning message would still be warranted, at least in verbose mode.
I committed the code to make -p set the listen port. I also made it an error if you try to give more than one port, like ncat -l 80 443 ncat -l -p 80 443 I don't know what to print as a warning. "You don't need the -p with Ncat"? It makes me think of Google's "Save time by hitting the return key instead of clicking on the search button." David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10, (continued)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Denys Vlasenko (Jan 10)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Kris Katterjohn (Jan 10)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Denys Vlasenko (Jan 10)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Kris Katterjohn (Jan 10)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Denys Vlasenko (Jan 10)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Fyodor (Jan 12)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Jon Kibler (Jan 11)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Ron (Jan 11)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 bensonk (Jan 11)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Daniel Roethlisberger (Jan 10)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Ron (Jan 11)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 Denys Vlasenko (Jan 13)
- Re: ncat 5.10BETA handling of -l -p is not compatible with nc-1.10 DePriest, Jason R. (Jan 11)