Class: WPScan::Finders::DynamicFinder::WpItemVersion::QueryParameter
- Inherits:
-
Version::QueryParameter
- Object
- CMSScanner::Finders::Finder
- Finder
- Version::Finder
- Version::QueryParameter
- WPScan::Finders::DynamicFinder::WpItemVersion::QueryParameter
- Defined in:
- lib/wpscan/finders/dynamic_finder/wp_item_version.rb
Instance Method Summary collapse
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_pattern ⇒ Regexp
24 25 26 27 28 29 30 31 |
# 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 ⇒ Object
33 34 35 36 37 |
# 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 |