Nmap Development mailing list archives

Re: ncat behavior


From: Jacek Wielemborek <d33tah () gmail com>
Date: Thu, 25 Jun 2015 16:09:37 +0200

W dniu 25.06.2015 o 16:06, Michal Hlavinka pisze:
Hi,
I'm thinking if ncat's client behavior, when it closes stdout, instead
of terminating, when server closed the socket, is the best option. In
theory it looks good, to be still able to send data (half-closed
socket), but the problem is that ncat is not getting all information
about socket in that case. When server half-closes the socket and then
exits, the client is not notified until it sends data twice(it takes two
socket writes for the information to be propagated from kernel to
client). This leads to client hang.

The same thing (client hangs) happens if server terminates, because it
can't distinguish what exactly happened on the other side. As the need
for this (send data after server half-closed socket) is quite rare use
case, but terminating server is more usual, I think it's not worth it
the ill side effects and should be probably changed to client
termination when it reads eof. What is your opinion on this?

Regards,
Michal Hlavinka

+1. I personally don't like the current behavior and consider the way
Hobbit's netcat handles this as the more intuitive one. TBH I don't
understand why it's implemented this way right now.

Attachment: signature.asc
Description: OpenPGP digital signature

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

Current thread: