Class: WPScan::Finders::Plugins::UrlsInHomepage

Inherits:
CMSScanner::Finders::Finder
  • Object
show all
Includes:
WpItems::URLsInHomepage
Defined in:
app/finders/plugins/urls_in_homepage.rb

Overview

URLs In Homepage Finder

Instance Method Summary collapse

Methods included from WpItems::URLsInHomepage

#item_attribute_pattern, #item_code_pattern, #item_url_pattern, #items_from_codes, #items_from_links

Instance Method Details

#passive(opts = {}) ⇒ Array<Plugin>

Parameters:

  • opts (Hash) (defaults to: {})

Returns:



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/finders/plugins/urls_in_homepage.rb', line 11

def passive(opts = {})
  found = []

  (items_from_links('plugins') + items_from_codes('plugins')).uniq.sort.each do |name|
    found << Plugin.new(name, target, opts.merge(found_by: found_by, confidence: 80))
  end

  DB::DynamicPluginFinders.urls_in_page.each do |name, config|
    next unless target.homepage_res.html.xpath(config['xpath']).any?

    found << Plugin.new(name, target, opts.merge(found_by: found_by, confidence: 100))
  end

  found
end