1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 08:31:32 +00:00

Fix the message printed when a host is skipped, for example on Windows when

attempting to scan localhost. It used to look like
  All 0 scanned ports on 127.0.0.1 are 
("Are what?") Now it looks like
  0 ports scanned on 127.0.0.1
This commit is contained in:
david
2007-12-14 09:53:42 +00:00
parent c517a80acd
commit b131ed23fa
2 changed files with 27 additions and 16 deletions

View File

@@ -1,5 +1,12 @@
# Nmap Changelog ($Id$); -*-text-*- # Nmap Changelog ($Id$); -*-text-*-
o Fixed an output problem that showed itself on Windows when attempting
to scan localhost, which is skipped. The problem looked like
All 0 scanned ports on 127.0.0.1 are
("Are what?") Now it looks like
0 ports scanned on 127.0.0.1
Rob Nicholls reported the problem.
o Fixed a bug that prevented the --resume option from working on o Fixed a bug that prevented the --resume option from working on
Windows. A symptom of the bug was an error message that looks like Windows. A symptom of the bug was an error message that looks like
..\utils.cc(996): CreateFileMapping(), file 'testresume', length 103, ..\utils.cc(996): CreateFileMapping(), file 'testresume', length 103,

View File

@@ -466,6 +466,9 @@ void printportoutput(Target *currenths, PortList *plist) {
} }
if (numignoredports == plist->numports) { if (numignoredports == plist->numports) {
if (numignoredports == 0) {
log_write(LOG_PLAIN, "0 ports scanned on %s\n", currenths->NameIP(hostname, sizeof(hostname)));
} else {
log_write(LOG_PLAIN, log_write(LOG_PLAIN,
"%s %d scanned %s on %s %s ", "%s %d scanned %s on %s %s ",
(numignoredports == 1)? "The" : "All", numignoredports, (numignoredports == 1)? "The" : "All", numignoredports,
@@ -485,6 +488,7 @@ void printportoutput(Target *currenths, PortList *plist) {
if(o.reason) if(o.reason)
print_state_summary(plist, STATE_REASON_EMPTY); print_state_summary(plist, STATE_REASON_EMPTY);
log_write(LOG_PLAIN, "\n"); log_write(LOG_PLAIN, "\n");
}
log_write(LOG_MACHINE,"Host: %s (%s)\tStatus: Up", log_write(LOG_MACHINE,"Host: %s (%s)\tStatus: Up",
currenths->targetipstr(), currenths->HostName()); currenths->targetipstr(), currenths->HostName());