Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wpscanteam
GitHub Repository: wpscanteam/wpscan
Path: blob/master/app/controllers/main_theme.rb
485 views
1
# frozen_string_literal: true
2
3
module WPScan
4
module Controller
5
# Main Theme Controller
6
class MainTheme < CMSScanner::Controller::Base
7
def cli_options
8
[
9
OptChoice.new(
10
['--main-theme-detection MODE',
11
'Use the supplied mode for the Main theme detection, instead of the global (--detection-mode) mode.'],
12
choices: %w[mixed passive aggressive], normalize: :to_sym, advanced: true
13
)
14
]
15
end
16
17
def run
18
output(
19
'theme',
20
theme: target.main_theme(
21
mode: ParsedCli.main_theme_detection || ParsedCli.detection_mode
22
),
23
verbose: ParsedCli.verbose
24
)
25
end
26
end
27
end
28
end
29
30