Support of Ruby 2.3 removed as its life ended
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user