mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 02:19:04 +00:00
added check for unknown account state to avoid crash when retrieving accounts.
This commit is contained in:
@@ -267,11 +267,11 @@ Credentials = {
|
||||
for v in self.storage:getAll() do
|
||||
local h = ( v.host.ip or v.host )
|
||||
local svc = ("%s/%s"):format(v.port,v.service)
|
||||
local c
|
||||
local c
|
||||
if ( v.user and #v.user > 0 ) then
|
||||
c = ("%s:%s - %s"):format(v.user, v.pass, StateMsg[v.state])
|
||||
c = ("%s:%s - %s"):format(v.user, v.pass, StateMsg[v.state] or "Unknown state")
|
||||
else
|
||||
c = ("%s - %s"):format(v.pass, StateMsg[v.state])
|
||||
c = ("%s - %s"):format(v.pass, StateMsg[v.state] or "Unknown state")
|
||||
end
|
||||
local script = v.scriptname
|
||||
assert(type(h)=="string", "Could not determine a valid host")
|
||||
|
||||
Reference in New Issue
Block a user