diff --git a/core/api/extension.rb b/core/api/extension.rb index c03294dad..1358e32d2 100644 --- a/core/api/extension.rb +++ b/core/api/extension.rb @@ -15,16 +15,16 @@ # module BeEF -module API - module Extension - - attr_reader :full_name, :short_name, :description - - @full_name = '' - @short_name = '' - @description = '' - + module API + module Extension + + attr_reader :full_name, :short_name, :description + + @full_name = '' + @short_name = '' + @description = '' + + end + end - -end end diff --git a/core/api/extensions.rb b/core/api/extensions.rb index 3387c636c..fccda07d8 100644 --- a/core/api/extensions.rb +++ b/core/api/extensions.rb @@ -14,19 +14,19 @@ # limitations under the License. # module BeEF -module API -module Extensions - - # @note Defined API Paths - API_PATHS = { - 'post_load' => :post_load - } - - # API hook fired after all extensions have been loaded - def post_load; end + module API + module Extensions + + # @note Defined API Paths + API_PATHS = { + 'post_load' => :post_load + } + + # API hook fired after all extensions have been loaded + def post_load; end - -end -end + + end + end end diff --git a/core/api/module.rb b/core/api/module.rb index c4bddcf62..5bbfc344d 100644 --- a/core/api/module.rb +++ b/core/api/module.rb @@ -14,58 +14,58 @@ # limitations under the License. # module BeEF -module API + module API - module Command - end + module Command + end - module Module - - # @note Defined API Paths - API_PATHS = { - 'pre_soft_load' => :pre_soft_load, - 'post_soft_load' => :post_soft_load, - 'pre_hard_load' => :pre_hard_load, - 'post_hard_load' => :post_hard_load, - 'get_options' => :get_options, - 'get_payload_options' => :get_payload_options, - 'override_execute' => :override_execute - } - - # Fired before a module soft load - # @param [String] mod module key of module about to be soft loaded - def pre_soft_load(mod); end + module Module - # Fired after module soft load - # @param [String] mod module key of module just after soft load - def post_soft_load(mod); end + # @note Defined API Paths + API_PATHS = { + 'pre_soft_load' => :pre_soft_load, + 'post_soft_load' => :post_soft_load, + 'pre_hard_load' => :pre_hard_load, + 'post_hard_load' => :post_hard_load, + 'get_options' => :get_options, + 'get_payload_options' => :get_payload_options, + 'override_execute' => :override_execute + } - # Fired before a module hard load - # @param [String] mod module key of module about to be hard loaded - def pre_hard_load(mod); end + # Fired before a module soft load + # @param [String] mod module key of module about to be soft loaded + def pre_soft_load(mod); end - # Fired after module hard load - # @param [String] mod module key of module just after hard load - def post_hard_load(mod); end + # Fired after module soft load + # @param [String] mod module key of module just after soft load + def post_soft_load(mod); end - # Fired before standard module options are returned - # @return [Hash] a hash of options - # @note the option hash is merged with all other API hook's returned hash. Hooking this API method prevents the default options being returned. - def get_options; end + # Fired before a module hard load + # @param [String] mod module key of module about to be hard loaded + def pre_hard_load(mod); end - # Fired just before a module is executed - # @param [String] mod module key - # @param [String] hbsession hooked browser session id - # @param [Hash] opts a Hash of options - # @note Hooking this API method stops the default flow of the Module.execute() method. - def override_execute(mod, hbsession, opts); end + # Fired after module hard load + # @param [String] mod module key of module just after hard load + def post_hard_load(mod); end - # Fired when retreiving dynamic payload - # @return [Hash] a hash of options - # @note the option hash is merged with all other API hook's returned hash. Hooking this API method prevents the default options being returned. - def get_payload_options; end + # Fired before standard module options are returned + # @return [Hash] a hash of options + # @note the option hash is merged with all other API hook's returned hash. Hooking this API method prevents the default options being returned. + def get_options; end + + # Fired just before a module is executed + # @param [String] mod module key + # @param [String] hbsession hooked browser session id + # @param [Hash] opts a Hash of options + # @note Hooking this API method stops the default flow of the Module.execute() method. + def override_execute(mod, hbsession, opts); end + + # Fired when retreiving dynamic payload + # @return [Hash] a hash of options + # @note the option hash is merged with all other API hook's returned hash. Hooking this API method prevents the default options being returned. + def get_payload_options; end + + end end - -end end diff --git a/core/api/modules.rb b/core/api/modules.rb index 6f1367db4..1ee8b1a38 100644 --- a/core/api/modules.rb +++ b/core/api/modules.rb @@ -14,19 +14,19 @@ # limitations under the License. # module BeEF -module API + module API - module Modules - - # @note Defined API Paths - API_PATHS = { - 'post_soft_load' => :post_soft_load - } - - # Fires just after all modules are soft loaded - def post_soft_load; end + module Modules + + # @note Defined API Paths + API_PATHS = { + 'post_soft_load' => :post_soft_load + } + + # Fires just after all modules are soft loaded + def post_soft_load; end + + end end - -end end