1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

merge soc07 r5077:5080 - Adding 'extrainfo' in the taskbegin/taskend XML elements for the SPM additional info

This commit is contained in:
fyodor
2007-08-11 05:11:08 +00:00
parent ed8b7899a0
commit f0e99644a7
2 changed files with 8 additions and 2 deletions

View File

@@ -422,18 +422,22 @@ bool ScanProgressMeter::beginOrEndTask(const struct timeval *now, const char *ad
tm = localtime(&tv_sec);
if (beginning) {
log_write(LOG_STDOUT, "Initiating %s at %02d:%02d", scantypestr, tm->tm_hour, tm->tm_min);
log_write(LOG_XML, "<taskbegin task=\"%s\" time=\"%lu\"", scantypestr, (unsigned long) now->tv_sec);
if (additional_info) {
log_write(LOG_STDOUT, " (%s)", additional_info);
log_write(LOG_XML, " extrainfo=\"%s\"", additional_info);
}
log_write(LOG_STDOUT, "\n");
log_write(LOG_XML, "<taskbegin task=\"%s\" time=\"%lu\" />\n", scantypestr, (unsigned long) now->tv_sec);
log_write(LOG_XML, " />\n");
} else {
log_write(LOG_STDOUT, "Completed %s at %02d:%02d, %.2fs elapsed", scantypestr, tm->tm_hour, tm->tm_min, TIMEVAL_MSEC_SUBTRACT(*now, begin) / 1000.0);
log_write(LOG_XML, "<taskend task=\"%s\" time=\"%lu\"", scantypestr, (unsigned long) now->tv_sec);
if (additional_info) {
log_write(LOG_STDOUT, " (%s)", additional_info);
log_write(LOG_XML, " extrainfo=\"%s\"", additional_info);
}
log_write(LOG_STDOUT, "\n");
log_write(LOG_XML, "<taskend task=\"%s\" time=\"%lu\" />\n", scantypestr, (unsigned long) now->tv_sec);
log_write(LOG_XML, " />\n");
}
log_flush(LOG_STDOUT|LOG_XML);
return true;