Uses the frozen_string_literal magic comment (will be the default in Ruby 3)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
%w[custom_directories].each do |required|
|
||||
require "wpscan/target/platform/wordpress/#{required}"
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module WPScan
|
||||
class Target < CMSScanner::Target
|
||||
module Platform
|
||||
@@ -111,9 +113,9 @@ module WPScan
|
||||
return @uri.to_s unless path
|
||||
|
||||
if path =~ %r{wp\-content/plugins}i
|
||||
path.gsub!('wp-content/plugins', plugins_dir)
|
||||
path = +path.gsub('wp-content/plugins', plugins_dir)
|
||||
elsif path =~ /wp\-content/i
|
||||
path.gsub!('wp-content', content_dir)
|
||||
path = +path.gsub('wp-content', content_dir)
|
||||
elsif path[0] != '/' && sub_dir
|
||||
path = "#{sub_dir}/#{path}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user