mirror of
https://github.com/nmap/nmap.git
synced 2026-02-04 12:36:34 +00:00
Add --test option.
This will be used to control the printing of test messages that say when a connection is ready to use, to reduce delays in ncat-test.
This commit is contained in:
@@ -191,6 +191,8 @@ void options_init(void)
|
||||
|
||||
o.nsock_engine = 0;
|
||||
|
||||
o.test = 0;
|
||||
|
||||
o.numsrcrtes = 0;
|
||||
o.srcrteptr = 4;
|
||||
|
||||
|
||||
@@ -180,6 +180,8 @@ struct options {
|
||||
struct addrset denyset;
|
||||
int httpserver;
|
||||
int nsock_engine;
|
||||
/* Output messages useful for testing to stderr? */
|
||||
int test;
|
||||
|
||||
/* Loose source-routing stuff */
|
||||
struct in_addr srcrtes[8];
|
||||
|
||||
@@ -309,6 +309,7 @@ int main(int argc, char *argv[])
|
||||
{"proxy-type", required_argument, NULL, 0},
|
||||
{"proxy-auth", required_argument, NULL, 0},
|
||||
{"nsock-engine", required_argument, NULL, 0},
|
||||
{"test", no_argument, NULL, 0},
|
||||
#ifdef HAVE_OPENSSL
|
||||
{"ssl", no_argument, &o.ssl, 1},
|
||||
{"ssl-cert", required_argument, NULL, 0},
|
||||
@@ -471,6 +472,8 @@ int main(int argc, char *argv[])
|
||||
if (nsock_set_default_engine(optarg) < 0)
|
||||
bye("Unknown or non-available engine: %s.", optarg);
|
||||
o.nsock_engine = 1;
|
||||
} else if (strcmp(long_options[option_index].name, "test") == 0) {
|
||||
o.test = 1;
|
||||
} else if (strcmp(long_options[option_index].name, "broker") == 0) {
|
||||
o.broker = 1;
|
||||
/* --broker implies --listen. */
|
||||
|
||||
Reference in New Issue
Block a user