Class: WPScan::Controller::MainTheme

Inherits:
CMSScanner::Controller::Base
  • Object
show all
Defined in:
app/controllers/main_theme.rb

Overview

Main Theme Controller

Instance Method Summary collapse

Instance Method Details

#cli_optionsObject



5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/main_theme.rb', line 5

def cli_options
  [
    OptChoice.new(
      ['--main-theme-detection MODE',
       'Use the supplied mode for the Main theme detection, instead of the global (--detection-mode) mode.'],
      choices: %w[mixed passive aggressive],
      normalize: :to_sym
    )
  ]
end

#runObject



16
17
18
19
20
21
22
23
24
# File 'app/controllers/main_theme.rb', line 16

def run
  output(
    'theme',
    theme: target.main_theme(
      mode: parsed_options[:main_theme_detection] || parsed_options[:detection_mode]
    ),
    verbose: parsed_options[:verbose]
  )
end