Land #11616, add get_payload method to db_manager

master
Brent Cook 2019-03-23 08:25:28 -05:00
commit d7255bbbb2
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 9 additions and 0 deletions

View File

@ -52,4 +52,13 @@ module Msf::DBManager::Payload
end
end
def get_payload(opts)
raise ArgumentError.new("The following options are required: :uuid") if opts[:uuid].nil?
::ActiveRecord::Base.connection_pool.with_connection do
return Mdm::Payload.find_by(uuid: opts[:uuid])
end
end
end