Class: WPScan::Finders::Plugins::ConfigParser

Inherits:
DynamicFinder::WpItems::Finder show all
Defined in:
app/finders/plugins/config_parser.rb

Overview

Plugins finder from Dynamic Finder ‘ConfigParser’

Constant Summary collapse

DEFAULT_CONFIDENCE =
40

Instance Method Summary collapse

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.

Parameters:

  • opts (Hash)

    The options from the #passive, #aggressive methods

  • response (Typhoeus::Response)
  • slug (String)
  • klass (String)
  • config (Hash)

    The related dynamic finder config hash

Returns:

  • (Plugin)

    The detected plugin in the response, related to the config



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/finders/plugins/config_parser.rb', line 17

def _process_response(_opts, _response, slug, klass, config)
  #
  # TODO. Currently not implemented, and not even loaded by the Finders, as this
  # finder only has an aggressive method, which has been disabled (globally)
  # when checking for plugins
  #

  Model::Plugin.new(
    slug,
    target,
    opts.merge(found_by: found_by(klass), confidence: config['confidence'] || DEFAULT_CONFIDENCE)
  )
end