Sha256: fcb082577dba5709356cc39528284e754023516b69a6025c25b6eb0e67c2a2e4

Contents?: true

Size: 927 Bytes

Versions: 13

Compression:

Stored size: 927 Bytes

Contents

require_relative 'plugin_version/readme'

module WPScan
  module Finders
    module PluginVersion
      # Plugin Version Finder
      class Base
        include CMSScanner::Finders::UniqueFinder

        # @param [ WPScan::Plugin ] plugin
        def initialize(plugin)
          finders << PluginVersion::Readme.new(plugin)

          load_specific_finders(plugin)
        end

        # Load the finders associated with the plugin
        #
        # @param [ WPScan::Plugin ] plugin
        def load_specific_finders(plugin)
          module_name = plugin.classify

          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
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
wpscan-3.4.5 app/finders/plugin_version.rb
wpscan-3.4.4 app/finders/plugin_version.rb
wpscan-3.4.3 app/finders/plugin_version.rb
wpscan-3.4.2 app/finders/plugin_version.rb
wpscan-3.4.1 app/finders/plugin_version.rb
wpscan-3.4.0 app/finders/plugin_version.rb
wpscan-3.3.3 app/finders/plugin_version.rb
wpscan-3.3.2 app/finders/plugin_version.rb
wpscan-3.3.1 app/finders/plugin_version.rb
wpscan-3.3.0 app/finders/plugin_version.rb
wpscan-3.2.1 app/finders/plugin_version.rb
wpscan-3.2.0 app/finders/plugin_version.rb
wpscan-3.1.0 app/finders/plugin_version.rb