
Nmap Development mailing list archives
Re: [RFC] Username/Password NSE library
From: "Patrick Donnelly" <batrick.donnelly () gmail com>
Date: Wed, 25 Jun 2008 21:40:10 -0600
On Wed, Jun 25, 2008 at 9:20 PM, Kris Katterjohn <katterjohn () gmail com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick Donnelly wrote:I just want to repeat what I said in reply to Thomas: The performance difference between the two is almost negligible and certainly will not impact anything. It has become more of an aesthetic difference. If you have good reasons for not using the generic for loop then by all means please don't :)I was confused because you made a lot of changes, one of which had the "main advantage" of a negligible performance difference :) I do agree that the for loop method looks a bit cleaner, but that interface is only good if it's used in that loop (and I don't think every script will).
As long as it's mentioned in the documentation to be used in that way I think it would be ok.
I was also thrown off by the error() in your patch that didn't seem to do anything (was that for some other use case?)
I didn't want io.lines to error because it received nil. Instead I added the call to error (which is made if there is nothing in nmap.registry.args.blah or if fetchfile returned nil) which would say what we want, such as "no password database found". Passing nil to io.lines results in the error:
return io.lines(nil)
stdin:1: bad argument #1 to 'lines' (FILE* expected, got nil) Cheers, -- -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 http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Re: [RFC] Username/Password NSE library, (continued)
- Re: [RFC] Username/Password NSE library Patrick Donnelly (Jun 24)
- Re: [RFC] Username/Password NSE library Kris Katterjohn (Jun 24)
- Re: [RFC] Username/Password NSE library Patrick Donnelly (Jun 25)
- Re: [RFC] Username/Password NSE library Kris Katterjohn (Jun 25)
- Re: [RFC] Username/Password NSE library Patrick Donnelly (Jun 25)
- RE: [RFC] Username/Password NSE library Thomas Buchanan (Jun 25)
- Re: [RFC] Username/Password NSE library Patrick Donnelly (Jun 25)
- Re: [RFC] Username/Password NSE library Kris Katterjohn (Jun 25)
- Re: [RFC] Username/Password NSE library Patrick Donnelly (Jun 25)
- Re: [RFC] Username/Password NSE library Kris Katterjohn (Jun 25)
- Re: [RFC] Username/Password NSE library Patrick Donnelly (Jun 25)
- Re: [RFC] Username/Password NSE library Kris Katterjohn (Jun 25)
- Re: [RFC] Username/Password NSE library Patrick Donnelly (Jun 24)