From 5fc3242535d7c0deee5aea0a5795f323e25e7bab Mon Sep 17 00:00:00 2001 From: david Date: Tue, 11 Oct 2011 20:32:41 +0000 Subject: [PATCH] Don't call win_init until after apply_delayed_options. jah noticed strange behavior that depends on the order of options; for example the position of --unprivileged would make a difference. This was because win_init makes decisions based on certain options and the options had not been fully processed. --- nmap.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nmap.cc b/nmap.cc index 6c7811246..5f0946932 100644 --- a/nmap.cc +++ b/nmap.cc @@ -1547,14 +1547,14 @@ int nmap_main(int argc, char *argv[]) { parse_options(argc, fakeargv); -#ifdef WIN32 - win_init(); -#endif - tty_init(); // Put the keyboard in raw mode apply_delayed_options(); +#ifdef WIN32 + win_init(); +#endif + /* more fakeargv junk, BTW malloc'ing extra space in argv[0] doesn't work */ if (o.quashargv) { size_t fakeargvlen = strlen(FAKE_ARGV), argvlen = strlen(argv[0]);