Class: Rex::Post::SMB::Ui::Console::CommandDispatcher::Core

Inherits:
Object
  • Object
show all
Includes:
Rex::Post::SMB::Ui::Console::CommandDispatcher
Defined in:
lib/rex/post/smb/ui/console/command_dispatcher/core.rb

Overview

Core SMB client commands

Instance Attribute Summary

Attributes included from Ui::Text::DispatcherShell::CommandDispatcher

#shell, #tab_complete_items

Instance Method Summary collapse

Methods included from Rex::Post::SMB::Ui::Console::CommandDispatcher

#active_share, #client, #docs_dir, #filter_commands, #initialize, #log_error, #msf_loaded?, #session, #simple_client

Methods included from Msf::Ui::Console::CommandDispatcher::Session

#cmd_background, #cmd_background_help, #cmd_exit, #cmd_irb, #cmd_irb_help, #cmd_irb_tabs, #cmd_pry, #cmd_pry_help, #cmd_resource, #cmd_resource_help, #cmd_resource_tabs, #cmd_sessions, #cmd_sessions_help

Methods included from Ui::Text::DispatcherShell::CommandDispatcher

#cmd_help, #cmd_help_help, #cmd_help_tabs, #deprecated_cmd, #deprecated_commands, #deprecated_help, #docs_dir, #help_to_s, included, #initialize, #print, #print_error, #print_good, #print_line, #print_status, #print_warning, #tab_complete_directory, #tab_complete_filenames, #tab_complete_generic, #tab_complete_source_address, #update_prompt

Instance Method Details

#commandsObject

List of supported commands.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rex/post/smb/ui/console/command_dispatcher/core.rb', line 27

def commands
  cmds = {
    '?' => 'Help menu',
    'background' => 'Backgrounds the current session',
    'bg' => 'Alias for background',
    'exit' => 'Terminate the SMB session',
    'help' => 'Help menu',
    'irb' => 'Open an interactive Ruby shell on the current session',
    'pry' => 'Open the Pry debugger on the current session',
    'sessions' => 'Quickly switch to another session'
  }

  reqs = {}

  filter_commands(cmds, reqs)
end

#nameObject

Core



47
48
49
# File 'lib/rex/post/smb/ui/console/command_dispatcher/core.rb', line 47

def name
  'Core'
end

#unknown_command(cmd, line) ⇒ Object



51
52
53
54
55
# File 'lib/rex/post/smb/ui/console/command_dispatcher/core.rb', line 51

def unknown_command(cmd, line)
  status = super

  status
end