Land #8412, fix for smb_login errors
Merge branch 'land-8412' into upstream-masterbug/bundler_fix 4.14.19
commit
02211db664
|
@ -343,7 +343,7 @@ GEM
|
|||
rspec-mocks (~> 3.6.0)
|
||||
rspec-support (~> 3.6.0)
|
||||
rspec-support (3.6.0)
|
||||
ruby_smb (0.0.12)
|
||||
ruby_smb (0.0.14)
|
||||
bindata
|
||||
rubyntlm
|
||||
windows_error
|
||||
|
|
|
@ -100,6 +100,7 @@ module Metasploit
|
|||
client = RubySMB::Client.new(self.dispatcher, username: username, password: password, domain: realm)
|
||||
status_code = client.login
|
||||
|
||||
if status_code == WindowsError::NTStatus::STATUS_SUCCESS
|
||||
# Windows SMB will return an error code during Session
|
||||
# Setup, but nix Samba requires a Tree Connect. Try admin$
|
||||
# first, since that will tell us if this user has local
|
||||
|
@ -114,6 +115,7 @@ module Metasploit
|
|||
rescue Exception => e
|
||||
client.tree_connect("\\\\#{host}\\IPC$")
|
||||
end
|
||||
end
|
||||
|
||||
case status_code.name
|
||||
when *StatusCodes::CORRECT_CREDENTIAL_STATUS_CODES
|
||||
|
|
Loading…
Reference in New Issue