Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wpscanteam
GitHub Repository: wpscanteam/wpscan
Path: blob/master/app/finders/themes/urls_in_homepage.rb
485 views
1
# frozen_string_literal: true
2
3
module WPScan
4
module Finders
5
module Themes
6
# URLs In Homepage Finder
7
class UrlsInHomepage < CMSScanner::Finders::Finder
8
include WpItems::UrlsInPage
9
10
# @param [ Hash ] opts
11
#
12
# @return [ Array<Theme> ]
13
def passive(opts = {})
14
found = []
15
16
(items_from_links('themes') + items_from_codes('themes')).uniq.sort.each do |slug|
17
found << Model::Theme.new(slug, target, opts.merge(found_by: found_by, confidence: 80))
18
end
19
20
found
21
end
22
23
# @return [ Typhoeus::Response ]
24
def page_res
25
@page_res ||= target.homepage_res
26
end
27
end
28
end
29
end
30
end
31
32