Home page logo

nmap-dev logo 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

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.:

I'm for _R too!
whois.nse has:


which has to be writeable from all threads so cannot be copied into a
local variable with a shorter name.


would be much nicer...


Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]