mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
added check for unknown account state to avoid crash when retrieving accounts.
This commit is contained in:
parent
e91c17f7a9
commit
c800c437a9
1 changed files with 3 additions and 3 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue