Sha256: 423e621bc5915a9462057da7339d3b3a238f386034b0566a54df1d883b300109

Contents?: true

Size: 694 Bytes

Versions: 13

Compression:

Stored size: 694 Bytes

Contents

module WPScan
  module Finders
    module MainTheme
      # URLs In Homepage Finder
      class UrlsInHomepage < CMSScanner::Finders::Finder
        include WpItems::URLsInHomepage

        # @param [ Hash ] opts
        #
        # @return [ Array<Theme> ]
        def passive(opts = {})
          found = []

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

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

          found
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
wpscan-3.4.5 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.4.4 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.4.3 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.4.2 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.4.1 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.4.0 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.3.3 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.3.2 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.3.1 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.3.0 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.2.1 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.2.0 app/finders/main_theme/urls_in_homepage.rb
wpscan-3.1.0 app/finders/main_theme/urls_in_homepage.rb