Fix a stack trace when the SMBUser isn't set

For some reason an invalid user/pass don't seem to trigger
STATUS_ACCESS_DENIED responses, but an empty user does.
This commit is contained in:
James Lee 2012-04-30 17:48:19 -06:00
parent d68d832c9d
commit 6ab66dc59e
1 changed files with 10 additions and 5 deletions

View File

@ -108,7 +108,12 @@ class Metasploit3 < Msf::Auxiliary
simple.connect("IPC$")
handle = dcerpc_handle('4b324fc8-1670-01d3-1278-5a47bf6ee188', '3.0', 'ncacn_np', ["\\srvsvc"])
begin
dcerpc_bind(handle)
rescue Rex::Proto::SMB::Exceptions::ErrorCode => e
print_error("#{rhost} : #{e.message}")
return
end
stubdata =
NDR.uwstring("\\\\#{rhost}") +