This commit is contained in:
erwanlr
2021-04-26 17:48:25 +02:00
parent d0ce7cb5c5
commit 2b46ecb3c9
6 changed files with 11 additions and 36 deletions

View File

@@ -6,8 +6,7 @@ module WPScan
class Aliases < CMSScanner::Controller::Base
def cli_options
[
OptAlias.new(['--stealthy'],
alias_for: '--random-user-agent --detection-mode passive --plugins-version-detection passive')
OptAlias.new(['--stealthy'], alias_for: '--random-user-agent --detection-mode passive')
]
end
end

View File

@@ -32,8 +32,7 @@ module WPScan
value_if_empty: '1-100')
},
value_if_empty: 'vp,vt,tt,cb,dbe,u,m',
incompatible: [%i[vp ap p], %i[vt at t]],
default: { all_plugins: true, config_backups: true }
incompatible: [%i[vp ap p], %i[vt at t]]
),
OptRegexp.new(
[
@@ -52,7 +51,7 @@ module WPScan
OptChoice.new(
['--plugins-detection MODE',
'Use the supplied mode to enumerate Plugins.'],
choices: %w[mixed passive aggressive], normalize: :to_sym, default: :passive
choices: %w[mixed passive aggressive], normalize: :to_sym
),
OptBoolean.new(
['--plugins-version-all',
@@ -63,7 +62,7 @@ module WPScan
OptChoice.new(
['--plugins-version-detection MODE',
'Use the supplied mode to check plugins\' versions.'],
choices: %w[mixed passive aggressive], normalize: :to_sym, default: :mixed
choices: %w[mixed passive aggressive], normalize: :to_sym
),
OptInteger.new(
['--plugins-threshold THRESHOLD',

View File

@@ -200,7 +200,7 @@ module WPScan
# If the --enumerate is used, the default value is handled by the Option
# However, when using --passwords alone, the default has to be set by the code below
def enum_users_range
ParsedCli.enumerate[:users] || cli_enum_choices[0].choices[:u].validate(nil)
ParsedCli.enumerate&.dig(:users) || cli_enum_choices[0].choices[:u].validate(nil)
end
end
end