mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Check o.debugging *after* parsing options, otherwise it's always false.
This commit is contained in:
parent
ec30dbab3f
commit
3a744a85c2
2 changed files with 7 additions and 5 deletions
|
|
@ -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
11
nmap.cc
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue