mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +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:
parent
6992d545e1
commit
d3263f0f1a
1 changed files with 6 additions and 2 deletions
|
|
@ -751,8 +751,12 @@ void printportoutput(Target *currenths, PortList *plist) {
|
|||
|
||||
}
|
||||
/* log_write(LOG_PLAIN,"\n"); */
|
||||
if (plist->getStateCounts(istate) > 0)
|
||||
log_write(LOG_MACHINE, "\tIgnored State: %s (%d)", statenum2str(istate), plist->getStateCounts(istate));
|
||||
/* 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue