4 ms·
Dammit, they have of course gone with the BSD syntax for opening a local listen socket (ncat -l 1234): https://nmap.org/book/ncat-man-examples.html https://nma
by vesinisa 6y ago
Dammit, they have of course gone with the BSD syntax for opening a local listen socket (ncat -l 1234):
https://nmap.org/book/ncat-man-examples.html https://nmap.org/book/ncat-man-examples.html
Means half of implemations use `-l -p 1234` and half `-l 1234`.
- cogburnd02 6y agoDoes BSD netcat give an error if you include the -p?
- vesinisa 6y agoYes, the manual explicitly notes that -p can not be used with -l: https://man.openbsd.org/nc.1 https://man.openbsd.org/nc.1 And this is indeed enforced, see line 424: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/netcat.c?annotate=1.217 http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/netc... However, at least Debian ships a ported version of BSD's netcat. They actually apply a patch to allow using -p and -s with -l for consistency with traditional netcat: https://sources.debian.org/patches/netcat-openbsd/1.217-3/use-flags-to-specify-listen-address.patch/ https://sources.debian.org/patches/netcat-openbsd/1.217-3/us...