Nmap Development mailing list archives
Re: using the credentials database
From: Patrik Karlsson <patrik () cqure net>
Date: Tue, 5 Jul 2011 21:51:43 +0200
On Jul 5, 2011, at 8:51 PM, Patrick Donnelly wrote:
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
I modified the getCredentials function to return an iterator per your suggestion. The attached patch contains my previous script argument patch as well as this change.
Attachment:
creds-cli-add-iter.patch
Description:
//Patrik -- Patrik Karlsson http://www.cqure.net http://www.twitter.com/nevdull77
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: using the credentials database Fyodor (Jul 02)
- Re: using the credentials database Toni Ruottu (Jul 02)
- <Possible follow-ups>
- Re: using the credentials database Toni Ruottu (Jul 05)
- Re: using the credentials database Patrik Karlsson (Jul 05)
- Re: using the credentials database Toni Ruottu (Jul 05)
- Re: using the credentials database Patrik Karlsson (Jul 05)
- Re: using the credentials database Patrick Donnelly (Jul 05)
- Re: using the credentials database Patrik Karlsson (Jul 05)
- Re: using the credentials database Patrick Donnelly (Jul 05)
- Re: using the credentials database Patrik Karlsson (Jul 05)
- Re: using the credentials database Patrick Donnelly (Jul 05)
- Re: using the credentials database Toni Ruottu (Jul 06)
- Re: using the credentials database Patrik Karlsson (Jul 06)
- Re: using the credentials database Toni Ruottu (Jul 06)
- Re: using the credentials database Patrik Karlsson (Jul 06)
- Re: using the credentials database Patrik Karlsson (Jul 05)
