#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#5module BeEF6module API7module Server8# @note Defined API Paths9API_PATHS = {10'mount_handler' => :mount_handler,11'pre_http_start' => :pre_http_start12}.freeze1314# Fires just before the HTTP Server is started15# @param [Object] http_hook_server HTTP Server object16def pre_http_start(http_hook_server); end1718# Fires just after handlers have been mounted19# @param [Object] server HTTP Server object20def mount_handler(server); end2122# Mounts a handler23# @param [String] url URL to be mounted24# @param [Class] http_handler_class the handler Class25# @param [Array] args an array of arguments26# @note This is a direct API call and does not have to be registered to be used27def self.mount(url, http_handler_class, args = nil)28BeEF::Core::Server.instance.mount(url, http_handler_class, *args)29end3031# Unmounts a handler32# @param [String] url URL to be unmounted33# @note This is a direct API call and does not have to be registered to be used34def self.unmount(url)35BeEF::Core::Server.instance.unmount(url)36end37end38end39end404142