Class: Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Stdapi_Audio

Inherits:
Object
  • Object
show all
Includes:
Rex::Post::Meterpreter::Ui::Console::CommandDispatcher
Defined in:
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi_audio.rb

Overview

Standard Audio API extension.

Constant Summary collapse

Klass =
Console::CommandDispatcher::Stdapi_Audio
Dispatchers =
[
  Console::CommandDispatcher::Stdapi::Mic,
  Console::CommandDispatcher::Stdapi::AudioOutput
]

Instance Attribute Summary

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

#shell, #tab_complete_items

Class Method Summary collapse

Instance Method Summary collapse

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

check_hash, #client, #docs_dir, #filter_commands, #log_error, #msf_loaded?, #session, set_hash, #unknown_command

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, #print, #print_error, #print_good, #print_line, #print_status, #print_warning, #tab_complete_directory, #tab_complete_filenames, #tab_complete_generic, #tab_complete_source_address, #unknown_command, #update_prompt

Constructor Details

#initialize(shell) ⇒ Stdapi_Audio

Initializes an instance of the stdapi command interaction.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi_audio.rb', line 35

def initialize(shell)
  super

  Dispatchers.each { |d|
    shell.enstack_dispatcher(d)
  }
  str_dispatchers = []
  uniq_dispatchers = []
  idx = 0
  while idx < shell.dispatcher_stack.length
    unless str_dispatchers.include?(shell.dispatcher_stack[idx].class.to_s)
      str_dispatchers.push(shell.dispatcher_stack[idx].class.to_s)
      uniq_dispatchers.push(shell.dispatcher_stack[idx])
    end
    idx += 1
  end
  shell.dispatcher_stack = uniq_dispatchers
end

Class Method Details

.has_command?(name) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi_audio.rb', line 28

def self.has_command?(name)
  Dispatchers.any? { |klass| klass.has_command?(name) }
end

Instance Method Details

#commandsObject

List of supported commands.



57
58
59
60
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi_audio.rb', line 57

def commands
  {
  }
end

#nameObject

Name for this dispatcher



65
66
67
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi_audio.rb', line 65

def name
  "Standard Audio extension"
end