mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
Modified start_session_basic so as to return the
status code text when the variable status is not nil. This mimics the behavior of start_session_extended. This should provide more reliable results to smb-brute concerning the nature of login failure reasons. More detail has been sent to the mailing list.
This commit is contained in:
@@ -1235,8 +1235,12 @@ local function start_session_basic(smb, log_errors, overrides)
|
|||||||
stdnse.print_debug(1, "SMB: ERROR: %s", username)
|
stdnse.print_debug(1, "SMB: ERROR: %s", username)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (status ~= nil) then
|
||||||
|
return false, get_status_name(status)
|
||||||
|
else
|
||||||
return false, username
|
return false, username
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--- This is an internal function and should not be called externally. Use
|
--- This is an internal function and should not be called externally. Use
|
||||||
-- the start_session() function instead.
|
-- the start_session() function instead.
|
||||||
|
|||||||
Reference in New Issue
Block a user