Land #11631, payloads db fixes

master
Brent Cook 2019-03-25 19:16:11 -05:00
commit d168895311
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
4 changed files with 7 additions and 5 deletions

View File

@ -8,7 +8,6 @@ module DataProxyAutoLoader
autoload :WorkspaceDataProxy, 'metasploit/framework/data_service/proxy/workspace_data_proxy'
autoload :NoteDataProxy, 'metasploit/framework/data_service/proxy/note_data_proxy'
autoload :WebDataProxy, 'metasploit/framework/data_service/proxy/web_data_proxy'
autoload :WebDataProxy, 'metasploit/framework/data_service/proxy/web_data_proxy'
autoload :ServiceDataProxy, 'metasploit/framework/data_service/proxy/service_data_proxy'
autoload :SessionDataProxy, 'metasploit/framework/data_service/proxy/session_data_proxy'
autoload :ExploitDataProxy, 'metasploit/framework/data_service/proxy/exploit_data_proxy'
@ -21,6 +20,7 @@ module DataProxyAutoLoader
autoload :DbImportDataProxy, 'metasploit/framework/data_service/proxy/db_import_data_proxy'
autoload :VulnAttemptDataProxy, 'metasploit/framework/data_service/proxy/vuln_attempt_data_proxy'
autoload :MsfDataProxy, 'metasploit/framework/data_service/proxy/msf_data_proxy'
autoload :PayloadDataProxy, 'metasploit/framework/data_service/proxy/payload_data_proxy'
include ServiceDataProxy
include HostDataProxy
@ -40,4 +40,5 @@ module DataProxyAutoLoader
include DbImportDataProxy
include VulnAttemptDataProxy
include MsfDataProxy
include PayloadDataProxy
end

View File

@ -3,6 +3,7 @@ module PayloadDataProxy
def payloads(opts)
begin
self.data_service_operation do |data_service|
add_opts_workspace(opts)
data_service.payloads(opts)
end
rescue => e
@ -13,6 +14,7 @@ module PayloadDataProxy
def create_payload(opts)
begin
self.data_service_operation do |data_service|
add_opts_workspace(opts)
data_service.create_payload(opts)
end
rescue => e

View File

@ -8,7 +8,8 @@ module Msf::DBManager::Payload
end
end
Mdm::Payload.create!(opts)
wspace = Msf::Util::DBManager.process_opts_workspace(opts, framework)
wspace.payloads.create!(opts)
end
end

View File

@ -92,9 +92,7 @@ module Msf::Payload::UUID::Options
arch: uuid.arch,
platform: uuid.platform,
timestamp: uuid.timestamp,
workspace: framework.db.workspace,
# payload: self.fullname,
# datastore: self.datastore
workspace: framework.db.workspace
})
if datastore['PayloadUUIDSeed'].to_s.length > 0