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

Include service information in -oX and -oM even without -sV.

This is by Daniel Miller.
http://seclists.org/nmap-dev/2012/q1/731
This commit is contained in:
david
2012-04-03 01:28:32 +00:00
parent fd80c2d0a6
commit f813b50a4d
3 changed files with 9 additions and 11 deletions

View File

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

View File

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

View File

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