1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-17 20:09:02 +00:00

Add another parameter to nsp_settrace that allows setting the FILE

stream to write to. It defaults to stdout like before if NULL is
provided. Ncat uses this to write to stderr instead.
This commit is contained in:
david
2010-10-01 18:12:22 +00:00
parent 9ec90e4144
commit 85d81f76ce
4 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,8 @@
# Nmap Changelog ($Id$); -*-text-*-
o Ncat now logs Nsock debug output to stderr instead of stdout, like
its other debug messages. [David]
o Updated to the latest config.guess and config.sub. Thanks to Ty
Miller for a reminder. [David]

View File

@@ -1190,7 +1190,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, NSOCK_TRACE_LEVEL, o.getStartTime());
nsp_settrace(dnspool, NULL, NSOCK_TRACE_LEVEL, o.getStartTime());
connect_dns_servers();
@@ -1212,8 +1212,8 @@ static void nmap_mass_rdns_core(Target **targets, int num_targets) {
if (o.packetTrace() != lasttrace) {
lasttrace = !lasttrace;
if (lasttrace)
nsp_settrace(dnspool, NSOCK_TRACE_LEVEL, o.getStartTime());
else nsp_settrace(dnspool, 0, o.getStartTime());
nsp_settrace(dnspool, NULL, NSOCK_TRACE_LEVEL, o.getStartTime());
else nsp_settrace(dnspool, NULL, 0, o.getStartTime());
}
nsock_loop(dnspool, timeout);
}

View File

@@ -1062,7 +1062,7 @@ LUALIB_API int luaopen_nsock (lua_State *L)
nsock_pool nsp = new_pool(L);
if (o.scriptTrace())
nsp_settrace(nsp, NSOCK_TRACE_LEVEL, o.getStartTime());
nsp_settrace(nsp, NULL, NSOCK_TRACE_LEVEL, o.getStartTime());
#if HAVE_OPENSSL
/* Value speed over security in SSL connections. */
nsp_ssl_init_max_speed(nsp);

View File

@@ -2481,7 +2481,7 @@ int service_scan(vector<Target *> &Targets) {
}
if (o.versionTrace()) {
nsp_settrace(nsp, NSOCK_TRACE_LEVEL, o.getStartTime());
nsp_settrace(nsp, NULL, NSOCK_TRACE_LEVEL, o.getStartTime());
}
#if HAVE_OPENSSL