Path: blob/master/modules/exploits/kemp_command_execution/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 Kemp_command_execution < BeEF::Core::Command6def self.options7[8{ 'name' => 'rhost', 'ui_label' => 'URL', 'value' => 'https://x.x.x.x' },9{ 'name' => 'rport', 'ui_label' => 'Remote Port', 'value' => '443' },10{ 'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '15' },11{ 'name' => 'cmd', 'ui_label' => 'Command', 'description' => 'Enter shell command to execute.', 'type' => 'textarea', 'value' => 'ls', 'width' => '200px' }12]13end1415def post_execute16save({ 'result' => @datastore['result'] }) unless @datastore['result'].nil?17save({ 'fail' => @datastore['fail'] }) unless @datastore['fail'].nil?18end19end202122