1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-04 12:36:34 +00:00

Move brute.Account to creds.Account

In addition to fitting better (brute library is the verb, creds library
is the noun), this will allow creds.lua to use creds.Account internally
where necessary (see subsequent commits)

Also change old references to string argument "OPEN" into
creds.State.VALID.
This commit is contained in:
dmiller
2014-09-23 05:23:13 +00:00
parent 379759d539
commit f37ac44380
52 changed files with 103 additions and 110 deletions

View File

@@ -75,13 +75,13 @@ Driver =
-- @param username string containing the username
-- @param password string containing the password
-- @return status true on success, false on failure
-- @return brute.Error on failure and brute.Account on success
-- @return brute.Error on failure and creds.Account on success
login = function( self, username, password )
local status, err = self.helper:login( username, password, mech )
if ( status ) then
self.helper:close()
self.helper:connect()
return true, brute.Account:new(username, password, creds.State.VALID)
return true, creds.Account:new(username, password, creds.State.VALID)
end
if ( err:match("^ERROR: Failed to .* data$") ) then
self.helper:close()