1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-14 17:36:33 +00:00

Check o.debugging *after* parsing options, otherwise it's always false.

This commit is contained in:
dmiller
2019-10-30 23:34:34 +00:00
parent ec30dbab3f
commit 3a744a85c2
2 changed files with 7 additions and 5 deletions

View File

@@ -601,6 +601,7 @@ void addrset_print(FILE *fp, const struct addrset *set)
{
const struct addrset_elem *elem;
for (elem = set->head; elem != NULL; elem = elem->next) {
fprintf(fp, "addrset_elem: %p\n", elem);
addrset_elem_print(fp, elem);
}
}

11
nmap.cc
View File

@@ -1835,11 +1835,6 @@ int nmap_main(int argc, char *argv[]) {
now = time(NULL);
local_time = localtime(&now);
if (o.debugging)
nbase_set_log(fatal, error);
else
nbase_set_log(fatal, NULL);
if (argc < 2){
printusage();
exit(-1);
@@ -1852,6 +1847,12 @@ int nmap_main(int argc, char *argv[]) {
parse_options(argc, argv);
if (o.debugging)
nbase_set_log(fatal, error);
else
nbase_set_log(fatal, NULL);
tty_init(); // Put the keyboard in raw mode
#ifdef WIN32