Path: blob/master/modules/browser/detect_media_devices/module.rb
4598 views
#1# Copyright (c) 2006-2026 Wade Alcorn - [email protected]2# Browser Exploitation Framework (BeEF) - https://beefproject.com3# See the file 'doc/COPYING' for copying permission4#5class Detect_media_devices < BeEF::Core::Command6def post_execute7content = {}8content['audioinput_count'] = @datastore['audioinput_count'] unless @datastore['audioinput_count'].nil?9content['audioinput_labels'] = @datastore['audioinput_labels'] unless @datastore['audioinput_labels'].nil?10content['audiooutput_count'] = @datastore['audiooutput_count'] unless @datastore['audiooutput_count'].nil?11content['audiooutput_labels'] = @datastore['audiooutput_labels'] unless @datastore['audiooutput_labels'].nil?12content['videoinput_count'] = @datastore['videoinput_count'] unless @datastore['videoinput_count'].nil?13content['videoinput_labels'] = @datastore['videoinput_labels'] unless @datastore['videoinput_labels'].nil?14content['error'] = @datastore['error'] unless @datastore['error'].nil?15save content16end17end181920