Class: Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Stdapi::AudioOutput

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

Overview

Play audio on remote system

Constant Summary collapse

Klass =
Console::CommandDispatcher::Stdapi::AudioOutput

Instance Attribute Summary

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

#shell, #tab_complete_items

Instance Method Summary collapse

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

check_hash, #client, #docs_dir, #filter_commands, #initialize, #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, #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, #unknown_command, #update_prompt

Instance Method Details

#cmd_play(*args) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/audio_output.rb', line 36

def cmd_play(*args)
  if args.length == 0
    print_line('Please specify a path to an audio file')
    return
  end

  audio_path = args[0]

  print_status("Playing #{audio_path}...")
  client.audio_output.play_file(audio_path)
  print_status('Done')
end

#cmd_play_tabs(str, words) ⇒ Object



49
50
51
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/audio_output.rb', line 49

def cmd_play_tabs(str, words)
  tab_complete_filenames(str, words)
end

#commandsObject

List of supported commands.



23
24
25
26
27
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/audio_output.rb', line 23

def commands
  {
    'play' => 'play a waveform audio file (.wav) on the target system'
  }
end

#nameObject

Name for this dispatcher



32
33
34
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/audio_output.rb', line 32

def name
  'Stdapi: Audio Output'
end