mirror of
https://github.com/nmap/nmap.git
synced 2026-06-25 10:38:02 +00:00
Add a @usage section to unpwdb.lua showing how to use the iterators.
This commit is contained in:
parent
a066cd7bdc
commit
5d7f91a6b2
1 changed files with 17 additions and 0 deletions
|
|
@ -16,6 +16,23 @@
|
|||
-- password in <code>"mypass #!comment: blah"</code> contain a space, two
|
||||
-- spaces, or do they just separate the password from the comment?
|
||||
--
|
||||
-- @usage
|
||||
-- require("unpwdb")
|
||||
--
|
||||
-- local usernames, passwords
|
||||
-- local username, password
|
||||
-- local try = nmap.new_try()
|
||||
--
|
||||
-- usernames = try(unpwdb.usernames())
|
||||
-- passwords = try(unpwdb.passwords())
|
||||
--
|
||||
-- for password in passwords do
|
||||
-- for username in usernames do
|
||||
-- -- Do something with username and password.
|
||||
-- end
|
||||
-- usernames("reset")
|
||||
-- end
|
||||
--
|
||||
-- @args userdb The filename of an alternate username database.
|
||||
-- @args passdb The filename of an alternate password database.
|
||||
-- @author Kris Katterjohn 06/2008
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue