Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/persistence/confirm_close_tab/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 Confirm_close_tab < BeEF::Core::Command
7
def self.options
8
[{
9
'name' => 'text',
10
'description' => 'Specifies message to display to the user.',
11
'type' => 'textarea',
12
'ui_label' => 'Confirm text',
13
'value' => 'Are you sure you want to navigate away from this page?\n\n There is currently a request to the server pending. You will lose recent changes by navigating away.\n\n Press OK to continue, or Cancel to stay on the current page.',
14
'width' => '400px'
15
},
16
{ 'name' => 'usePopUnder',
17
'type' => 'checkbox',
18
'ui_label' => 'Create a pop-under window on user\'s tab closing',
19
'checked' => 'true' }]
20
end
21
22
def post_execute
23
save({ 'result' => @datastore['result'] })
24
end
25
end
26
27