Sha256: 4ce8aab09429e4cbee8b1c2639e9288cc621289d9ef83ee9e6323af8a9fa7c98

Contents?: true

Size: 1.27 KB

Versions: 10

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

require_relative 'wp_version/rss_generator'
require_relative 'wp_version/atom_generator'
require_relative 'wp_version/rdf_generator'
require_relative 'wp_version/readme'
require_relative 'wp_version/unique_fingerprinting'

module WPScan
  module Finders
    # Specific Finders container to filter the version detected
    # and remove the one with low confidence to avoid false
    # positive when there is not enough information to accurately
    # determine it.
    class WpVersionFinders < UniqueFinders
      def filter_findings
        best_finding = super

        best_finding && best_finding.confidence >= 40 ? best_finding : false
      end
    end

    module WpVersion
      # Wp Version Finder
      class Base
        include CMSScanner::Finders::UniqueFinder

        # @param [ WPScan::Target ] target
        def initialize(target)
          (%w[RSSGenerator AtomGenerator RDFGenerator] +
           DB::DynamicFinders::Wordpress.versions_finders_configs.keys +
           %w[Readme UniqueFingerprinting]
          ).each do |finder_name|
            finders << WpVersion.const_get(finder_name.to_sym).new(target)
          end
        end

        def finders
          @finders ||= Finders::WpVersionFinders.new
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
wpscan-3.8.27 app/finders/wp_version.rb
wpscan-3.8.26 app/finders/wp_version.rb
wpscan-3.8.25 app/finders/wp_version.rb
wpscan-3.8.24 app/finders/wp_version.rb
wpscan-3.8.22 app/finders/wp_version.rb
wpscan-3.8.21 app/finders/wp_version.rb
wpscan-3.8.20 app/finders/wp_version.rb
wpscan-3.8.19 app/finders/wp_version.rb
wpscan-3.8.18 app/finders/wp_version.rb
wpscan-3.8.17 app/finders/wp_version.rb