Sha256: 6502c4c346c1e2d368b1d1b686ef8390dd4d492467fd7c5b1e3ee1ce65602786

Contents?: true

Size: 950 Bytes

Versions: 13

Compression:

Stored size: 950 Bytes

Contents

module WPScan
  module Finders
    module DynamicFinder
      module Version
        # Version finder using Header Pattern method
        class HeaderPattern < WPScan::Finders::DynamicFinder::Version::Finder
          # @return [ Hash ]
          def self.child_class_constants
            @child_class_constants ||= super().merge(HEADER: nil, PATTERN: nil, CONFIDENCE: 60)
          end

          # @param [ Typhoeus::Response ] response
          # @param [ Hash ] opts
          # @return [ Version ]
          def find(response, _opts = {})
            return unless response.headers && response.headers[self.class::HEADER]
            return unless response.headers[self.class::HEADER].to_s =~ self.class::PATTERN

            create_version(
              Regexp.last_match[:v],
              interesting_entries: ["#{response.effective_url}, Match: '#{Regexp.last_match}'"]
            )
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
wpscan-3.4.5 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.4.4 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.4.3 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.4.2 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.4.1 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.4.0 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.3.3 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.3.2 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.3.1 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.3.0 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.2.1 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.2.0 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
wpscan-3.1.0 lib/wpscan/finders/dynamic_finder/version/header_pattern.rb