diff --git a/CHANGELOG b/CHANGELOG index c829fbf26..8f7bf51d6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ # Nmap Changelog ($Id$); -*-text-*- +o Service-scan information is now included in XML and grepable output + even if -sV wasn't used. This information can be set by scripts in the + absence of -sV. [Daniel Miller] + o [NSE] Added the script dns-ip6-arpa-scan which uses a very efficient technique to scan the ip6.arpa zone for PTR records. [Patrik Karlsson] diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index f5a624f38..60913fe4a 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -603,16 +603,10 @@ static int l_set_port_version (lua_State *L) else luaL_error(L, "port.version 'cpe' field must be a table"); - if (o.servicescan) - target->ports.setServiceProbeResults(p->portno, p->proto, - probestate, name, tunnel, product, - version, extrainfo, hostname, ostype, devicetype, - (cpe.size() > 0) ? &cpe : NULL, NULL); - else - target->ports.setServiceProbeResults(p->portno, p->proto, - probestate, name, tunnel, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL); - + target->ports.setServiceProbeResults(p->portno, p->proto, + probestate, name, tunnel, product, + version, extrainfo, hostname, ostype, devicetype, + (cpe.size() > 0) ? &cpe : NULL, NULL); return 0; } diff --git a/output.cc b/output.cc index 91ec98435..f98e84b2f 100644 --- a/output.cc +++ b/output.cc @@ -739,7 +739,7 @@ void printportoutput(Target *currenths, PortList *plist) { Tbl->addItem(rowno, reasoncol, true, port_reason_str(current->reason)); sd.populateFullVersionString(fullversion, sizeof(fullversion)); - if (*fullversion) + if (*fullversion && versioncol > 0) Tbl->addItem(rowno, versioncol, true, fullversion); // How should we escape illegal chars in grepable output?