Skip to content

Commit fbbc8da

Browse files
committed
Fix raise(s) in MSSQL client aborting mssql_login
1 parent fc87ee0 commit fbbc8da

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/metasploit/framework/mssql/client.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,8 @@ def mssql_prelogin(enc_error=false)
634634
if idx > 0
635635
encryption_mode = resp[idx, 1].unpack("C")[0]
636636
else
637-
raise "Unable to parse encryption req during pre-login, this may not be a MSSQL server"
637+
framework_module.print_error("Unable to parse encryption req " \
638+
"during pre-login, this may not be a MSSQL server")
638639
encryption_mode = ENCRYPT_NOT_SUP
639640
end
640641

@@ -681,7 +682,9 @@ def mssql_prelogin(enc_error=false)
681682
if idx > 0
682683
encryption_mode = resp[idx, 1].unpack("C")[0]
683684
else
684-
raise "Unable to parse encryption req during pre-login, this may not be a MSSQL server"
685+
framework_module.print_error("Unable to parse encryption req " \
686+
"during pre-login, this may not be a MSSQL server")
687+
encryption_mode = ENCRYPT_NOT_SUP
685688
end
686689
end
687690
encryption_mode

0 commit comments

Comments
 (0)