Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/kemp_command_execution/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 Kemp_command_execution < BeEF::Core::Command
7
def self.options
8
[
9
{ 'name' => 'rhost', 'ui_label' => 'URL', 'value' => 'https://x.x.x.x' },
10
{ 'name' => 'rport', 'ui_label' => 'Remote Port', 'value' => '443' },
11
{ 'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '15' },
12
{ 'name' => 'cmd', 'ui_label' => 'Command', 'description' => 'Enter shell command to execute.', 'type' => 'textarea', 'value' => 'ls', 'width' => '200px' }
13
]
14
end
15
16
def post_execute
17
save({ 'result' => @datastore['result'] }) unless @datastore['result'].nil?
18
save({ 'fail' => @datastore['fail'] }) unless @datastore['fail'].nil?
19
end
20
end
21
22