Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/extensions/proxy/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 Proxy
9
module API
10
module RegisterHttpHandler
11
BeEF::API::Registrar.instance.register(BeEF::Extension::Proxy::API::RegisterHttpHandler, BeEF::API::Server, 'pre_http_start')
12
BeEF::API::Registrar.instance.register(BeEF::Extension::Proxy::API::RegisterHttpHandler, BeEF::API::Server, 'mount_handler')
13
14
def self.pre_http_start(http_hook_server)
15
config = BeEF::Core::Configuration.instance
16
Thread.new do
17
http_hook_server.semaphore.synchronize do
18
BeEF::Extension::Proxy::Proxy.new
19
end
20
end
21
end
22
23
def self.mount_handler(beef_server)
24
beef_server.mount('/api/proxy', BeEF::Extension::Proxy::ProxyRest.new)
25
end
26
end
27
end
28
end
29
end
30
end
31
32