From b5cb7a96fcda524c9bc715c85ce64d2780bbe5dd Mon Sep 17 00:00:00 2001 From: tomsellers Date: Sat, 3 Sep 2011 17:01:13 +0000 Subject: [PATCH] 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. --- nselib/smb.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nselib/smb.lua b/nselib/smb.lua index b533ada5a..c33da962e 100644 --- a/nselib/smb.lua +++ b/nselib/smb.lua @@ -1235,7 +1235,11 @@ local function start_session_basic(smb, log_errors, overrides) stdnse.print_debug(1, "SMB: ERROR: %s", username) end - return false, username + if (status ~= nil) then + return false, get_status_name(status) + else + return false, username + end end --- This is an internal function and should not be called externally. Use