Home page logo
/
Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News

Library unpwdb

Username/password database library.

The usernames and passwords functions return multiple values for use with exception handling via nmap.new_try. The first value is the Boolean success indicator, the second value is the closure.

The closures can take an argument of "reset" to rewind the list to the beginning.

You can select your own username and/or password database to read from with the script arguments userdb and passdb, respectively. Comments are allowed in these files, prefixed with "#!comment:". Comments cannot be on the same line as a username or password because this leaves too much ambiguity, e.g. does the password in "mypass #!comment: blah" contain a space, two spaces, or do they just separate the password from the comment?

Author:
Kris Katterjohn 06/2008

Copyright© Same as Nmap--See http://nmap.org/book/man-legal.html

Source: http://nmap.org/svn/nselib/unpwdb.lua

Script Arguments

userdb

The filename of an alternate username database.

passdb

The filename of an alternate password database.

Functions

passwords ()

Returns a function closure which returns a new password with every call until the password list is exhausted (in which case it returns nil).

timelimit ()

Returns the suggested number of seconds to attempt a brute force attack, based on Nmap's timing values (-T4 etc.) and whether or not a user-defined list is used.

usernames ()

Returns a function closure which returns a new username with every call until the username list is exhausted (in which case it returns nil).



Functions

passwords ()

Returns a function closure which returns a new password with every call until the password list is exhausted (in which case it returns nil).

Return values:

  1. boolean Status.
  2. function The passwords iterator.
timelimit ()

Returns the suggested number of seconds to attempt a brute force attack, based on Nmap's timing values (-T4 etc.) and whether or not a user-defined list is used.

You can use the script argument notimelimit to make this function return nil, which means the brute-force should run until the list is empty. If notimelimit is not used, be sure to still check for nil return values on the above two functions in case you finish before the time limit is up.

usernames ()

Returns a function closure which returns a new username with every call until the username list is exhausted (in which case it returns nil).

Return values:

  1. boolean Status.
  2. function The usernames iterator.

Nmap Site Navigation

Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]