Nmap Development mailing list archives

Re: A sleep function for NSE


From: jah <jah () zadkiel plus com>
Date: Wed, 18 Feb 2009 22:07:15 +0000

On 18/02/2009 20:24, David Fifield wrote:
Does someone else have a use for a sleep function? Is the design
suitable for you?
Hi David,

sleep() looks good.  I wonder whether t should take milliseconds as
other operations do - socket.set_timeout for example.  I guess it
largely depends on how long scripts generally want to sleep a coroutine
for - just a thought.

Whilst I was improving whois.nse I badly wanted sleep(), but then mutex
came along and this turned out to be a better solution since the aim was
to protect a resource from use by more than one coroutine at a time - in
this case, a connection to a whois service.
On my TODO list is a script for brute forcing VNC auth which will need
sleep and also an HTTP/HTML spider in which sleep could be useful in
avoiding a ban for aggressive crawling.

So yes, a useful addition indeed.

jah

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


Current thread: