diff --git a/CHANGELOG b/CHANGELOG index 26fffc9f6..1d15833ec 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,11 @@ # Nmap Changelog ($Id$); -*-text-*- +o Print service info in grepable output for ports which are not listed in + nmap-services when a service tunnel (SSL) is detected. Previously, the + service info ("ssl|unknown") was not printed unless the service inside the + tunnel was positively identified. http://seclists.org/nmap-dev/2015/q4/260 + [Daniel Miller] + o Extend libnetutil's isipprivate function to check for 169.254/16 RFC3927 addresses. [Bill Parker] diff --git a/output.cc b/output.cc index c035e5af3..e7b259162 100644 --- a/output.cc +++ b/output.cc @@ -796,15 +796,16 @@ void printportoutput(Target *currenths, PortList *plist) { *p = '|'; p++; } - if (!sd.name) - serviceinfo[0] = '\0'; - else { + if (sd.name || sd.service_fp || sd.service_tunnel != SERVICE_TUNNEL_NONE) { p = serviceinfo; while ((p = strchr(p, '/'))) { *p = '|'; p++; } } + else { + serviceinfo[0] = '\0'; + } log_write(LOG_MACHINE, "%d/%s/%s//%s//%s/", current->portno, state, protocol, serviceinfo, grepvers);