class WPScan::Finders::DynamicFinder::Version::BodyPattern
Version
finder using Body Pattern method. Typically used when the response is not an HTML doc and Xpath
can't be used
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/body_pattern.rb, line 11 def self.child_class_constants @child_class_constants ||= super().merge(PATTERN: nil, 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/body_pattern.rb, line 18 def find(response, _opts = {}) return unless response.code != 404 && response.body =~ self.class::PATTERN create_version( Regexp.last_match[:v], interesting_entries: ["#{response.effective_url}, Match: '#{Regexp.last_match}'"] ) end