Sha256: 8d6e488797f6e8e791cc7e27235d97009b96a7009d21feff6df69d70bab4bc04

Contents?: true

Size: 712 Bytes

Versions: 22

Compression:

Stored size: 712 Bytes

Contents

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']),
          OptString.new(['--wp-plugins-dir DIR'])
        ]
      end

      def before_scan
        target.content_dir = parsed_options[:wp_content_dir] if parsed_options[:wp_content_dir]
        target.plugins_dir = parsed_options[:wp_plugins_dir] if parsed_options[:wp_plugins_dir]

        return if target.content_dir

        raise 'Unable to identify the wp-content dir, please supply it with --wp-content-dir'
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
wpscan-3.4.5 app/controllers/custom_directories.rb
wpscan-3.4.4 app/controllers/custom_directories.rb
wpscan-3.4.3 app/controllers/custom_directories.rb
wpscan-3.4.2 app/controllers/custom_directories.rb
wpscan-3.4.1 app/controllers/custom_directories.rb
wpscan-3.4.0 app/controllers/custom_directories.rb
wpscan-3.3.3 app/controllers/custom_directories.rb
wpscan-3.3.2 app/controllers/custom_directories.rb
wpscan-3.3.1 app/controllers/custom_directories.rb
wpscan-3.3.0 app/controllers/custom_directories.rb
wpscan-3.2.1 app/controllers/custom_directories.rb
wpscan-3.2.0 app/controllers/custom_directories.rb
wpscan-3.1.0 app/controllers/custom_directories.rb
wpscan-3.0.8 app/controllers/custom_directories.rb
wpscan-3.0.7 app/controllers/custom_directories.rb
wpscan-3.0.6 app/controllers/custom_directories.rb
wpscan-3.0.5 app/controllers/custom_directories.rb
wpscan-3.0.4 app/controllers/custom_directories.rb
wpscan-3.0.3 app/controllers/custom_directories.rb
wpscan-3.0.2 app/controllers/custom_directories.rb