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