1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 23:49:03 +00:00

getting closer to 4.20ALPHA9

This commit is contained in:
fyodor
2006-10-14 01:25:43 +00:00
parent 25bbd2983d
commit e4ee4d5e4c
13 changed files with 93 additions and 64 deletions

View File

@@ -473,7 +473,12 @@ void printportoutput(Target *currenths, PortList *plist) {
if (prevstate == PORT_UNKNOWN)
log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, "Not shown: ");
else log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, ", ");
log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, "%d %s %s", plist->getStateCounts(istate), statenum2str(istate), o.ipprotscan? "protocols": "ports");
char desc[32];
if (o.ipprotscan)
snprintf(desc, sizeof(desc), (plist->getStateCounts(istate) == 1)? "protocol" : "protocols");
else
snprintf(desc, sizeof(desc), (plist->getStateCounts(istate) == 1)? "port" : "ports");
log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, "%d %s %s", plist->getStateCounts(istate), statenum2str(istate), desc);
prevstate = istate;
}
if (prevstate != PORT_UNKNOWN) log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, "\n");