Class: WPScan::Controller::CustomDirectories
- Inherits:
-
CMSScanner::Controller::Base
- Object
- CMSScanner::Controller::Base
- WPScan::Controller::CustomDirectories
- Defined in:
- app/controllers/custom_directories.rb
Overview
Controller to ensure that the wp-content and wp-plugins directories are found
Instance Method Summary collapse
Instance Method Details
#before_scan ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/custom_directories.rb', line 13 def before_scan target.content_dir = [:wp_content_dir] if [:wp_content_dir] target.plugins_dir = [:wp_plugins_dir] if [:wp_plugins_dir] return if target.content_dir raise 'Unable to identify the wp-content dir, please supply it with --wp-content-dir' end |
#cli_options ⇒ Object
6 7 8 9 10 11 |
# File 'app/controllers/custom_directories.rb', line 6 def [ OptString.new(['--wp-content-dir DIR']), OptString.new(['--wp-plugins-dir DIR']) ] end |