Path: blob/master/modules/persistence/confirm_close_tab/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 Confirm_close_tab < BeEF::Core::Command6def self.options7[{8'name' => 'text',9'description' => 'Specifies message to display to the user.',10'type' => 'textarea',11'ui_label' => 'Confirm text',12'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.',13'width' => '400px'14},15{ 'name' => 'usePopUnder',16'type' => 'checkbox',17'ui_label' => 'Create a pop-under window on user\'s tab closing',18'checked' => 'true' }]19end2021def post_execute22save({ 'result' => @datastore['result'] })23end24end252627