Class: Msf::Sessions::MSSQL
Instance Attribute Summary collapse
-
#framework ⇒ Object
readonly
Returns the value of attribute framework.
Attributes inherited from Sql
#arch, #client, #console, #platform
Attributes included from Msf::Session::Interactive
Attributes included from Rex::Ui::Interactive
#completed, #interacting, #next_session, #on_command_proc, #on_print_proc, #on_run_command_error_proc, #orig_suspend, #orig_usr1, #orig_winch
Attributes included from Rex::Ui::Subscriber::Input
Attributes included from Rex::Ui::Subscriber::Output
Attributes included from Msf::Session
#alive, #db_record, #exploit, #exploit_datastore, #exploit_task, #exploit_uuid, #info, #machine_id, #payload_uuid, #routes, #sid, #sname, #target_host, #target_port, #username, #uuid, #via, #workspace
Class Method Summary collapse
- .can_cleanup_files ⇒ Object
-
.type ⇒ Object
Returns the type of session.
Instance Method Summary collapse
- #bootstrap(datastore = {}, handler = nil) ⇒ Object
-
#desc ⇒ Object
Returns the session description.
-
#initialize(rstream, opts = {}) ⇒ MSSQL
constructor
A new instance of MSSQL.
Methods inherited from Sql
#_interact, #_interact_stream, #address, #execute_file, #exit, #init_ui, #port, #process_autoruns, #reset_ui, #run_cmd, #type
Methods included from Scriptable
#execute_file, #execute_script, included, #legacy_script_to_post_module
Methods included from Msf::Session::Basic
Methods included from Msf::Session::Interactive
#_interact, #_interact_complete, #_interrupt, #_suspend, #_usr1, #abort_foreground, #abort_foreground_supported, #cleanup, #comm_channel, #interactive?, #kill, #run_cmd, #tunnel_local, #tunnel_peer, #user_want_abort?
Methods included from Rex::Ui::Interactive
#_interact, #_interact_complete, #_interrupt, #_local_fd, #_remote_fd, #_stream_read_local_write_remote, #_stream_read_remote_write_local, #_suspend, #_winch, #detach, #handle_suspend, #handle_usr1, #handle_winch, #interact, #interact_stream, #prompt, #prompt_yesno, #restore_suspend, #restore_usr1, #restore_winch
Methods included from Rex::Ui::Subscriber
Methods included from Rex::Ui::Subscriber::Input
Methods included from Rex::Ui::Subscriber::Output
#flush, #print, #print_blank_line, #print_error, #print_good, #print_line, #print_status, #print_warning
Methods included from Msf::Session
#alive?, #cleanup, #comm_channel, #dead?, #inspect, #interactive?, #kill, #log_file_name, #log_source, #name, #name=, #register?, #session_host, #session_host=, #session_port, #session_port=, #session_type, #set_from_exploit, #set_via, #tunnel_local, #tunnel_peer, #tunnel_to_s, #type, #via_exploit, #via_payload
Constructor Details
#initialize(rstream, opts = {}) ⇒ MSSQL
Returns a new instance of MSSQL.
9 10 11 12 13 14 15 16 |
# File 'lib/msf/base/sessions/mssql.rb', line 9 def initialize(rstream, opts = {}) @client = opts.fetch(:client) self.platform = opts.fetch(:platform) self.arch = opts.fetch(:arch) self.console = ::Rex::Post::MSSQL::Ui::Console.new(self, opts) super(rstream, opts) end |
Instance Attribute Details
#framework ⇒ Object (readonly)
Returns the value of attribute framework.
7 8 9 |
# File 'lib/msf/base/sessions/mssql.rb', line 7 def framework @framework end |
Class Method Details
.can_cleanup_files ⇒ Object
31 32 33 |
# File 'lib/msf/base/sessions/mssql.rb', line 31 def self.can_cleanup_files false end |
.type ⇒ Object
Returns the type of session.
27 28 29 |
# File 'lib/msf/base/sessions/mssql.rb', line 27 def self.type 'mssql' end |
Instance Method Details
#bootstrap(datastore = {}, handler = nil) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/msf/base/sessions/mssql.rb', line 18 def bootstrap(datastore = {}, handler = nil) session = self session.init_ui(user_input, user_output) @info = "MSSQL #{datastore['USERNAME']} @ #{@peer_info}" end |
#desc ⇒ Object
Returns the session description.
38 39 40 |
# File 'lib/msf/base/sessions/mssql.rb', line 38 def desc 'MSSQL' end |