On Fri, Feb 15, 2008 at 01:54:53AM +0000, jah wrote:
> On 03/02/2008 22:47, Fyodor wrote:
> > On Sun, Feb 03, 2008 at 01:46:35AM +0000, jah wrote:
> >
> On some occasions, a service will take so long to respond that a huge
> number of queries are generated and this is very undesirable given the
> possibility of having ones IP address banned from using the service.
> I've set about trying to find a way to queue coroutines and have them
> wait in the queue until either a matching cached result was available
> (->return a pointer) or the coroutine arrives at the front of the queue
> (->proceed with a query).
>
> My problem is; how to make a coroutine wait?
>
> I've tried coroutine.yield() which does exactly what it says on the tin,
> but there's seemingly no way to make a yield() from inside a script
> resume() again and the coroutine sits there waiting for a callback from
> NSOCK, which it never gets.
Great question. I'm not sure of the best way to do this. Does anyone
have ideas? Jah included a bunch more details in his email at
http://seclists.org/nmap-dev/2008/q1/0294.html .
A solution to this would help with whois.nse, and likely many other scripts too.
Cheers,
-F
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
Received on Apr 05 2008