Class: WPScan::Finders::Plugins::Xpath
- Inherits:
-
DynamicFinder::WpItems::Finder
- Object
- CMSScanner::Finders::Finder
- DynamicFinder::WpItems::Finder
- WPScan::Finders::Plugins::Xpath
- Defined in:
- app/finders/plugins/xpath.rb
Overview
Plugins finder from the Dynamic Finder ‘Xpath’
Constant Summary collapse
- DEFAULT_CONFIDENCE =
40
Instance Method Summary collapse
-
#process_response(opts, response, slug, klass, config) ⇒ Plugin
The detected plugin in the response, related to the config.
Methods inherited from DynamicFinder::WpItems::Finder
#aggressive, #aggressive_, #aggressive_configs, #aggressive_path, #passive, #passive_configs
Instance Method Details
#process_response(opts, response, slug, klass, config) ⇒ Plugin
Returns The detected plugin in the response, related to the config.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/finders/plugins/xpath.rb', line 17 def process_response(opts, response, slug, klass, config) response.html.xpath(config['xpath']).each do |node| next if config['pattern'] && !node.text.match(config['pattern']) return Model::Plugin.new( slug, target, opts.merge(found_by: found_by(klass), confidence: config['confidence'] || DEFAULT_CONFIDENCE) ) end end |