Nmap Development mailing list archives

Re: using the credentials database


From: Patrick Donnelly <batrick () batbytes com>
Date: Tue, 5 Jul 2011 14:51:15 -0400

On Mon, Jun 27, 2011 at 5:04 PM, Patrik Karlsson <patrik () cqure net> wrote:
I've added some documentation and a new function called getCredentials that will hopefully get you what you need.
Let me know if there's anything else you find missing :)

Sorry for being late to the party... I have a stylistic/efficiency
concern here. I'd prefer this function be an iterator [1,2] rather
than returning a potentially large table of tables. Something like:

for credential in c:credentials(creds.State.VALID) do
end

You can accomplish this quite naturally with coroutines [3,4].

[1] http://www.lua.org/pil/7.html
[2] http://www.lua.org/manual/5.1/manual.html#2.4.5
[3] http://www.lua.org/pil/9.3.html
[4] http://nmap.org/book/nse-parallelism.html#nse-parallelism-cm

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


Current thread: