From fbbc8da8fbe324618bd32cb489c0346ca58f9478 Mon Sep 17 00:00:00 2001 From: William Vu Date: Tue, 7 Nov 2017 14:30:47 -0600 Subject: [PATCH] Fix raise(s) in MSSQL client aborting mssql_login --- lib/metasploit/framework/mssql/client.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/metasploit/framework/mssql/client.rb b/lib/metasploit/framework/mssql/client.rb index 9652c2ec79..294fbbae2b 100644 --- a/lib/metasploit/framework/mssql/client.rb +++ b/lib/metasploit/framework/mssql/client.rb @@ -634,7 +634,8 @@ module Metasploit if idx > 0 encryption_mode = resp[idx, 1].unpack("C")[0] else - raise "Unable to parse encryption req during pre-login, this may not be a MSSQL server" + framework_module.print_error("Unable to parse encryption req " \ + "during pre-login, this may not be a MSSQL server") encryption_mode = ENCRYPT_NOT_SUP end @@ -681,7 +682,9 @@ module Metasploit if idx > 0 encryption_mode = resp[idx, 1].unpack("C")[0] else - raise "Unable to parse encryption req during pre-login, this may not be a MSSQL server" + framework_module.print_error("Unable to parse encryption req " \ + "during pre-login, this may not be a MSSQL server") + encryption_mode = ENCRYPT_NOT_SUP end end encryption_mode