From 5b010f927a2561c05b11ae4e5e1baeb70793047a Mon Sep 17 00:00:00 2001 From: david Date: Thu, 11 Nov 2010 23:24:59 +0000 Subject: [PATCH] o XML output now excludes output for down hosts when doing host discovery only, except in verbose mode. This is how it already worked for normal scans, but the ping-only case was overlooked. [David] --- CHANGELOG | 5 +++++ nmap.cc | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 15e0d9f70..5edae6d94 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,10 @@ # Nmap Changelog ($Id$); -*-text-*- +o XML output now excludes output for down hosts when doing host + discovery only, except in verbose mode. This is how it already + worked for normal scans, but the ping-only case was overlooked. + [David] + o [NSE] Added a new Web Service Dynamic Discovery library (wsdd) and the two scripts broadcast-wsdd-discover and wsdd-discover. [Patrik] diff --git a/nmap.cc b/nmap.cc index 5d71e1e23..fe9e0d3b1 100644 --- a/nmap.cc +++ b/nmap.cc @@ -1682,15 +1682,17 @@ int nmap_main(int argc, char *argv[]) { #endif ) || o.listscan) { /* We're done with the hosts */ - xml_start_tag("host"); - write_host_header(currenths); - printmacinfo(currenths); - // if (currenths->flags & HOST_UP) - // log_write(LOG_PLAIN,"\n"); - printtimes(currenths); - xml_end_tag(); - xml_newline(); - log_flush_all(); + if (currenths->flags & HOST_UP || o.verbose) { + xml_start_tag("host"); + write_host_header(currenths); + printmacinfo(currenths); + // if (currenths->flags & HOST_UP) + // log_write(LOG_PLAIN,"\n"); + printtimes(currenths); + xml_end_tag(); + xml_newline(); + log_flush_all(); + } delete currenths; o.numhosts_scanned++; continue;