mirror of
https://github.com/nmap/nmap.git
synced 2026-10-22 03:41:32 +00:00
Small formatting change int creds.lua to adapt output when no state is provided.
This commit is contained in:
parent
5df5c86029
commit
65a8490539
1 changed files with 10 additions and 2 deletions
|
|
@ -332,9 +332,17 @@ Credentials = {
|
|||
local svc = ("%s/%s"):format(v.port,v.service)
|
||||
local c
|
||||
if ( v.user and #v.user > 0 ) then
|
||||
c = ("%s:%s - %s"):format(v.user, v.pass, StateMsg[v.state] or "Unknown state")
|
||||
if StateMsg[v.state] then
|
||||
c = ("%s:%s - %s"):format(v.user, v.pass, StateMsg[v.state])
|
||||
else
|
||||
c = ("%s:%s"):format(v.user, v.pass)
|
||||
end
|
||||
else
|
||||
c = ("%s - %s"):format(v.pass, StateMsg[v.state] or "Unknown state")
|
||||
if StateMsg[v.state] then
|
||||
c = ("%s - %s"):format(v.pass, StateMsg[v.state])
|
||||
else
|
||||
c = ("%s"):format(v.pass)
|
||||
end
|
||||
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