Class: WPScan::Finders::DynamicFinder::Version::HeaderPattern
- Inherits:
-
Finder
- Object
- CMSScanner::Finders::Finder
- Finder
- Finder
- WPScan::Finders::DynamicFinder::Version::HeaderPattern
- Defined in:
- lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
Overview
Version finder using Header Pattern method
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Finder
#aggressive, child_class_constant, create_child_class, #passive
Class Method Details
.child_class_constants ⇒ Hash
10 11 12 |
# File 'lib/wpscan/finders/dynamic_finder/version/header_pattern.rb', line 10 def self.child_class_constants @child_class_constants ||= super().merge(HEADER: nil, PATTERN: nil, CONFIDENCE: 60) end |
Instance Method Details
#find(response, _opts = {}) ⇒ Version
17 18 19 20 21 22 23 24 25 |
# File 'lib/wpscan/finders/dynamic_finder/version/header_pattern.rb', line 17 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 |