class WPScan::Finders::DynamicFinder::Version::Xpath
Public Class Methods
child_class_constants()
click to toggle source
@return [ Hash ]
Calls superclass method
WPScan::Finders::DynamicFinder::Finder::child_class_constants
# File lib/wpscan/finders/dynamic_finder/version/xpath.rb, line 10 def self.child_class_constants @child_class_constants ||= super().merge( XPATH: nil, PATTERN: /\A(?<v>\d+\.[.\d]+)/, CONFIDENCE: 60 ) end
Public Instance Methods
find(response, _opts = {})
click to toggle source
@param [ Typhoeus::Response
] response @param [ Hash ] opts @return [ Version
]
# File lib/wpscan/finders/dynamic_finder/version/xpath.rb, line 19 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