Path: blob/master/modules/misc/raw_javascript/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#5class Raw_javascript < BeEF::Core::Command6def self.options7[8{ 'name' => 'cmd', 'description' => 'Javascript Code', 'ui_label' => 'Javascript Code', 'value' => "alert(\'BeEF Raw Javascript\');\nreturn \'It worked!\';",9'type' => 'textarea', 'width' => '400px', 'height' => '100px' }10]11end1213#14# This method is being called when a zombie sends some15# data back to the framework.16#17def post_execute18save({ 'result' => @datastore['result'] })19end20end212223