Index: NmapOps.h =================================================================== --- NmapOps.h (revision 32633) +++ NmapOps.h (working copy) @@ -367,6 +367,7 @@ bool traceroute; bool reason; + bool incomplete; bool adler32; FILE *excludefd; char *exclude_spec; Index: nmap.cc =================================================================== --- nmap.cc (revision 32633) +++ nmap.cc (working copy) @@ -315,6 +315,7 @@ " -d: Increase debugging level (use -dd or more for greater effect)\n" " --reason: Display the reason a port is in a particular state\n" " --open: Only show open (or possibly open) ports\n" + " --incomplete: Display results obtained prior to host timeout\n" " --packet-trace: Show all packets sent and received\n" " --iflist: Print host interfaces and routes (for debugging)\n" " --log-errors: Log errors/warnings to the normal-format output file\n" @@ -608,6 +609,7 @@ {"ttl", required_argument, 0, 0}, /* Time to live */ {"traceroute", no_argument, 0, 0}, {"reason", no_argument, 0, 0}, + {"incomplete", no_argument, 0, 0}, {"allports", no_argument, 0, 0}, {"version_intensity", required_argument, 0, 0}, {"version-intensity", required_argument, 0, 0}, @@ -912,6 +914,8 @@ o.traceroute = true; } else if (strcmp(long_options[option_index].name, "reason") == 0) { o.reason = true; + } else if (strcmp(long_options[option_index].name, "incomplete") == 0) { + o.incomplete = true; } else if (optcmp(long_options[option_index].name, "min-rate") == 0) { if (sscanf(optarg, "%f", &o.min_packet_send_rate) != 1 || o.min_packet_send_rate <= 0.0) fatal("Argument to --min-rate must be a positive floating-point number"); @@ -1991,7 +1995,7 @@ for (targetno = 0; targetno < Targets.size(); targetno++) { currenths = Targets[targetno]; /* Now I can do the output and such for each host */ - if (currenths->timedOut(NULL)) { + if (currenths->timedOut(NULL) && !o.incomplete) { xml_open_start_tag("host"); xml_attribute("starttime", "%lu", (unsigned long) currenths->StartTime()); xml_attribute("endtime", "%lu", (unsigned long) currenths->EndTime()); Index: NmapOps.cc =================================================================== --- NmapOps.cc (revision 32633) +++ NmapOps.cc (working copy) @@ -343,6 +343,7 @@ gettimeofday(&start_time, NULL); pTrace = vTrace = false; reason = false; + incomplete = false; adler32 = false; if (datadir) free(datadir); datadir = NULL;