Show the line number in service scan match debug messages.

This commit is contained in:
david 2011-02-23 17:18:57 +00:00
parent 6d65382a24
commit b1c1891a7d

View file

@ -2197,8 +2197,9 @@ static void servicescan_read_handler(nsock_pool nsp, nsock_event nse, void *myda
} else {
if (o.debugging > 1 || o.versionTrace()) {
if (MD->product || MD->version || MD->info)
log_write(LOG_PLAIN, "Service scan match (Probe %s matched with %s): %s:%hu is %s%s. Version: |%s|%s|%s|\n",
log_write(LOG_PLAIN, "Service scan match (Probe %s matched with %s line %d): %s:%hu is %s%s. Version: |%s|%s|%s|\n",
probe->getName(), (*probe->fallbacks[fallbackDepth]).getName(),
MD->lineno,
svc->target->targetipstr(), svc->portno, (svc->tunnel == SERVICE_TUNNEL_SSL)? "SSL/" : "",
MD->serviceName, (MD->product)? MD->product : "", (MD->version)? MD->version : "",
(MD->info)? MD->info : "");