1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 04:19:02 +00:00

Clean debug messages and make debug level 3 the default debug level for the 'adding new targets' code.

This commit is contained in:
djalal
2010-09-03 17:53:34 +00:00
parent 299b8e8f28
commit c9a756bc12
3 changed files with 13 additions and 10 deletions

View File

@@ -568,6 +568,7 @@ const std::list<struct sockaddr_storage> &TargetGroup::get_resolved_addrs(void)
}
#ifndef NOLUA
/* debug level for the adding target is: 3 */
NewTargets *NewTargets::get (void) {
if (new_targets)
return new_targets;
@@ -600,8 +601,11 @@ unsigned long NewTargets::push (const char *target) {
/* push target onto the queue for future scans */
queue.push(tg);
if (o.debugging > 3)
if (o.debugging > 2)
log_write(LOG_PLAIN, "New target %s pushed onto the queue.\n", tg.c_str());
} else {
if (o.debugging > 2)
log_write(LOG_PLAIN, "Target %s is already in the queue.\n", tg.c_str());
}
}
@@ -645,11 +649,11 @@ unsigned long NewTargets::get_queued (void) {
unsigned long NewTargets::insert (const char *target) {
if (*target) {
if (new_targets == NULL) {
error("Error: to add targets run with -sC or --script options.");
error("ERROR: to add targets run with -sC or --script options.");
return 0;
}
if (o.current_scantype == SCRIPT_POST_SCAN) {
error("Error: adding targets is disabled in the Post-scanning phase.");
error("ERROR: adding targets is disabled in the Post-scanning phase.");
return 0;
}
}