From cb60803ad11b21fc98236cf9b571781668d31000 Mon Sep 17 00:00:00 2001 From: ron Date: Sun, 18 Apr 2010 13:43:27 +0000 Subject: [PATCH] Fixed a couple bugs in the smb-* scripts involving undeclared variables. These only cropped up if the guest/anonymous accounts were disabled, which I'd never seen before. --- nselib/smb.lua | 2 +- scripts/smb-system-info.nse | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nselib/smb.lua b/nselib/smb.lua index a4bea03f7..1cecda019 100644 --- a/nselib/smb.lua +++ b/nselib/smb.lua @@ -1274,7 +1274,7 @@ function start_session_basic(smb, log_errors, overrides) stdnse.print_debug(1, "SMB: ERROR: %s", username) end - return false, get_status_name(status) + return false, username end function start_session_extended(smb, log_errors, overrides) diff --git a/scripts/smb-system-info.nse b/scripts/smb-system-info.nse index 3260d3c0e..ff8c20cbd 100644 --- a/scripts/smb-system-info.nse +++ b/scripts/smb-system-info.nse @@ -93,6 +93,7 @@ end local function get_info_registry(host) local result = {} + local status, smbstate, bind_result, openhklm_result -- Create the SMB session status, smbstate = msrpc.start_smb(host, msrpc.WINREG_PATH)