mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Check address family before loading OS fingerprints
In addition to silencing an unnecessary fatal error when nmap-os-db is not found but user has requested -6, this should make start times a bit more efficient, since only 1 or the other database is loaded. Patch by Alexandru Geana Fixes #97
This commit is contained in:
parent
d17ec63ba5
commit
4a491e35d8
1 changed files with 4 additions and 2 deletions
6
nmap.cc
6
nmap.cc
|
|
@ -1426,8 +1426,10 @@ void apply_delayed_options() {
|
|||
|
||||
|
||||
if (o.osscan) {
|
||||
o.reference_FPs = parse_fingerprint_reference_file("nmap-os-db");
|
||||
o.os_labels_ipv6 = load_fp_matches();
|
||||
if (o.af() == AF_INET)
|
||||
o.reference_FPs = parse_fingerprint_reference_file("nmap-os-db");
|
||||
else if (o.af() == AF_INET6)
|
||||
o.os_labels_ipv6 = load_fp_matches();
|
||||
}
|
||||
|
||||
// Must check and change this before validate_scan_lists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue