Nmap Development mailing list archives
DnetName2PcapName bugfix
From: Elon Natovich <elon.nat () gmail com>
Date: Fri, 27 Feb 2015 13:19:26 +0200
Hi, First of all I must thank you guys for nmap - thanks for the hard work on this superb utility! For a while I've wondered why nmap's initialization is so slow on my computer ( 64 bit windows 7), and today I've did a little debugging to find the spot. While initializing the DNS server list [init_servs()] for every interface in registry, it iterates over every dnet interface name and uses DnetName2PcapName to get it's GUID to try match it to the interface's GUID. That means that DnetName2PcapName is called for all dnet names, for every interface in registry - not so efficient. I saw there was a cache for DnetName2PcapName translation to solve this issue - but there was no cache for dnet names not found. So every time nmap started,it wasted a lot of time trying to resolve dnet names without matching pcap names (like lo0). Even a simple scan took ~35 seconds, of which ~30 seconds of initialization! I've added a cache for dnet names not found, now simple scans take me ~5 seconds, and attached the svn diff. Please tell me if I got something wrong! Cheers, Elon Natovich
Attachment:
nmap.patch
Description:
_______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- DnetName2PcapName bugfix Elon Natovich (Mar 02)