From 8649f07a7c41d8e907c52a3d46115d6d7577d53d Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 3 May 2017 03:56:41 +0000 Subject: [PATCH] noshutdown handling was missing for connect mode --- CHANGELOG | 3 +++ ncat/ncat_connect.c | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 90f8597f6..97f75a535 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # Nmap Changelog ($Id$); -*-text-*- +o [Ncat] The --no-shutdown option now also works in connect mode, not only in + listen mode. + o [NSE] New script argument "vulns.short" will reduce vulns library script output to a single line containing the target name or IP, the vulnerability state, and the CVE ID or title of the vulnerability. [Daniel Miller] diff --git a/ncat/ncat_connect.c b/ncat/ncat_connect.c index b7773bd57..b03d7f818 100644 --- a/ncat/ncat_connect.c +++ b/ncat/ncat_connect.c @@ -1216,6 +1216,7 @@ static void read_stdin_handler(nsock_pool nsp, nsock_event evt, void *data) if (status == NSE_STATUS_EOF) { + if (!o.noshutdown) shutdown(nsock_iod_get_sd(cs.sock_nsi), SHUT_WR); /* In --send-only mode or non-TCP mode, exit after EOF on stdin. */ if (o.proto != IPPROTO_TCP || (o.proto == IPPROTO_TCP && o.sendonly))