From 847e6306306615ae0ce33ee599c97180e9906388 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 22 Nov 2018 09:20:12 -0600 Subject: [PATCH] ensure incoming creds are all UTF-8 --- lib/metasploit/framework/login_scanner/smb.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/metasploit/framework/login_scanner/smb.rb b/lib/metasploit/framework/login_scanner/smb.rb index a281927d5a..fce2c53dea 100644 --- a/lib/metasploit/framework/login_scanner/smb.rb +++ b/lib/metasploit/framework/login_scanner/smb.rb @@ -93,10 +93,9 @@ module Metasploit proof = nil begin - - realm = credential.realm || "" - username = credential.public || "" - password = credential.private || "" + realm = (credential.realm || "").force_encoding('UTF-8') + username = (credential.public || "").force_encoding('UTF-8') + password = (credential.private || "").force_encoding('UTF-8') client = RubySMB::Client.new(self.dispatcher, username: username, password: password, domain: realm) status_code = client.login