Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: Re: [NSE] Shared Script Environments for Threads & Universal Awareness

Re: [NSE] Shared Script Environments for Threads & Universal Awareness

From: jah <jah_at_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
Received on Jun 30 2008

[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
edgeos