mirror of
https://github.com/nmap/nmap.git
synced 2026-02-05 21:16:33 +00:00
Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem. https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
@@ -12,7 +12,7 @@ Performs brute force password auditing against iSCSI targets.
|
||||
-- @output
|
||||
-- PORT STATE SERVICE
|
||||
-- 3260/tcp open iscsi syn-ack
|
||||
-- | iscsi-brute:
|
||||
-- | iscsi-brute:
|
||||
-- | Accounts
|
||||
-- | user:password123456 => Valid credentials
|
||||
-- | Statistics
|
||||
@@ -30,7 +30,7 @@ categories = {"intrusive", "brute"}
|
||||
portrule = shortport.portnumber(3260, "tcp", {"open", "open|filtered"})
|
||||
|
||||
Driver = {
|
||||
|
||||
|
||||
new = function(self, host, port)
|
||||
local o = {}
|
||||
setmetatable(o, self)
|
||||
@@ -40,22 +40,22 @@ Driver = {
|
||||
o.target = stdnse.get_script_args('iscsi-brute.target')
|
||||
return o
|
||||
end,
|
||||
|
||||
|
||||
connect = function( self )
|
||||
self.helper = iscsi.Helper:new( self.host, self.port )
|
||||
return self.helper:connect()
|
||||
end,
|
||||
|
||||
|
||||
login = function( self, username, password )
|
||||
local status = self.helper:login( self.target, username, password, "CHAP")
|
||||
|
||||
|
||||
if ( status ) then
|
||||
return true, brute.Account:new(username, password, creds.State.VALID)
|
||||
end
|
||||
|
||||
|
||||
return false, brute.Error:new( "Incorrect password" )
|
||||
end,
|
||||
|
||||
|
||||
disconnect = function( self )
|
||||
self.helper:close()
|
||||
end,
|
||||
@@ -68,7 +68,7 @@ action = function( host, port )
|
||||
if ( not(target) ) then
|
||||
return "ERROR: No target specified (see iscsi-brute.target)"
|
||||
end
|
||||
|
||||
|
||||
local helper = iscsi.Helper:new( host, port )
|
||||
local status, err = helper:connect()
|
||||
if ( not(status) ) then return false, "Failed to connect" end
|
||||
|
||||
Reference in New Issue
Block a user