Sha256: 954f0a5eb8a56eacb33a59015cab84202953dc1d3e4d69ec23a5ae4893a59e91

Contents?: true

Size: 861 Bytes

Versions: 30

Compression:

Stored size: 861 Bytes

Contents

# frozen_string_literal: true

module WPScan
  module Controller
    # Controller to ensure that the wp-content and wp-plugins
    # directories are found
    class CustomDirectories < CMSScanner::Controller::Base
      def cli_options
        [
          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

      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
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wpscan-3.8.27 app/controllers/custom_directories.rb
wpscan-3.8.26 app/controllers/custom_directories.rb
wpscan-3.8.25 app/controllers/custom_directories.rb
wpscan-3.8.24 app/controllers/custom_directories.rb
wpscan-3.8.22 app/controllers/custom_directories.rb
wpscan-3.8.21 app/controllers/custom_directories.rb
wpscan-3.8.20 app/controllers/custom_directories.rb
wpscan-3.8.19 app/controllers/custom_directories.rb
wpscan-3.8.18 app/controllers/custom_directories.rb
wpscan-3.8.17 app/controllers/custom_directories.rb
wpscan-3.8.16 app/controllers/custom_directories.rb
wpscan-3.8.15 app/controllers/custom_directories.rb
wpscan-3.8.14 app/controllers/custom_directories.rb
wpscan-3.8.13 app/controllers/custom_directories.rb
wpscan-3.8.12 app/controllers/custom_directories.rb
wpscan-3.8.11 app/controllers/custom_directories.rb
wpscan-3.8.10 app/controllers/custom_directories.rb
wpscan-3.8.9 app/controllers/custom_directories.rb
wpscan-3.8.8 app/controllers/custom_directories.rb
wpscan-3.8.7 app/controllers/custom_directories.rb