Support of Ruby 2.3 removed as its life ended

This commit is contained in:
erwanlr
2019-04-04 15:40:21 +01:00
parent 352286e497
commit 888779f81b
9 changed files with 11 additions and 19 deletions

View File

@@ -14,7 +14,7 @@ module WPScan
Model::EmergencyPwdResetScript.new(
target.url(path),
confidence: res.body =~ /password/i ? 100 : 40,
confidence: /password/i.match?(res.body) ? 100 : 40,
found_by: DIRECT_ACCESS,
references: {
url: 'https://codex.wordpress.org/Resetting_Your_Password#Using_the_Emergency_Password_Reset_Script'

View File

@@ -50,7 +50,7 @@ module WPScan
if uri.path =~ %r{/author/([^/\b]+)/?\z}i
usernames << [Regexp.last_match[1], 'Author Pattern', 100]
elsif uri.query =~ /author=[0-9]+/
elsif /author=[0-9]+/.match?(uri.query)
usernames << [node.text.to_s.strip, 'Display Name', 30]
end
end