Class: WPScan::Finders::DynamicFinder::WpVersion::WpItemQueryParameter

Inherits:
QueryParameter show all
Defined in:
lib/wpscan/finders/dynamic_finder/wp_version.rb

Overview

This one has been disabled from the DF.yml as it was causing FPs when a plugin had numerous files matching a known WP version.

Instance Method Summary collapse

Methods inherited from QueryParameter

child_class_constants

Methods included from Finder

#create_version

Methods inherited from Version::QueryParameter

child_class_constants, #find, #scan_response

Methods inherited from Finder

#aggressive, child_class_constant, child_class_constants, create_child_class, #find, #passive

Instance Method Details

#path_patternObject



50
51
52
53
54
55
56
# File 'lib/wpscan/finders/dynamic_finder/wp_version.rb', line 50

def path_pattern
  @path_pattern ||= %r{
    (?:#{Regexp.escape(target.plugins_dir)}|#{Regexp.escape(target.themes_dir)})/
    [^/]+/
    .*\.(?:css|js)\z
  }ix
end

#xpathObject



43
44
45
46
47
48
# File 'lib/wpscan/finders/dynamic_finder/wp_version.rb', line 43

def xpath
  @xpath ||=
    self.class::XPATH ||
    "//link[contains(@href,'#{target.plugins_dir}') or contains(@href,'#{target.themes_dir}')]/@href" \
    "|//script[contains(@src,'#{target.plugins_dir}') or contains(@src,'#{target.themes_dir}')]/@src"
end