Sha256: 29aad0a6ba00536f522727433b69855b9b8104f6b5a347e05756a98c526f5c57

Contents?: true

Size: 909 Bytes

Versions: 4

Compression:

Stored size: 909 Bytes

Contents

module WPScan
  module Controller
    # Wp Version Controller
    class WpVersion < CMSScanner::Controller::Base
      def cli_options
        [
          OptBoolean.new(['--wp-version-all', 'Check all the version locations']),
          OptChoice.new(
            ['--wp-version-detection MODE',
             'Use the supplied mode for the WordPress version detection, ' \
             'instead of the global (--detection-mode) mode.'],
            choices: %w(mixed passive aggressive),
            normalize: :to_sym
          )
        ]
      end

      def run
        output(
          'version',
          version: target.wp_version(
            mode: parsed_options[:wp_version_detection] || parsed_options[:detection_mode],
            confidence_threshold: parsed_options[:wp_version_all] ? 0 : 100,
            show_progression: user_interaction?
          )
        )
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wpscan-3.0.3 app/controllers/wp_version.rb
wpscan-3.0.2 app/controllers/wp_version.rb
wpscan-3.0.1 app/controllers/wp_version.rb
wpscan-3.0 app/controllers/wp_version.rb