Class: WPScan::Controller::WpVersion
- Inherits:
-
Base
- Object
- Base
- WPScan::Controller::WpVersion
show all
- Defined in:
- app/controllers/wp_version.rb
Overview
Constant Summary
OptParseValidator::VERSION
Instance Method Summary
collapse
Methods inherited from Base
#==, #after_scan, #datastore, #formatter, #option_parser, option_parser=, #output, #render, reset, #target, #tmp_directory, #user_interaction?
Instance Method Details
#cli_options ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/controllers/wp_version.rb', line 7
def cli_options
[
OptBoolean.new(['--wp-version-all', 'Check all the version locations'], advanced: true),
OptChoice.new(
['--wp-version-detection MODE',
'Use the supplied mode for the WordPress version detection, ' \
'instead of the global (--detection-mode) mode.'],
choices: %w[mixed passive aggressive], normalize: :to_sym, advanced: true
)
]
end
|
#run ⇒ Object
23
24
25
26
27
28
29
30
31
32
|
# File 'app/controllers/wp_version.rb', line 23
def run
output(
'version',
version: target.wp_version(
mode: ParsedCli.wp_version_detection || ParsedCli.detection_mode,
confidence_threshold: ParsedCli.wp_version_all ? 0 : 100,
show_progression: user_interaction?
)
)
end
|