Nmap Development mailing list archives
Persistent NSE registry
From: David Fifield <david () bamsoftware com>
Date: Tue, 18 Nov 2008 00:11:31 -0700
Hi, Currently the NSE registry doesn't persist across host groups, the chunks of varying size that Nmap processes sequentially. You can see this by running an experiment like nmap --script=whois -sP --max-hostgroup 3 stanford.edu/28 whois.nse caches results in the registry. The whois results are the same for each host, so ideally you should see the results for one host and all the rest should say "See the result for 171.67.22.XX." But because we've limited the size of host groups to 3, every third host requires a whois query and prints duplicate information. I made a simple change to keep the registry in between host groups. I'm posting it here to solicit comments and see if there are any side effects. All I do is initialize a single Lua state the first time scritp_scan is called, and keep using it thereafter. This also avoid reinitializing the script arguments every time. Previously a new state was created for each host group. I would make some more changes before committing this for good, like picking a better name for the L state as it won't be a local variable any more. Is there any cruft that has to be cleaned out in between host groups? David Fifield
Attachment:
nse-persistent-registry.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Persistent NSE registry David Fifield (Nov 17)
- Re: Persistent NSE registry Patrick Donnelly (Nov 17)
- Re: Persistent NSE registry David Fifield (Nov 18)
- Re: Persistent NSE registry Patrick Donnelly (Nov 18)
- Re: Persistent NSE registry David Fifield (Nov 18)
- Re: Persistent NSE registry David Fifield (Nov 18)
- Re: Persistent NSE registry Patrick Donnelly (Nov 17)