Class: WPScan::Controller::CustomDirectories
- Defined in:
- app/controllers/custom_directories.rb
Overview
Controller to ensure that the wp-content and wp-plugins directories are found
Constant Summary
Constants included from OptParseValidator
Instance Method Summary collapse
Methods inherited from Base
#==, #after_scan, #datastore, #formatter, #option_parser, option_parser=, #output, #render, reset, #run, #target, #tmp_directory, #user_interaction?
Instance Method Details
#before_scan ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/custom_directories.rb', line 17 def before_scan target.content_dir = ParsedCli.wp_content_dir if ParsedCli.wp_content_dir target.plugins_dir = ParsedCli.wp_plugins_dir if ParsedCli.wp_plugins_dir raise Error::WpContentDirNotDetected unless target.content_dir end |
#cli_options ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/controllers/custom_directories.rb', line 8 def [ OptString.new(['--wp-content-dir DIR', 'The wp-content directory if custom or not detected, such as "wp-content"']), OptString.new(['--wp-plugins-dir DIR', 'The plugins directory if custom or not detected, such as "wp-content/plugins"']) ] end |