Class: Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Stdapi::Mic
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Stdapi::Mic
- Defined in:
- lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb
Overview
Mic - Capture audio from the remote system
Constant Summary collapse
- Klass =
Console::CommandDispatcher::Stdapi::Mic
Constants included from Extensions::Stdapi
Extensions::Stdapi::COMMAND_ID_STDAPI_AUDIO_MIC_LIST, Extensions::Stdapi::COMMAND_ID_STDAPI_AUDIO_MIC_START, Extensions::Stdapi::COMMAND_ID_STDAPI_AUDIO_MIC_STOP, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_CHDIR, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_CHMOD, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_DELETE_DIR, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_DELETE_FILE, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_FILE_COPY, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_FILE_EXPAND_PATH, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_FILE_MOVE, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_GETWD, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_LS, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_MD5, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_MKDIR, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_MOUNT_SHOW, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_SEARCH, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_SEPARATOR, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_SHA1, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_STAT, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_ADD_ROUTE, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_ARP_TABLE, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_INTERFACES, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_NETSTAT, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_PROXY, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_ROUTES, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_REMOVE_ROUTE, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_RESOLVE_HOST, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_RESOLVE_HOSTS, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_SOCKET_TCP_SHUTDOWN, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_TCP_CHANNEL_OPEN, Extensions::Stdapi::COMMAND_ID_STDAPI_RAILGUN_API, Extensions::Stdapi::COMMAND_ID_STDAPI_RAILGUN_API_MULTI, Extensions::Stdapi::COMMAND_ID_STDAPI_RAILGUN_MEMREAD, Extensions::Stdapi::COMMAND_ID_STDAPI_RAILGUN_MEMWRITE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_CHECK_KEY_EXISTS, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_CLOSE_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_CREATE_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_DELETE_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_DELETE_VALUE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_ENUM_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_ENUM_KEY_DIRECT, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_ENUM_VALUE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_ENUM_VALUE_DIRECT, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_LOAD_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_OPEN_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_OPEN_REMOTE_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_QUERY_CLASS, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_QUERY_VALUE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_QUERY_VALUE_DIRECT, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_SET_VALUE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_SET_VALUE_DIRECT, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_UNLOAD_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_DRIVER_LIST, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_DROP_TOKEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_GETENV, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_GETPRIVS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_GETSID, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_GETUID, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_LOCALTIME, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_REV2SELF, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_STEAL_TOKEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_SYSINFO, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_UPDATE_TOKEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_CLEAR, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_CLOSE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_NUMRECORDS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_OLDEST, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_OPEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_READ, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_POWER_EXITWINDOWS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_ATTACH, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_CLOSE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_EXECUTE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_GETPID, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_GET_INFO, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_GET_PROCESSES, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_IMAGE_GET_IMAGES, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_IMAGE_GET_PROC_ADDRESS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_IMAGE_LOAD, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_IMAGE_UNLOAD, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_KILL, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_ALLOCATE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_FREE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_LOCK, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_PROTECT, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_QUERY, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_READ, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_SEARCH, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_UNLOCK, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_WRITE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_SET_TERM_SIZE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_CLOSE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_CREATE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_GET_THREADS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_OPEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_QUERY_REGS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_RESUME, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_SET_REGS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_SUSPEND, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_TERMINATE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_WAIT, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_DESKTOP_ENUM, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_DESKTOP_GET, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_DESKTOP_SCREENSHOT, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_DESKTOP_SET, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_ENABLE_KEYBOARD, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_ENABLE_MOUSE, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_GET_IDLE_TIME, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_GET_KEYS_UTF8, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_SEND_KEYEVENT, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_SEND_KEYS, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_SEND_MOUSE, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_START_KEYSCAN, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_STOP_KEYSCAN, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_UNLOCK_DESKTOP, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_AUDIO_RECORD, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_GET_FRAME, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_LIST, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_START, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_STOP, Extensions::Stdapi::DELETE_KEY_FLAG_RECURSIVE, Extensions::Stdapi::EXTENSION_ID_STDAPI, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_ARG_ARRAY, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_CHANNELIZED, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_DESKTOP, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_HIDDEN, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_PTY, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_SESSION, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_SUBSHELL, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_SUSPENDED, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_USE_THREAD_TOKEN, Extensions::Stdapi::TLV_TYPE_ADDR_TYPE, Extensions::Stdapi::TLV_TYPE_ALLOCATION_TYPE, Extensions::Stdapi::TLV_TYPE_ALLOC_BASE_ADDRESS, Extensions::Stdapi::TLV_TYPE_ALLOC_PROTECTION, Extensions::Stdapi::TLV_TYPE_ARCHITECTURE, Extensions::Stdapi::TLV_TYPE_ARP_ENTRY, Extensions::Stdapi::TLV_TYPE_AUDIO_DATA, Extensions::Stdapi::TLV_TYPE_AUDIO_DURATION, Extensions::Stdapi::TLV_TYPE_AUDIO_INTERFACE_ID, Extensions::Stdapi::TLV_TYPE_AUDIO_INTERFACE_NAME, Extensions::Stdapi::TLV_TYPE_BASE_ADDRESS, Extensions::Stdapi::TLV_TYPE_BASE_KEY, Extensions::Stdapi::TLV_TYPE_BUILD_TUPLE, Extensions::Stdapi::TLV_TYPE_COMPUTER_NAME, Extensions::Stdapi::TLV_TYPE_CONNECT_RETRIES, Extensions::Stdapi::TLV_TYPE_CREATION_FLAGS, Extensions::Stdapi::TLV_TYPE_DESKTOP, Extensions::Stdapi::TLV_TYPE_DESKTOP_NAME, Extensions::Stdapi::TLV_TYPE_DESKTOP_SCREENSHOT, Extensions::Stdapi::TLV_TYPE_DESKTOP_SCREENSHOT_PE32DLL_BUFFER, Extensions::Stdapi::TLV_TYPE_DESKTOP_SCREENSHOT_PE64DLL_BUFFER, Extensions::Stdapi::TLV_TYPE_DESKTOP_SCREENSHOT_QUALITY, Extensions::Stdapi::TLV_TYPE_DESKTOP_SESSION, Extensions::Stdapi::TLV_TYPE_DESKTOP_STATION, Extensions::Stdapi::TLV_TYPE_DESKTOP_SWITCH, Extensions::Stdapi::TLV_TYPE_DIRECTORY_PATH, Extensions::Stdapi::TLV_TYPE_DOMAIN, Extensions::Stdapi::TLV_TYPE_DRIVER_BASENAME, Extensions::Stdapi::TLV_TYPE_DRIVER_ENTRY, Extensions::Stdapi::TLV_TYPE_DRIVER_FILENAME, Extensions::Stdapi::TLV_TYPE_ENTRY_PARAMETER, Extensions::Stdapi::TLV_TYPE_ENTRY_POINT, Extensions::Stdapi::TLV_TYPE_ENV_GROUP, Extensions::Stdapi::TLV_TYPE_ENV_VALUE, Extensions::Stdapi::TLV_TYPE_ENV_VARIABLE, Extensions::Stdapi::TLV_TYPE_EVENT_CATEGORY, Extensions::Stdapi::TLV_TYPE_EVENT_DATA, Extensions::Stdapi::TLV_TYPE_EVENT_HANDLE, Extensions::Stdapi::TLV_TYPE_EVENT_ID, Extensions::Stdapi::TLV_TYPE_EVENT_NUMRECORDS, Extensions::Stdapi::TLV_TYPE_EVENT_READFLAGS, Extensions::Stdapi::TLV_TYPE_EVENT_RECORDNUMBER, Extensions::Stdapi::TLV_TYPE_EVENT_RECORDOFFSET, Extensions::Stdapi::TLV_TYPE_EVENT_SOURCENAME, Extensions::Stdapi::TLV_TYPE_EVENT_STRING, Extensions::Stdapi::TLV_TYPE_EVENT_TIMEGENERATED, Extensions::Stdapi::TLV_TYPE_EVENT_TIMEWRITTEN, Extensions::Stdapi::TLV_TYPE_EVENT_TYPE, Extensions::Stdapi::TLV_TYPE_EXIT_CODE, Extensions::Stdapi::TLV_TYPE_FILE_HASH, Extensions::Stdapi::TLV_TYPE_FILE_MODE, Extensions::Stdapi::TLV_TYPE_FILE_MODE_T, Extensions::Stdapi::TLV_TYPE_FILE_NAME, Extensions::Stdapi::TLV_TYPE_FILE_PATH, Extensions::Stdapi::TLV_TYPE_FILE_SHORT_NAME, Extensions::Stdapi::TLV_TYPE_FILE_SIZE, Extensions::Stdapi::TLV_TYPE_GATEWAY, Extensions::Stdapi::TLV_TYPE_GATEWAY_STRING, Extensions::Stdapi::TLV_TYPE_HANDLE, Extensions::Stdapi::TLV_TYPE_HKEY, Extensions::Stdapi::TLV_TYPE_HOST_NAME, Extensions::Stdapi::TLV_TYPE_IDLE_TIME, Extensions::Stdapi::TLV_TYPE_IMAGE_BASE, Extensions::Stdapi::TLV_TYPE_IMAGE_FILE, Extensions::Stdapi::TLV_TYPE_IMAGE_FILE_PATH, Extensions::Stdapi::TLV_TYPE_IMAGE_GROUP, Extensions::Stdapi::TLV_TYPE_IMAGE_NAME, Extensions::Stdapi::TLV_TYPE_INHERIT, Extensions::Stdapi::TLV_TYPE_INTERFACE_FLAGS, Extensions::Stdapi::TLV_TYPE_INTERFACE_INDEX, Extensions::Stdapi::TLV_TYPE_INTERFACE_MTU, Extensions::Stdapi::TLV_TYPE_IP, Extensions::Stdapi::TLV_TYPE_IP6_SCOPE, Extensions::Stdapi::TLV_TYPE_IP_PREFIX, Extensions::Stdapi::TLV_TYPE_KEYEVENT_SEND, Extensions::Stdapi::TLV_TYPE_KEYSCAN_TRACK_ACTIVE_WINDOW, Extensions::Stdapi::TLV_TYPE_KEYS_DUMP, Extensions::Stdapi::TLV_TYPE_KEYS_SEND, Extensions::Stdapi::TLV_TYPE_KEY_NAME, Extensions::Stdapi::TLV_TYPE_LANG_SYSTEM, Extensions::Stdapi::TLV_TYPE_LOCAL_DATETIME, Extensions::Stdapi::TLV_TYPE_LOCAL_HOST, Extensions::Stdapi::TLV_TYPE_LOCAL_HOST_RAW, Extensions::Stdapi::TLV_TYPE_LOCAL_PORT, Extensions::Stdapi::TLV_TYPE_LOGGED_ON_USER_COUNT, Extensions::Stdapi::TLV_TYPE_MAC_ADDRESS, Extensions::Stdapi::TLV_TYPE_MAC_NAME, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_MATCH_ADDR, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_MATCH_LEN, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_MATCH_STR, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_NEEDLE, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_RESULTS, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_SECT_LEN, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_START_ADDR, Extensions::Stdapi::TLV_TYPE_MEMORY_STATE, Extensions::Stdapi::TLV_TYPE_MEMORY_TYPE, Extensions::Stdapi::TLV_TYPE_MOUNT, Extensions::Stdapi::TLV_TYPE_MOUNT_NAME, Extensions::Stdapi::TLV_TYPE_MOUNT_SPACE_FREE, Extensions::Stdapi::TLV_TYPE_MOUNT_SPACE_TOTAL, Extensions::Stdapi::TLV_TYPE_MOUNT_SPACE_USER, Extensions::Stdapi::TLV_TYPE_MOUNT_TYPE, Extensions::Stdapi::TLV_TYPE_MOUNT_UNCPATH, Extensions::Stdapi::TLV_TYPE_MOUSE_ACTION, Extensions::Stdapi::TLV_TYPE_MOUSE_X, Extensions::Stdapi::TLV_TYPE_MOUSE_Y, Extensions::Stdapi::TLV_TYPE_NETMASK, Extensions::Stdapi::TLV_TYPE_NETMASK_STRING, Extensions::Stdapi::TLV_TYPE_NETSTAT_ENTRY, Extensions::Stdapi::TLV_TYPE_NETWORK_INTERFACE, Extensions::Stdapi::TLV_TYPE_NETWORK_ROUTE, Extensions::Stdapi::TLV_TYPE_OS_NAME, Extensions::Stdapi::TLV_TYPE_PARENT_PID, Extensions::Stdapi::TLV_TYPE_PEER_HOST, Extensions::Stdapi::TLV_TYPE_PEER_HOST_RAW, Extensions::Stdapi::TLV_TYPE_PEER_PORT, Extensions::Stdapi::TLV_TYPE_PERMISSION, Extensions::Stdapi::TLV_TYPE_PID, Extensions::Stdapi::TLV_TYPE_PORT, Extensions::Stdapi::TLV_TYPE_POWER_FLAGS, Extensions::Stdapi::TLV_TYPE_POWER_REASON, Extensions::Stdapi::TLV_TYPE_PRIVILEGE, Extensions::Stdapi::TLV_TYPE_PROCEDURE_ADDRESS, Extensions::Stdapi::TLV_TYPE_PROCEDURE_NAME, Extensions::Stdapi::TLV_TYPE_PROCESS_ARCH, Extensions::Stdapi::TLV_TYPE_PROCESS_ARCH_NAME, Extensions::Stdapi::TLV_TYPE_PROCESS_ARGUMENT, Extensions::Stdapi::TLV_TYPE_PROCESS_ARGUMENTS, Extensions::Stdapi::TLV_TYPE_PROCESS_FLAGS, Extensions::Stdapi::TLV_TYPE_PROCESS_GROUP, Extensions::Stdapi::TLV_TYPE_PROCESS_HANDLE, Extensions::Stdapi::TLV_TYPE_PROCESS_MEMORY, Extensions::Stdapi::TLV_TYPE_PROCESS_NAME, Extensions::Stdapi::TLV_TYPE_PROCESS_PATH, Extensions::Stdapi::TLV_TYPE_PROCESS_PERMS, Extensions::Stdapi::TLV_TYPE_PROCESS_SESSION, Extensions::Stdapi::TLV_TYPE_PROCESS_UNESCAPED_PATH, Extensions::Stdapi::TLV_TYPE_PROTECTION, Extensions::Stdapi::TLV_TYPE_PROXY_CFG_AUTOCONFIGURL, Extensions::Stdapi::TLV_TYPE_PROXY_CFG_AUTODETECT, Extensions::Stdapi::TLV_TYPE_PROXY_CFG_PROXY, Extensions::Stdapi::TLV_TYPE_PROXY_CFG_PROXYBYPASS, Extensions::Stdapi::TLV_TYPE_REGISTER, Extensions::Stdapi::TLV_TYPE_REGISTER_NAME, Extensions::Stdapi::TLV_TYPE_REGISTER_SIZE, Extensions::Stdapi::TLV_TYPE_REGISTER_VALUE_32, Extensions::Stdapi::TLV_TYPE_ROOT_KEY, Extensions::Stdapi::TLV_TYPE_ROUTE_METRIC, Extensions::Stdapi::TLV_TYPE_SEARCH_GLOB, Extensions::Stdapi::TLV_TYPE_SEARCH_MTIME, Extensions::Stdapi::TLV_TYPE_SEARCH_M_END_DATE, Extensions::Stdapi::TLV_TYPE_SEARCH_M_START_DATE, Extensions::Stdapi::TLV_TYPE_SEARCH_RECURSE, Extensions::Stdapi::TLV_TYPE_SEARCH_RESULTS, Extensions::Stdapi::TLV_TYPE_SEARCH_ROOT, Extensions::Stdapi::TLV_TYPE_SHUTDOWN_HOW, Extensions::Stdapi::TLV_TYPE_SID, Extensions::Stdapi::TLV_TYPE_STAT_BUF, Extensions::Stdapi::TLV_TYPE_STAT_BUF32, Extensions::Stdapi::TLV_TYPE_SUBNET, Extensions::Stdapi::TLV_TYPE_SUBNET_STRING, Extensions::Stdapi::TLV_TYPE_TARGET_HOST, Extensions::Stdapi::TLV_TYPE_TERMINAL_COLUMNS, Extensions::Stdapi::TLV_TYPE_TERMINAL_ROWS, Extensions::Stdapi::TLV_TYPE_THREAD_HANDLE, Extensions::Stdapi::TLV_TYPE_THREAD_ID, Extensions::Stdapi::TLV_TYPE_THREAD_PERMS, Extensions::Stdapi::TLV_TYPE_USER_NAME, Extensions::Stdapi::TLV_TYPE_VALUE_DATA, Extensions::Stdapi::TLV_TYPE_VALUE_NAME, Extensions::Stdapi::TLV_TYPE_VALUE_TYPE, Extensions::Stdapi::TLV_TYPE_WEBCAM_IMAGE, Extensions::Stdapi::TLV_TYPE_WEBCAM_INTERFACE_ID, Extensions::Stdapi::TLV_TYPE_WEBCAM_NAME, Extensions::Stdapi::TLV_TYPE_WEBCAM_QUALITY
Instance Attribute Summary
Attributes included from Ui::Text::DispatcherShell::CommandDispatcher
Instance Method Summary collapse
- #audio_file_wave_header(sample_rate_hz:, num_channels:, bits_per_sample:, data_size:) ⇒ Object
- #cmd_listen(*args) ⇒ Object
- #cmd_mic_list ⇒ Object
- #cmd_mic_start(*args) ⇒ Object
- #cmd_mic_stop ⇒ Object
-
#commands ⇒ Object
List of supported commands.
-
#name ⇒ Object
Name for this dispatcher.
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
#audio_file_wave_header(sample_rate_hz:, num_channels:, bits_per_sample:, data_size:) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb', line 61 def audio_file_wave_header(sample_rate_hz:, num_channels:, bits_per_sample:, data_size:) subchunk1_size = 16 chunk_size = 4 + (8 + subchunk1_size) + (8 + data_size) byte_rate = sample_rate_hz * num_channels * bits_per_sample / 8 block_align = num_channels * bits_per_sample / 8 [ BinData::Int32be.new(0x52494646), # ChunkID: "RIFF" BinData::Int32le.new(chunk_size), # ChunkSize BinData::Int32be.new(0x57415645), # Format: "WAVE" BinData::Int32be.new(0x666d7420), # SubChunk1ID: "fmt " BinData::Int32le.new(16), # SubChunk1Size BinData::Int16le.new(1), # AudioFormat BinData::Int16le.new(num_channels), # NumChannels BinData::Int32le.new(sample_rate_hz), # SampleRate BinData::Int32le.new(byte_rate), # ByteRate BinData::Int16le.new(block_align), # BlockAlign BinData::Int16le.new(bits_per_sample), # BitsPerSample BinData::Int32be.new(0x64617461), # SubChunk2ID: "data" BinData::Int32le.new(data_size) # SubChunk2Size ] end |
#cmd_listen(*args) ⇒ Object
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb', line 167 def cmd_listen(*args) filename = nil listen_opts = Rex::Parser::Arguments.new( "-h" => [ false, "Help Banner" ], "-f" => [ true, "audio filename" ] ) listen_opts.parse(args) do |opt, _idx, val| case opt when "-h" print_line("Usage: listen -f <filename>\n") print_line("Plays saved audio from a file.") print_line(listen_opts.usage) return when "-f" filename = val end end if filename.nil? print_error("use '-f' option to provide a filename for playback") return end Rex::Compat.play_sound(::File.(filename)) end |
#cmd_mic_list ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb', line 49 def cmd_mic_list client.mic.mic_list if client.mic.mic_list.length == 0 print_error("No mics were found") return end client.mic.mic_list.each_with_index do |name, indx| print_line("#{indx + 1}: #{name}") end end |
#cmd_mic_start(*args) ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb', line 84 def cmd_mic_start(*args) get_data = lambda do |channel, file| data = channel.read(65536) if data ::File.open(file, 'a') do |f| f.write(data) end return data.length end return 0 end device_id = 1 duration = 1800 saved_audio_path = Rex::Text.rand_text_alpha(8) + ".wav" mic_start_opts = Rex::Parser::Arguments.new( "-h" => [ false, "Help Banner" ], "-d" => [ true, "The stream duration in seconds (Default: 1800)" ], # 30 min "-m" => [ true, "Microphone device index to record from (1: system default)" ], "-s" => [ true, "The saved audio file path (Default: '#{saved_audio_path}')" ] ) mic_start_opts.parse(args) do |opt, _idx, val| case opt when "-h" print_line("Usage: mic_start [options]\n") print_line("Streams and records audio from the target microphone.") print_line(mic_start_opts.usage) return when "-d" duration = val.to_i when "-m" device_id = val.to_i when "-s" saved_audio_path = val end end mic_list = client.mic.mic_list if mic_list.length == 0 print_error("Target does not have a mic") return end if device_id < 1 || device_id > mic_list.length print_error("Target does not have a mic with an id of #{device_id}") return end channel = client.mic.mic_start(device_id) if channel.nil? print_error("Mic failed to start streaming.") return end print_status("Saving to audio file: #{saved_audio_path}") print_status("Streaming started...") total_data_len = 0 begin ::File.open(saved_audio_path, 'wb') do |outfile| audio_file_wave_header(sample_rate_hz: 11025, num_channels: 1, bits_per_sample: 16, data_size: 2_000_000_000).each { |e| e.write(outfile) } end ::Timeout.timeout(duration) do while client do Rex::sleep(0.5) total_data_len += get_data.call(channel, saved_audio_path) end end rescue ::Timeout::Error ensure total_data_len += get_data.call(channel, saved_audio_path) client.mic.mic_stop print_status("Streaming stopped.") # Now that we know the actual length of data, update the file header. ::File.open(saved_audio_path, 'rb+') do |outfile| outfile.seek(0, ::IO::SEEK_SET) audio_file_wave_header(sample_rate_hz: 11025, num_channels: 1, bits_per_sample: 16, data_size: total_data_len).each { |e| e.write(outfile) } end end end |
#cmd_mic_stop ⇒ Object
195 196 197 |
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb', line 195 def cmd_mic_stop client.mic.mic_stop end |
#commands ⇒ Object
List of supported commands.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb', line 25 def commands all = { 'mic_start' => 'start capturing an audio stream from the target mic', 'mic_stop' => 'stop capturing audio', 'mic_list' => 'list all microphone interfaces', 'listen' => 'listen to a saved audio recording via audio player' } reqs = { 'mic_start' => [COMMAND_ID_STDAPI_AUDIO_MIC_START], 'mic_stop' => [COMMAND_ID_STDAPI_AUDIO_MIC_STOP], 'mic_list' => [COMMAND_ID_STDAPI_AUDIO_MIC_LIST], 'listen' => [COMMAND_ID_STDAPI_AUDIO_MIC_START] } filter_commands(all, reqs) end |
#name ⇒ Object
Name for this dispatcher
45 46 47 |
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb', line 45 def name "Stdapi: Mic" end |