1
0
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:
patrik
2011-07-13 20:46:15 +00:00
parent e91c17f7a9
commit c800c437a9

View File

@@ -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")