mirror of
https://github.com/nmap/nmap.git
synced 2026-01-28 17:19:05 +00:00
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.
This commit is contained in:
8
nmap.cc
8
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]);
|
||||
|
||||
Reference in New Issue
Block a user