Modify to use find_or_create_host

GSoC/Meterpreter_Web_Console
Matthew Kienow 2018-05-14 17:29:57 -04:00
parent 09a7396ad5
commit 25fdc02902
No known key found for this signature in database
GPG Key ID: 40787F8B1EAC6E41
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ module Msf::DBManager::Event
return if not wspace # Temp fix?
uname = opts.delete(:username)
if ! opts[:host].kind_of? ::Mdm::Host and opts[:host]
opts[:host] = report_host(:workspace => wspace, :host => opts[:host])
if !opts[:host].nil? && !opts[:host].kind_of?(::Mdm::Host)
opts[:host] = find_or_create_host(workspace: wspace, host: opts[:host])
end
::Mdm::Event.create(opts.merge(:workspace_id => wspace[:id], :username => uname))