Changes to mssql_clr_payload error handling based on code review
parent
44fb059cea
commit
ba880d1a85
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue