Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: [RFC] Username/Password NSE library
From: Kris Katterjohn <katterjohn () gmail com>
Date: Wed, 25 Jun 2008 23:37:32 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Patrick Donnelly wrote:
On Wed, Jun 25, 2008 at 9:20 PM, Kris Katterjohn <katterjohn () gmail com> wrote:
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'm not trying to say that would never work, just that there are cases where
the closure would be much better than the table (like my example of wanting to
grab a new username or password in a different place/at a different time, not
in a loop).  IMO proper documentation only goes so far: a more flexible design
allows for more naturally flowing scripts, rather than forcing them to abide
by the loop method, kludge and keep up with table indexes, etc.

I hope none of this discussion has come off as disrespectful, because I'm glad
you've been coming up with other ideas and discussing them with me.  I'm only
disagreeing :)

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)


Thanks, I understand now.

Cheers,


Thanks again,
Kris Katterjohn

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBSGMdCv9K37xXYl36AQLWyA/+IQNFsS5iVIt06hkERDKXcOxgBUC+j3/R
WJYH5JC9TGaX3jm70eQ9r4IehC5+/kRpgPZA4NWFQfX9PnOL1AOM/itD3X80kEFE
PRVGNU0DvVCQGtjvcVFAO2JYk2pK4/DoOXBYSeKQ/lBIbw6KfwH+u10uATaidher
4Y6R4rYqAzgnjubTONvZpPgP3xC3eVlFKnTEENQcIudeeDPmpHEUp5GQMG8VUFs+
XRQSqV+r/4Ac0nJn4WTPCU/nxS2XWWoASiVDCAOlRJqaPxFIX0373hJoB7L6/5Ow
h2lWnTTxaAj2s02O+28xUkngEVh+59Zcg6WHXM8u0eXxzInjsipKDTt254JcFgCa
NXaagZkesi6XarwpFplZoQG6+1V00A8xxM7FCn7Bv7iikZNxQ5nsiL2dmYaI54qP
xKjJ5DWvKLS7Nw8bmdCzH54c29wtN0rOyekCHn/9u4Tctcj1Xau7pG54+Oa8GAmw
/ViJGqcYBBH6VFnbmRbr8WJlNrTOor3P5yd77WWxiA//BpwZua0MofwH50xwi+wF
SVo2/tYM+BB3TayjWmafc604PIeujHCr4Z2nROXcVPBtN6XSxwDf5MmJl5ky+wpy
vkGEwMJGjYiLtTqlEKZvYjF4PhV8XzJplO9lk45JMjgV4W6PnhAXCsuOmdbSXV5G
3RBHKKooNCA=
=Kgpd
-----END PGP SIGNATURE-----

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


  By Date           By Thread  

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