1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-06 06:29:03 +00:00

Fixed a bug where the script would crash if the error code could not be

determined properly.
This commit is contained in:
patrik
2012-01-19 00:38:00 +00:00
parent df3b01e5d8
commit bf3f668223

View File

@@ -112,7 +112,11 @@ local function needsPassword(host, port)
if (code == 464) then
return true
end
return false, ("Failed to check password requirements, unknown code (%d)"):format(code)
if ( code ) then
return false, ("Failed to check password requirements, unknown code (%d)"):format(code)
else
return false, "Failed to check password requirements"
end
end