Sha256: fc8643a0273724383e9a446d9c2d94a1af577eae7a83e6f2a08f9053bc5a15b7
Contents?: true
Size: 1.02 KB
Versions: 25
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # Version finder using Xpath method class Xpath < Finders::DynamicFinder::Version::Finder # @return [ Hash ] def self.child_class_constants @child_class_constants ||= super().merge( XPATH: nil, PATTERN: /\A(?<v>\d+\.[.\d]+)/, CONFIDENCE: 60 ) end # @param [ Typhoeus::Response ] response # @param [ Hash ] opts # @return [ Version ] def find(response, _opts = {}) target.xpath_pattern_from_page( self.class::XPATH, self.class::PATTERN, response ) do |match_data, _node| next unless match_data[:v] return create_version( match_data[:v], interesting_entries: ["#{response.effective_url}, Match: '#{match_data}'"] ) end nil end end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems