Class: WPScan::Finders::PluginVersion::Base

Inherits:
Object
  • Object
show all
Includes:
CMSScanner::Finders::UniqueFinder
Defined in:
app/finders/plugin_version.rb

Overview

Plugin Version Finder

Instance Method Summary collapse

Constructor Details

#initialize(plugin) ⇒ Base

Returns a new instance of Base.

Parameters:



13
14
15
16
17
# File 'app/finders/plugin_version.rb', line 13

def initialize(plugin)
  finders << PluginVersion::Readme.new(plugin)

  create_and_load_dynamic_versions_finders(plugin)
end

Instance Method Details

#create_and_load_dynamic_versions_finders(plugin) ⇒ Object

Create the dynamic version finders related to the plugin and register them

Parameters:



22
23
24
25
26
# File 'app/finders/plugin_version.rb', line 22

def create_and_load_dynamic_versions_finders(plugin)
  DB::DynamicFinders::Plugin.create_versions_finders(plugin.slug).each do |finder|
    finders << finder.new(plugin)
  end
end