Changes to mssql_clr_payload error handling based on code review

bug/bundler_fix
james 2017-09-10 14:15:39 -05:00
parent 44fb059cea
commit ba880d1a85
1 changed files with 6 additions and 0 deletions

View File

@ -98,6 +98,9 @@ class MetasploitModule < Msf::Exploit::Remote
def set_trustworthy(on)
result = mssql_query("ALTER DATABASE [#{datastore['DATABASE']}] SET TRUSTWORTHY #{on ? 'ON' : 'OFF'}", false)
unless result[:errors].empty?
result[:errors].each do |err|
vprint_error(err)
end
fail_with(Failure::Unknown, "Failed to change Trustworthy setting")
end
end
@ -117,6 +120,9 @@ RECONFIGURE;
^
result = mssql_query(query, false)
unless result[:errors].empty?
result[:errors].each do |err|
vprint_error(err)
end
fail_with(Failure::Unknown, "Failed to change CLR setting")
end
end