Class: WPScan::Finders::MainTheme::UrlsInHomepage

Inherits:
CMSScanner::Finders::Finder
  • Object
show all
Includes:
WpItems::URLsInHomepage
Defined in:
app/finders/main_theme/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<Theme>

Parameters:

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

Returns:



11
12
13
14
15
16
17
18
19
20
21
# File 'app/finders/main_theme/urls_in_homepage.rb', line 11

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

  names = items_from_links('themes', false) + items_from_codes('themes', false)

  names.each_with_object(Hash.new(0)) { |name, counts| counts[name] += 1 }.each do |name, occurences|
    found << WPScan::Theme.new(name, target, opts.merge(found_by: found_by, confidence: 2 * occurences))
  end

  found
end