Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: [RFC] Username/Password NSE library
From: "Patrick Donnelly" <batrick.donnelly () gmail com>
Date: Wed, 25 Jun 2008 01:29:10 -0600

On Wed, Jun 25, 2008 at 12:25 AM, Kris Katterjohn <katterjohn () gmail com> wrote:
My initial reactions:

* I mentioned the functionality of returning a table of usernames and
passwords, and the option of returning a table of only a certain size,

Like I said, you can modify usernames and passwords to return smaller
tables based on a parameter (e.g. unpwdb.usernames("short")).
Alternatively, you can modify the design to operate on an array (and
use ipairs()). The user could then break on the number he wants e.g.:

for i, user in unpwdb.usernames() do
  if i > 20 then break; end
  -- do stuff

* The third return value from the functions, which tells the caller whether
we're using a user-defined list or not, is always nil in yours.

This is simply necessary for Lua's generic for loop and the next
function. I suggest alternate functions that return information about
it being a user-defined list and what not.

Aside from these, your changes seem to work fine after I modified my test
script to handle them.

Good to hear it.


-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]