Support of Ruby 2.3 removed as its life ended
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.3
|
||||
TargetRubyVersion: 2.4
|
||||
Exclude:
|
||||
- '*.gemspec'
|
||||
- 'vendor/**/*'
|
||||
|
||||
10
.travis.yml
10
.travis.yml
@@ -2,20 +2,12 @@ language: ruby
|
||||
sudo: false
|
||||
cache: bundler
|
||||
rvm:
|
||||
- 2.3.0
|
||||
- 2.3.1
|
||||
- 2.3.2
|
||||
- 2.3.3
|
||||
- 2.3.4
|
||||
- 2.3.5
|
||||
- 2.3.6
|
||||
- 2.3.7
|
||||
- 2.3.8
|
||||
- 2.4.1
|
||||
- 2.4.2
|
||||
- 2.4.3
|
||||
- 2.4.4
|
||||
- 2.4.5
|
||||
- 2.4.6
|
||||
- 2.5.0
|
||||
- 2.5.1
|
||||
- 2.5.2
|
||||
|
||||
@@ -39,7 +39,7 @@ module WPScan
|
||||
output('@notice', msg: 'It seems like you have not updated the database for some time.')
|
||||
print '[?] Do you want to update now? [Y]es [N]o, default: [N]'
|
||||
|
||||
Readline.readline =~ /^y/i ? true : false
|
||||
/^y/i.match?(Readline.readline) ? true : false
|
||||
end
|
||||
|
||||
def update_db
|
||||
@@ -69,7 +69,7 @@ module WPScan
|
||||
def check_wordpress_state
|
||||
raise Error::WordPressHosted if target.wordpress_hosted?
|
||||
|
||||
if Addressable::URI.parse(target.homepage_url).path =~ %r{/wp-admin/install.php$}i
|
||||
if %r{/wp-admin/install.php$}i.match?(Addressable::URI.parse(target.homepage_url).path)
|
||||
|
||||
output('not_fully_configured', url: target.homepage_url)
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -63,7 +63,7 @@ module WPScan
|
||||
def webshot_enabled?
|
||||
res = Browser.get(url, params: { webshot: 1, src: "http://#{default_allowed_domains.sample}" })
|
||||
|
||||
res.body =~ /WEBSHOT_ENABLED == true/ ? false : true
|
||||
/WEBSHOT_ENABLED == true/.match?(res.body) ? false : true
|
||||
end
|
||||
|
||||
# @return [ Array<String> ] The default allowed domains (between the 2.0 and 2.8.13)
|
||||
|
||||
@@ -79,7 +79,7 @@ module WPScan
|
||||
end
|
||||
|
||||
def wordpress_hosted?
|
||||
uri.host =~ /\.wordpress\.com$/i ? true : false
|
||||
/\.wordpress\.com$/i.match?(uri.host) ? true : false
|
||||
end
|
||||
|
||||
# @param [ String ] username
|
||||
|
||||
@@ -112,9 +112,9 @@ module WPScan
|
||||
def url(path = nil)
|
||||
return @uri.to_s unless path
|
||||
|
||||
if path =~ %r{wp\-content/plugins}i
|
||||
if %r{wp\-content/plugins}i.match?(path)
|
||||
path = +path.gsub('wp-content/plugins', plugins_dir)
|
||||
elsif path =~ /wp\-content/i
|
||||
elsif /wp\-content/i.match?(path)
|
||||
path = +path.gsub('wp-content', content_dir)
|
||||
elsif path[0] != '/' && sub_dir
|
||||
path = "#{sub_dir}/#{path}"
|
||||
|
||||
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
||||
s.name = 'wpscan'
|
||||
s.version = WPScan::VERSION
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.required_ruby_version = '>= 2.3'
|
||||
s.required_ruby_version = '>= 2.4'
|
||||
s.authors = ['WPScanTeam']
|
||||
s.date = Time.now.utc.strftime('%Y-%m-%d')
|
||||
s.email = ['team@wpscan.org']
|
||||
|
||||
Reference in New Issue
Block a user