#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 Command8end910module Module11# @note Defined API Paths12API_PATHS = {13'pre_soft_load' => :pre_soft_load,14'post_soft_load' => :post_soft_load,15'pre_hard_load' => :pre_hard_load,16'post_hard_load' => :post_hard_load,17'get_options' => :get_options,18'get_payload_options' => :get_payload_options,19'override_execute' => :override_execute20}.freeze2122# Fired before a module soft load23# @param [String] mod module key of module about to be soft loaded24def pre_soft_load(mod); end2526# Fired after module soft load27# @param [String] mod module key of module just after soft load28def post_soft_load(mod); end2930# Fired before a module hard load31# @param [String] mod module key of module about to be hard loaded32def pre_hard_load(mod); end3334# Fired after module hard load35# @param [String] mod module key of module just after hard load36def post_hard_load(mod); end3738# Fired before standard module options are returned39# @return [Hash] a hash of options40# @note the option hash is merged with all other API hook's returned hash. Hooking this API method prevents the default options being returned.41def get_options; end4243# Fired just before a module is executed44# @param [String] mod module key45# @param [String] hbsession hooked browser session id46# @param [Hash] opts a Hash of options47# @note Hooking this API method stops the default flow of the Module.execute() method.48def override_execute(mod, hbsession, opts); end4950# Fired when retreiving dynamic payload51# @return [Hash] a hash of options52# @note the option hash is merged with all other API hook's returned hash. Hooking this API method prevents the default options being returned.53def get_payload_options; end54end55end56end575859