mirror of
https://github.com/nmap/nmap.git
synced 2025-12-20 14:39:02 +00:00
Fix grepable output "Ignored State" reporting. Only one ignored state (the one
with the highest numbers of ports) is output.
This commit is contained in:
@@ -751,8 +751,12 @@ void printportoutput(Target *currenths, PortList *plist) {
|
||||
|
||||
}
|
||||
/* log_write(LOG_PLAIN,"\n"); */
|
||||
/* Grepable output supports only one ignored state. */
|
||||
if (plist->numIgnoredStates() == 1) {
|
||||
istate = plist->nextIgnoredState(PORT_UNKNOWN);
|
||||
if (plist->getStateCounts(istate) > 0)
|
||||
log_write(LOG_MACHINE, "\tIgnored State: %s (%d)", statenum2str(istate), plist->getStateCounts(istate));
|
||||
}
|
||||
log_write(LOG_XML, "</ports>\n");
|
||||
|
||||
// Now we write the table for the user
|
||||
|
||||
Reference in New Issue
Block a user