Path: blob/master/lib/msf/base/sessions/postgresql.rb
19512 views
# -*- coding: binary -*-12require 'rex/post/postgresql'34class Msf::Sessions::PostgreSQL < Msf::Sessions::Sql56# @param[Rex::IO::Stream] rstream7# @param [Hash] opts8# @param opts [Msf::Db::PostgresPR::Connection] :client9def initialize(rstream, opts = {})10@client = opts.fetch(:client)11self.platform = opts.fetch(:platform)12self.arch = opts.fetch(:arch)13@console = ::Rex::Post::PostgreSQL::Ui::Console.new(self)14super(rstream, opts)15end1617def bootstrap(datastore = {}, handler = nil)18session = self19session.init_ui(user_input, user_output)2021@info = "PostgreSQL #{datastore['USERNAME']} @ #{@peer_info}"22end2324#25# @return [String] The type of the session26#27def self.type28'postgresql'29end3031#32# @return [Boolean] Can the session clean up after itself33def self.can_cleanup_files34false35end3637#38# @return [String] The session description39#40def desc41'PostgreSQL'42end43end444546