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

Tone down the Nsock trace level with --packet-trace, --version-trace,

and --script-trace. It was set at 5, now it's 2. That's enough to see
all the Nsock events and the contents of reads and writes. At 3 you
start to get messages like
	PCAP do_actual_pcap_read READ (IOD #%li) (EID #%li) size=%i
The message "wait_for_events" isn't printed until level 4. Getting rid
of that is the main reason for this change.
This commit is contained in:
david
2009-03-27 21:37:14 +00:00
parent 7fca42a74c
commit 4fc92b216c
4 changed files with 7 additions and 5 deletions

3
nmap.h
View File

@@ -288,6 +288,9 @@ void *realloc();
#define MAXFALLBACKS 20 /* How many comma separated fallbacks are allowed in the service-probes file? */
/* The trace level to give to nsp_settrace with --packet-trace et al. */
#define NSOCK_TRACE_LEVEL 2
/* Default maximum send delay between probes to the same host */
#ifndef MAX_TCP_SCAN_DELAY
#define MAX_TCP_SCAN_DELAY 1000

View File

@@ -1193,7 +1193,7 @@ static void nmap_mass_rdns_core(Target **targets, int num_targets) {
fatal("Unable to create nsock pool in %s()", __func__);
if ((lasttrace = o.packetTrace()))
nsp_settrace(dnspool, 5, o.getStartTime());
nsp_settrace(dnspool, NSOCK_TRACE_LEVEL, o.getStartTime());
connect_dns_servers();
@@ -1215,7 +1215,7 @@ static void nmap_mass_rdns_core(Target **targets, int num_targets) {
if (o.packetTrace() != lasttrace) {
lasttrace = !lasttrace;
if (lasttrace)
nsp_settrace(dnspool, 5, o.getStartTime());
nsp_settrace(dnspool, NSOCK_TRACE_LEVEL, o.getStartTime());
else nsp_settrace(dnspool, 0, o.getStartTime());
}
nsock_loop(dnspool, timeout);

View File

@@ -379,9 +379,8 @@ int luaopen_nsock (lua_State *L)
luaL_newmetatable(L, "nsock_proxy");
nsp = nsp_new(NULL);
//nsp_settrace(nsp, o.debugging, o.getStartTime());
if (o.scriptTrace())
nsp_settrace(nsp, 5, o.getStartTime());
nsp_settrace(nsp, NSOCK_TRACE_LEVEL, o.getStartTime());
return 0;
}

View File

@@ -2422,7 +2422,7 @@ int service_scan(vector<Target *> &Targets) {
}
if (o.versionTrace()) {
nsp_settrace(nsp, 5, o.getStartTime());
nsp_settrace(nsp, NSOCK_TRACE_LEVEL, o.getStartTime());
}
launchSomeServiceProbes(nsp, SG);