Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/extensions/dns_rebinding/api.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
module BeEF
7
module Extension
8
module DNSRebinding
9
module API
10
module ServHandler
11
BeEF::API::Registrar.instance.register(
12
BeEF::Extension::DNSRebinding::API::ServHandler,
13
BeEF::API::Server,
14
'pre_http_start'
15
)
16
17
def self.pre_http_start(_http_hook_server)
18
config = BeEF::Core::Configuration.instance.get('beef.extension.dns_rebinding')
19
address_http = config['address_http_internal']
20
address_proxy = config['address_proxy_internal']
21
port_http = config['port_http']
22
port_proxy = config['port_proxy']
23
Thread.new { BeEF::Extension::DNSRebinding::Server.run_server(address_http, port_http) }
24
Thread.new { BeEF::Extension::DNSRebinding::Proxy.run_server(address_proxy, port_proxy) }
25
end
26
end
27
end
28
end
29
end
30
end
31
32