Skip to content

Commit 40ce03b

Browse files
committed
Parameterize playback configurations
1 parent 6f8f85d commit 40ce03b

File tree

1 file changed

+4
-4
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi

1 file changed

+4
-4
lines changed

lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/mic.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def cmd_list_audio_interfaces
4848
end
4949
end
5050

51-
def cmd_start_capture
51+
def cmd_start_capture(start_delay=4096, play_audio=true)
5252
print_status("Streaming mic audio channel...")
5353

5454
if client.mic.mic_list.length == 0
@@ -95,7 +95,7 @@ def cmd_start_capture
9595
end
9696
stream_index = 0
9797
while client do
98-
if stream_index == 4096
98+
if play_audio && (stream_index == start_delay)
9999
cmd_listen(stream_path)
100100
end
101101
data = client.mic.mic_get_frame(quality)
@@ -114,8 +114,8 @@ def cmd_start_capture
114114
end
115115
end
116116

117-
def cmd_listen(stream_path)
118-
system("/Applications/VLC.app/Contents/MacOS/VLC #{stream_path} &")
117+
def cmd_listen(stream_path, player_path="/Applications/VLC.app/Contents/MacOS/VLC")
118+
system("#{player_path} #{stream_path} &")
119119
end
120120
end
121121
end

0 commit comments

Comments
 (0)