Class: WPScan::Finders::PluginVersion::Base
- Inherits:
-
Object
- Object
- WPScan::Finders::PluginVersion::Base
- Includes:
- CMSScanner::Finders::UniqueFinder
- Defined in:
- app/finders/plugin_version.rb
Overview
Plugin Version Finder
Instance Method Summary collapse
-
#initialize(plugin) ⇒ Base
constructor
A new instance of Base.
-
#load_specific_finders(plugin) ⇒ Object
Load the finders associated with the plugin.
Constructor Details
#initialize(plugin) ⇒ Base
Returns a new instance of Base.
18 19 20 21 22 |
# File 'app/finders/plugin_version.rb', line 18 def initialize(plugin) finders << PluginVersion::Readme.new(plugin) load_specific_finders(plugin) end |
Instance Method Details
#load_specific_finders(plugin) ⇒ Object
Load the finders associated with the plugin
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/finders/plugin_version.rb', line 27 def load_specific_finders(plugin) module_name = plugin.classify_name.to_sym return unless Finders::PluginVersion.constants.include?(module_name) mod = Finders::PluginVersion.const_get(module_name) mod.constants.each do |constant| c = mod.const_get(constant) next unless c.is_a?(Class) finders << c.new(plugin) end end |