Print service info for unlisted ports when service tunnel is detected

This commit is contained in:
dmiller 2015-12-20 05:34:56 +00:00
parent 2450dee71e
commit dd0050598b
2 changed files with 10 additions and 3 deletions

View file

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

View file

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