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: Tue, 24 Jun 2008 18:38:13 -0600

Hi Kris,

I took the liberty of making some improvements to your unpwdb.lua
module. Notably, if the module can't find a password/username database
immediately upon being loaded it will error. Also, I changed the two
functions, usernames and passwords, to be usable by Lua's generic for
loop construct to provide functionality I think you guys have been
looking for. Basically it works like this:

batrick () Menzoberranzan:~/Desktop$ lua -i unpwdb\(2\).lua
Lua 5.1.3  Copyright (C) 1994-2008 Lua.org, PUC-Rio
for user in unpwdb.usernames() do
for pass in unpwdb.passwords() do
  print(user, pass)
root    dog
root    nou
root    pat
dog     dog
dog     nou
dog     pat
patrick dog
patrick nou
patrick pat

I've attached the file for you to look at, hopefully it's what you
guys are looking for. It should be easy to modify usernames and
passwords to return longer or shorter lists based on a parameter.


-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

Attachment: unpwdb(2).lua

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 ]