1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

noshutdown handling was missing for connect mode

This commit is contained in:
dmiller
2017-05-03 03:56:41 +00:00
parent e09cb62439
commit 8649f07a7c
2 changed files with 4 additions and 0 deletions

View File

@@ -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]

View File

@@ -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))