File tree Expand file tree Collapse file tree 3 files changed +8
-34
lines changed
ui/console/command_dispatcher/stdapi Expand file tree Collapse file tree 3 files changed +8
-34
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,6 @@ def mic_list
33
33
names << tlv . value
34
34
end
35
35
names
36
- # response = client.send_request(Packet.create_request('webcam_list'))
37
- # names = []
38
- # response.get_tlvs(TLV_TYPE_WEBCAM_NAME).each do |tlv|
39
- # names << tlv.value
40
- # end
41
- # names
42
36
end
43
37
44
38
# Starts recording video from video source of index +cam+
@@ -61,31 +55,6 @@ def mic_stop
61
55
true
62
56
end
63
57
64
- # # Starts streaming from audio source of index
65
- # def mic_start
66
- # request = Packet.create_request('audio_interface_start')
67
- #
68
- # response = client.send_request(request)
69
- # channel_id = response.get_tlv_value(TLV_TYPE_CHANNEL_ID)
70
- #
71
- # if(channel_id)
72
- # # audio_channel = Rex::Post::Meterpreter::Channels::Pools::StreamPool.new(
73
- # # client,
74
- # # channel_id,
75
- # # "stdapi_net_mic_broadcast",
76
- # # CHANNEL_FLAG_SYNCHRONOUS
77
- # # )
78
- # audio_channel = Rex::Post::Meterpreter::Channels::Pools::Audio.open(self.client)
79
- # end
80
- #
81
- # return response, audio_channel
82
- # end
83
-
84
- # def mic_stop
85
- # client.send_request(Packet.create_request('mic_stop'))
86
- # true
87
- # end
88
-
89
58
attr_accessor :client
90
59
end
91
60
end
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def shutdown
52
52
client . deregister_inbound_handler ( Rex ::Post ::Meterpreter ::Extensions ::Stdapi ::Net ::SocketSubsystem ::TcpServerChannel )
53
53
end
54
54
55
- ##/
55
+ ##
56
56
#
57
57
# Factory
58
58
#
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ class Console::CommandDispatcher::Stdapi::Mic
23
23
#
24
24
def commands
25
25
{
26
- 'start_capture' => 'play an audio stream from the specified mic' ,
26
+ 'mic_start' => 'play an audio stream from the specified mic' ,
27
+ 'mic_stop' => 'stop capturing audio from device' ,
27
28
'list_audio_interfaces' => 'list all audio interfaces' ,
28
29
'listen' => 'listen to audio via audio player'
29
30
}
@@ -48,7 +49,7 @@ def cmd_list_audio_interfaces
48
49
end
49
50
end
50
51
51
- def cmd_start_capture ( start_delay = 4096 , play_audio = true )
52
+ def cmd_mic_start ( start_delay = 4096 , play_audio = true )
52
53
print_status ( "Streaming mic audio channel..." )
53
54
54
55
if client . mic . mic_list . length == 0
@@ -114,6 +115,10 @@ def cmd_start_capture(start_delay=4096, play_audio=true)
114
115
end
115
116
end
116
117
118
+ def cmd_mic_stop ( index = 0 )
119
+ client . mic . mic_stop ( index )
120
+ end
121
+
117
122
def cmd_listen ( stream_path , player_path = "/Applications/VLC.app/Contents/MacOS/VLC" )
118
123
system ( "#{ player_path } #{ stream_path } &" )
119
124
end
You can’t perform that action at this time.
0 commit comments