Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/misc/raw_javascript/module.rb
1154 views
1
#
2
# Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
# Browser Exploitation Framework (BeEF) - https://beefproject.com
4
# See the file 'doc/COPYING' for copying permission
5
#
6
class Raw_javascript < BeEF::Core::Command
7
def self.options
8
[
9
{ 'name' => 'cmd', 'description' => 'Javascript Code', 'ui_label' => 'Javascript Code', 'value' => "alert(\'BeEF Raw Javascript\');\nreturn \'It worked!\';",
10
'type' => 'textarea', 'width' => '400px', 'height' => '100px' }
11
]
12
end
13
14
#
15
# This method is being called when a zombie sends some
16
# data back to the framework.
17
#
18
def post_execute
19
save({ 'result' => @datastore['result'] })
20
end
21
end
22
23