Nmap Development mailing list archives
Re: [NSE] Shared Script Environments for Threads & Universal Awareness
From: jah <jah () zadkiel plus com>
Date: Tue, 01 Jul 2008 01:18:36 +0100
On 30/06/2008 07:27, Kris Katterjohn wrote:
Patrick Donnelly wrote:Hey guys,There is a change that will soon be added to NSE that concerns sharing data between threads of the same script safely and conveniently. While the registry is useful for sharing data between threads, it is possible for other scripts to accidentally use the same key when saving data. As soon as the change to give each thread its own action closure is added, it will not possible for scripts to guarantee safety of data in the registry programmatically.Therefore, scripts will now have a "_S" and "_T" global available to them for sharing data. _S(cript) is a table that can hold private data which is shared between all threads of the same script. _T(hread) is the environment table for the script (which will be inline with the change to give all threads their own action closure and global environment).I'm confused about the application of _T: what environment interactivity would a script be conducting? Since we're using this nomenclature for script-specific information, how about making a global _R the registry interface? It gets pretty ugly sometimes trying to deal with some arguments, e.g.: nmap.registry.args.anonFTP.pass
I'm for _R too! whois.nse has: nmap.registry.whois.cache[host.ip].data which has to be writeable from all threads so cannot be copied into a local variable with a shorter name. _R.cache[host.ip].data would be much nicer... jah _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [NSE] Shared Script Environments for Threads & Universal Awareness Patrick Donnelly (Jun 29)
- Re: [NSE] Shared Script Environments for Threads & Universal Awareness Kris Katterjohn (Jun 29)
- Re: [NSE] Shared Script Environments for Threads & Universal Awareness jah (Jun 30)
- Re: [NSE] Shared Script Environments for Threads & Universal Awareness Patrick Donnelly (Jun 30)
- Re: [NSE] Shared Script Environments for Threads & Universal Awareness Patrick Donnelly (Jun 30)
- Re: [NSE] Shared Script Environments for Threads & Universal Awareness jah (Jun 30)
- Re: [NSE] Shared Script Environments for Threads & Universal Awareness jah (Jun 30)
- Re: [NSE] Shared Script Environments for Threads & Universal Awareness Kris Katterjohn (Jun 29)