Nmap Development mailing list archives

Re: manufacturer information for address-info.nse


From: Vasiliy Kulikov <segoon () openwall com>
Date: Sat, 24 Sep 2011 17:00:10 +0400

Hi,

On Sat, Sep 24, 2011 at 15:34 +0300, Toni Ruottu wrote:
+local function get_manuf(mac)
+     if not nmap.registry.mac then
...
+             nmap.registry.mac.prefixes = try(datafiles.parse_mac_prefixes())
+     end

FWIW, while this is not a big deal for this specific usage, but there is
a race condition as nmap.registry is a global variable.  If two parallel
invocations of the script simultaneously test nmap.registry.mac they
both recalc and set mac.prefixes variable.  For this usage it's harmless
as Lua has a garbage collector and recalc doesn't do anything significant.

Thanks,

-- 
Vasiliy
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: