Sha256: b5721af16ce068c7f7fc48a3c4cb55559f3d9499aa60c565a4076814850c8cb6

Contents?: true

Size: 962 Bytes

Versions: 42

Compression:

Stored size: 962 Bytes

Contents

# frozen_string_literal: true

module WPScan
  module Finders
    module Plugins
      # Plugins finder from Dynamic Finder 'BodyPattern'
      class BodyPattern < Finders::DynamicFinder::WpItems::Finder
        DEFAULT_CONFIDENCE = 30

        # @param [ Hash ] opts The options from the #passive, #aggressive methods
        # @param [ Typhoeus::Response ] response
        # @param [ String ] slug
        # @param [ String ] klass
        # @param [ Hash ] config The related dynamic finder config hash
        #
        # @return [ Plugin ] The detected plugin in the response, related to the config
        def process_response(opts, response, slug, klass, config)
          return unless response.body&.match?(config['pattern'])

          Model::Plugin.new(
            slug,
            target,
            opts.merge(found_by: found_by(klass), confidence: config['confidence'] || DEFAULT_CONFIDENCE)
          )
        end
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
wpscan-3.8.28 app/finders/plugins/body_pattern.rb
wpscan-3.8.27 app/finders/plugins/body_pattern.rb
wpscan-3.8.26 app/finders/plugins/body_pattern.rb
wpscan-3.8.25 app/finders/plugins/body_pattern.rb
wpscan-3.8.24 app/finders/plugins/body_pattern.rb
wpscan-3.8.22 app/finders/plugins/body_pattern.rb
wpscan-3.8.21 app/finders/plugins/body_pattern.rb
wpscan-3.8.20 app/finders/plugins/body_pattern.rb
wpscan-3.8.19 app/finders/plugins/body_pattern.rb
wpscan-3.8.18 app/finders/plugins/body_pattern.rb
wpscan-3.8.17 app/finders/plugins/body_pattern.rb
wpscan-3.8.16 app/finders/plugins/body_pattern.rb
wpscan-3.8.15 app/finders/plugins/body_pattern.rb
wpscan-3.8.14 app/finders/plugins/body_pattern.rb
wpscan-3.8.13 app/finders/plugins/body_pattern.rb
wpscan-3.8.12 app/finders/plugins/body_pattern.rb
wpscan-3.8.11 app/finders/plugins/body_pattern.rb
wpscan-3.8.10 app/finders/plugins/body_pattern.rb
wpscan-3.8.9 app/finders/plugins/body_pattern.rb
wpscan-3.8.8 app/finders/plugins/body_pattern.rb