class WPScan::Finders::DynamicFinder::WpItemVersion::QueryParameter

Public Instance Methods

path_pattern() click to toggle source

@return [ Regexp ]

# File lib/wpscan/finders/dynamic_finder/wp_item_version.rb, line 24
def path_pattern
  # TODO: consider the target.blog.themes_dir if the target is a Theme (maybe implement a WpItem#item_dir ?)
  @path_pattern ||= %r{
    #{Regexp.escape(target.blog.plugins_dir)}/
    #{Regexp.escape(target.slug)}/
    (?:#{self.class::FILES.join('|')})\z
  }ix
end
xpath() click to toggle source
# File lib/wpscan/finders/dynamic_finder/wp_item_version.rb, line 33
def xpath
  @xpath ||= self.class::XPATH ||
             "//link[contains(@href,'#{target.slug}')]/@href" \
             "|//script[contains(@src,'#{target.slug}')]/@src"
end