Path: blob/master/lib/msf/base/sessions/mysql.rb
19758 views
# -*- coding: binary -*-12require 'rex/post/mysql'34class Msf::Sessions::MySQL < Msf::Sessions::Sql56# @param[Rex::IO::Stream] rstream7# @param [Hash] opts8def initialize(rstream, opts = {})9@client = opts.fetch(:client)10self.platform = opts.fetch(:platform)11self.arch = opts.fetch(:arch)12self.console = ::Rex::Post::MySQL::Ui::Console.new(self)13super(rstream, opts)14end1516# @param [Hash] datastore17# @param [nil] handler18# @return [String]19def bootstrap(datastore = {}, handler = nil)20session = self21session.init_ui(user_input, user_output)2223@info = "MySQL #{datastore['USERNAME']} @ #{client.peerinfo}"24end2526# @return [String] The type of the session27def self.type28'mysql'29end3031# @return [Boolean] Can the session clean up after itself32def self.can_cleanup_files33false34end3536# @return [String] The session description37def desc38'MySQL'39end40end414243