Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/browser/detect_media_devices/module.rb
4598 views
1
#
2
# Copyright (c) 2006-2026 Wade Alcorn - [email protected]
3
# Browser Exploitation Framework (BeEF) - https://beefproject.com
4
# See the file 'doc/COPYING' for copying permission
5
#
6
class Detect_media_devices < BeEF::Core::Command
7
def post_execute
8
content = {}
9
content['audioinput_count'] = @datastore['audioinput_count'] unless @datastore['audioinput_count'].nil?
10
content['audioinput_labels'] = @datastore['audioinput_labels'] unless @datastore['audioinput_labels'].nil?
11
content['audiooutput_count'] = @datastore['audiooutput_count'] unless @datastore['audiooutput_count'].nil?
12
content['audiooutput_labels'] = @datastore['audiooutput_labels'] unless @datastore['audiooutput_labels'].nil?
13
content['videoinput_count'] = @datastore['videoinput_count'] unless @datastore['videoinput_count'].nil?
14
content['videoinput_labels'] = @datastore['videoinput_labels'] unless @datastore['videoinput_labels'].nil?
15
content['error'] = @datastore['error'] unless @datastore['error'].nil?
16
save content
17
end
18
end
19
20