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