Path: blob/master/modules/browser/webcam_html5/module.rb
1154 views
#1# Copyright (c) 2006-2025 Wade Alcorn - [email protected]2# Browser Exploitation Framework (BeEF) - https://beefproject.com3# See the file 'doc/COPYING' for copying permission4#5require 'base64'6class Webcam_html5 < BeEF::Core::Command7def self.options8[9{ 'name' => 'choice', 'type' => 'combobox', 'ui_label' => 'Screenshot size', 'store_type' => 'arraystore', 'store_fields' => ['choice'],10'store_data' => [['320x240'], ['640x480'], ['Full']], 'valueField' => 'choice', 'value' => '320x240', editable: false, 'displayField' => 'choice', 'mode' => 'local', 'autoWidth' => true },11]12end13def post_execute14content = {}15content['result'] = @datastore['result'] unless @datastore['result'].nil?16content['image'] = @datastore['image'] unless @datastore['image'].nil?17save content18end19end202122