MSYS2-pacman icon indicating copy to clipboard operation
MSYS2-pacman copied to clipboard

gnu-netcat breaks on various ports

Open elieux opened this issue 8 years ago • 2 comments

While netcat localhost http and netcat localhost smtp work fine, for example netcat localhost imap (as well as netcat localhost 143) fails:

$ netcat localhost imap
assertion "dst->netnum == servent->s_port" failed: file "network.c", line 226, function: netcat_getport
Aborted (core dumped)

This is different from the case when the port is just closed:

$ netcat localhost 42
assertion "ret == 0" failed: file "core.c", line 372, function: core_tcp_connect
Aborted (core dumped)

elieux avatar Apr 08 '16 12:04 elieux

This isn't a solution for gnu-netcat, but you can grab a build of Ncat, which should support everything gnu-netcat does, as well as actually working, since it's been updated within the past 12 years, unlike gnu-netcat. :wink:

https://nmap.org/download.html

CoolOppo avatar Apr 08 '16 16:04 CoolOppo

I am facing the same issue .. wondering if I should fix netcat or use the workaround proposed ?

pmalhaire avatar Apr 27 '17 15:04 pmalhaire