Sha256: e47c7995de54c93144ae98e0776963fbe90527a412b533f283f234bc9f2dfb01

Contents?: true

Size: 1.02 KB

Versions: 13

Compression:

Stored size: 1.02 KB

Contents

require_relative 'theme_version/style'
require_relative 'theme_version/woo_framework_meta_generator'

module WPScan
  module Finders
    module ThemeVersion
      # Theme Version Finder
      class Base
        include CMSScanner::Finders::UniqueFinder

        # @param [ WPScan::Theme ] theme
        def initialize(theme)
          finders <<
            ThemeVersion::Style.new(theme) <<
            ThemeVersion::WooFrameworkMetaGenerator.new(theme)

          load_specific_finders(theme)
        end

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

          return unless Finders::ThemeVersion.constants.include?(module_name)

          mod = Finders::ThemeVersion.const_get(module_name)

          mod.constants.each do |constant|
            c = mod.const_get(constant)

            next unless c.is_a?(Class)

            finders << c.new(theme)
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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