Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/browser/hooked_origin/deface_web_page/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 Deface_web_page < BeEF::Core::Command
7
def self.options
8
@configuration = BeEF::Core::Configuration.instance
9
proto = @configuration.beef_proto
10
beef_host = @configuration.beef_host
11
beef_port = @configuration.beef_port
12
base_host = "#{proto}://#{beef_host}:#{beef_port}"
13
14
favicon_uri = "#{base_host}/ui/media/images/favicon.ico"
15
[
16
{ 'name' => 'deface_title', 'description' => 'Page Title', 'ui_label' => 'New Title', 'value' => 'BeEF - The Browser Exploitation Framework Project',
17
'width' => '200px' },
18
{ 'name' => 'deface_favicon', 'description' => 'Shortcut Icon', 'ui_label' => 'New Favicon', 'value' => favicon_uri, 'width' => '200px' },
19
{ 'name' => 'deface_content', 'description' => 'Your defacement content', 'ui_label' => 'Deface Content', 'type' => 'textarea', 'value' => 'BeEF!', 'width' => '400px',
20
'height' => '100px' }
21
]
22
end
23
24
def post_execute
25
content = {}
26
content['Result'] = @datastore['result']
27
save content
28
end
29
end
30
31