1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 00:19:01 +00:00

Change the output label "Uptime" to "Uptime guess" and print it only in verbose

mode.
This commit is contained in:
david
2008-08-26 17:40:19 +00:00
parent dc74809a68
commit 0a64626a4c
3 changed files with 18 additions and 6 deletions

View File

@@ -1738,7 +1738,8 @@ void printosscanoutput(Target *currenths) {
gettimeofday(&tv, NULL);
strncpy(tmbuf, ctime(&(currenths->seq.lastboot)), sizeof(tmbuf));
chomp(tmbuf);
log_write(LOG_PLAIN,"Uptime: %.3f days (since %s)\n", (double) (tv.tv_sec - currenths->seq.lastboot) / 86400, tmbuf);
if (o.verbose)
log_write(LOG_PLAIN,"Uptime guess: %.3f days (since %s)\n", (double) (tv.tv_sec - currenths->seq.lastboot) / 86400, tmbuf);
log_write(LOG_XML, "<uptime seconds=\"%li\" lastboot=\"%s\" />\n", tv.tv_sec - currenths->seq.lastboot, tmbuf);
}