diff --git a/nselib/brute.lua b/nselib/brute.lua index c7d4ec376..b72aa29d0 100644 --- a/nselib/brute.lua +++ b/nselib/brute.lua @@ -9,6 +9,7 @@ -- The library contains the following classes: -- * Account -- ** Implements a simple account class, that converts account "states" to common text representation. +-- ** The state can be either of the following: OPEN, LOCKED or DISABLED -- * Engine -- ** The actual engine doing the brute-forcing . -- * Error @@ -28,7 +29,13 @@ -- Driver:disconnect = function( self ) -- -- --- The login method does not need a lot of explanation. +-- The login method does not need a lot of explanation. The login +-- function should return two parameters. If the login was successful it should +-- return true and an Account. If the login was a failure it +-- should return false and an Error. The driver can signal the +-- Engine to retry a set of credentials by calling the Error objects +-- setRetry method. It may also signal the Engine to abort all +-- password guessing by calling the Error objects setAbort method. -- -- The purpose of the check method is to be able to determine -- whether the script has all the information it needs, before starting the @@ -198,6 +205,13 @@ Options = { -- The account object which is to be reported back from each driver Account = { + --- Creates a new instance of the Account class + -- + -- @param username containing the user's name + -- @param password containing the user's password + -- @param state containing the account state and should be one of the + -- following OPEN, LOCKED, + -- DISABLED. new = function(self, username, password, state) local o = {} setmetatable(o, self)