smb connection error not setting result properly

if the initial connection from the SMB LoginScanner fails
it wouldn't set the target information on the result. this could cause
smb_login to throw a stack trace when it calls invalidate_login
bug/bundler_fix
David Maloney 2014-09-16 15:24:14 -05:00
parent e5aa5c4014
commit 5ff4a55cd2
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 10 additions and 1 deletions

View File

@ -149,7 +149,16 @@ module Metasploit
begin
connect
rescue ::Rex::ConnectionError => e
return Result.new(credential:credential, status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
result = Result.new(
credential:credential,
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: e,
host: host,
port: port,
protocol: 'tcp',
service_name: 'smb'
)
return result
end
proof = nil