Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wpscanteam
GitHub Repository: wpscanteam/wpscan
Path: blob/master/app/finders/plugin_version.rb
485 views
1
# frozen_string_literal: true
2
3
require_relative 'plugin_version/readme'
4
5
module WPScan
6
module Finders
7
module PluginVersion
8
# Plugin Version Finder
9
class Base
10
include CMSScanner::Finders::UniqueFinder
11
12
# @param [ Model::Plugin ] plugin
13
def initialize(plugin)
14
finders << PluginVersion::Readme.new(plugin)
15
16
create_and_load_dynamic_versions_finders(plugin)
17
end
18
19
# Create the dynamic version finders related to the plugin and register them
20
#
21
# @param [ Model::Plugin ] plugin
22
def create_and_load_dynamic_versions_finders(plugin)
23
DB::DynamicFinders::Plugin.create_versions_finders(plugin.slug).each do |finder|
24
finders << finder.new(plugin)
25
end
26
end
27
end
28
end
29
end
30
end
31
32