wpscan 3.4.5 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +21 -14
  3. data/app/app.rb +2 -0
  4. data/app/controllers.rb +2 -0
  5. data/app/controllers/aliases.rb +2 -0
  6. data/app/controllers/core.rb +6 -4
  7. data/app/controllers/custom_directories.rb +3 -1
  8. data/app/controllers/enumeration.rb +6 -0
  9. data/app/controllers/enumeration/cli_options.rb +2 -0
  10. data/app/controllers/enumeration/enum_methods.rb +2 -0
  11. data/app/controllers/main_theme.rb +2 -0
  12. data/app/controllers/password_attack.rb +6 -4
  13. data/app/controllers/wp_version.rb +2 -0
  14. data/app/finders.rb +2 -0
  15. data/app/finders/config_backups.rb +2 -0
  16. data/app/finders/config_backups/known_filenames.rb +4 -3
  17. data/app/finders/db_exports.rb +2 -0
  18. data/app/finders/db_exports/known_locations.rb +15 -3
  19. data/app/finders/interesting_findings.rb +2 -0
  20. data/app/finders/interesting_findings/backup_db.rb +5 -4
  21. data/app/finders/interesting_findings/debug_log.rb +3 -1
  22. data/app/finders/interesting_findings/duplicator_installer_log.rb +6 -5
  23. data/app/finders/interesting_findings/emergency_pwd_reset_script.rb +6 -4
  24. data/app/finders/interesting_findings/full_path_disclosure.rb +3 -1
  25. data/app/finders/interesting_findings/mu_plugins.rb +4 -2
  26. data/app/finders/interesting_findings/multisite.rb +3 -1
  27. data/app/finders/interesting_findings/readme.rb +8 -6
  28. data/app/finders/interesting_findings/registration.rb +3 -1
  29. data/app/finders/interesting_findings/tmm_db_migrate.rb +4 -2
  30. data/app/finders/interesting_findings/upload_directory_listing.rb +3 -1
  31. data/app/finders/interesting_findings/upload_sql_dump.rb +8 -10
  32. data/app/finders/interesting_findings/wp_cron.rb +3 -1
  33. data/app/finders/main_theme.rb +2 -0
  34. data/app/finders/main_theme/css_style.rb +3 -1
  35. data/app/finders/main_theme/urls_in_homepage.rb +3 -1
  36. data/app/finders/main_theme/woo_framework_meta_generator.rb +3 -1
  37. data/app/finders/medias.rb +2 -0
  38. data/app/finders/medias/attachment_brute_forcing.rb +3 -1
  39. data/app/finders/passwords.rb +2 -0
  40. data/app/finders/passwords/wp_login.rb +4 -1
  41. data/app/finders/passwords/xml_rpc.rb +2 -0
  42. data/app/finders/passwords/xml_rpc_multicall.rb +4 -2
  43. data/app/finders/plugin_version.rb +4 -2
  44. data/app/finders/plugin_version/readme.rb +9 -5
  45. data/app/finders/plugins.rb +2 -0
  46. data/app/finders/plugins/body_pattern.rb +3 -1
  47. data/app/finders/plugins/comment.rb +3 -1
  48. data/app/finders/plugins/config_parser.rb +3 -1
  49. data/app/finders/plugins/header_pattern.rb +3 -1
  50. data/app/finders/plugins/javascript_var.rb +3 -1
  51. data/app/finders/plugins/known_locations.rb +10 -8
  52. data/app/finders/plugins/query_parameter.rb +2 -0
  53. data/app/finders/plugins/urls_in_homepage.rb +3 -1
  54. data/app/finders/plugins/xpath.rb +3 -1
  55. data/app/finders/theme_version.rb +4 -2
  56. data/app/finders/theme_version/style.rb +3 -1
  57. data/app/finders/theme_version/woo_framework_meta_generator.rb +3 -1
  58. data/app/finders/themes.rb +2 -0
  59. data/app/finders/themes/known_locations.rb +12 -10
  60. data/app/finders/themes/urls_in_homepage.rb +3 -1
  61. data/app/finders/timthumb_version.rb +3 -1
  62. data/app/finders/timthumb_version/bad_request.rb +3 -1
  63. data/app/finders/timthumbs.rb +2 -0
  64. data/app/finders/timthumbs/known_locations.rb +12 -3
  65. data/app/finders/users.rb +2 -0
  66. data/app/finders/users/author_id_brute_forcing.rb +3 -1
  67. data/app/finders/users/author_posts.rb +3 -1
  68. data/app/finders/users/login_error_messages.rb +3 -1
  69. data/app/finders/users/oembed_api.rb +6 -4
  70. data/app/finders/users/rss_generator.rb +7 -5
  71. data/app/finders/users/wp_json_api.rb +16 -6
  72. data/app/finders/users/yoast_seo_author_sitemap.rb +6 -4
  73. data/app/finders/wp_items.rb +2 -0
  74. data/app/finders/wp_items/urls_in_homepage.rb +2 -0
  75. data/app/finders/wp_version.rb +2 -0
  76. data/app/finders/wp_version/atom_generator.rb +2 -0
  77. data/app/finders/wp_version/rdf_generator.rb +2 -0
  78. data/app/finders/wp_version/readme.rb +4 -2
  79. data/app/finders/wp_version/rss_generator.rb +2 -0
  80. data/app/finders/wp_version/unique_fingerprinting.rb +3 -1
  81. data/app/models.rb +8 -0
  82. data/app/models/config_backup.rb +6 -2
  83. data/app/models/db_export.rb +6 -2
  84. data/app/models/interesting_finding.rb +36 -32
  85. data/app/models/media.rb +6 -2
  86. data/app/models/plugin.rb +25 -17
  87. data/app/models/theme.rb +83 -75
  88. data/app/models/timthumb.rb +58 -54
  89. data/app/models/wp_item.rb +140 -128
  90. data/app/models/wp_version.rb +47 -44
  91. data/app/models/xml_rpc.rb +18 -14
  92. data/app/views/cli/wp_item.erb +0 -3
  93. data/app/views/json/wp_item.erb +0 -1
  94. data/bin/wpscan +1 -0
  95. data/lib/wpscan.rb +2 -0
  96. data/lib/wpscan/browser.rb +2 -0
  97. data/lib/wpscan/controller.rb +2 -0
  98. data/lib/wpscan/controllers.rb +2 -0
  99. data/lib/wpscan/db.rb +2 -0
  100. data/lib/wpscan/db/dynamic_finders/base.rb +2 -0
  101. data/lib/wpscan/db/dynamic_finders/plugin.rb +4 -5
  102. data/lib/wpscan/db/dynamic_finders/theme.rb +2 -0
  103. data/lib/wpscan/db/dynamic_finders/wordpress.rb +2 -0
  104. data/lib/wpscan/db/fingerprints.rb +2 -0
  105. data/lib/wpscan/db/plugin.rb +2 -0
  106. data/lib/wpscan/db/plugins.rb +2 -0
  107. data/lib/wpscan/db/theme.rb +2 -0
  108. data/lib/wpscan/db/themes.rb +2 -0
  109. data/lib/wpscan/db/updater.rb +4 -2
  110. data/lib/wpscan/db/wp_item.rb +2 -0
  111. data/lib/wpscan/db/wp_items.rb +2 -0
  112. data/lib/wpscan/db/wp_version.rb +2 -0
  113. data/lib/wpscan/errors.rb +7 -1
  114. data/lib/wpscan/errors/http.rb +27 -23
  115. data/lib/wpscan/errors/update.rb +8 -4
  116. data/lib/wpscan/errors/wordpress.rb +24 -14
  117. data/lib/wpscan/errors/xmlrpc.rb +8 -4
  118. data/lib/wpscan/finders.rb +2 -0
  119. data/lib/wpscan/finders/dynamic_finder/finder.rb +2 -0
  120. data/lib/wpscan/finders/dynamic_finder/version/body_pattern.rb +2 -0
  121. data/lib/wpscan/finders/dynamic_finder/version/comment.rb +2 -0
  122. data/lib/wpscan/finders/dynamic_finder/version/config_parser.rb +2 -0
  123. data/lib/wpscan/finders/dynamic_finder/version/finder.rb +4 -2
  124. data/lib/wpscan/finders/dynamic_finder/version/header_pattern.rb +2 -0
  125. data/lib/wpscan/finders/dynamic_finder/version/javascript_var.rb +2 -0
  126. data/lib/wpscan/finders/dynamic_finder/version/query_parameter.rb +2 -0
  127. data/lib/wpscan/finders/dynamic_finder/version/xpath.rb +2 -0
  128. data/lib/wpscan/finders/dynamic_finder/wp_item_version.rb +2 -0
  129. data/lib/wpscan/finders/dynamic_finder/wp_items/finder.rb +4 -2
  130. data/lib/wpscan/finders/dynamic_finder/wp_version.rb +4 -2
  131. data/lib/wpscan/finders/finder/wp_version/smart_url_checker.rb +4 -2
  132. data/lib/wpscan/helper.rb +2 -0
  133. data/lib/wpscan/references.rb +2 -0
  134. data/lib/wpscan/target.rb +12 -1
  135. data/lib/wpscan/target/platform/wordpress.rb +15 -1
  136. data/lib/wpscan/target/platform/wordpress/custom_directories.rb +23 -3
  137. data/lib/wpscan/version.rb +3 -1
  138. data/lib/wpscan/vulnerability.rb +2 -0
  139. data/lib/wpscan/vulnerable.rb +2 -0
  140. metadata +35 -8
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Plugins
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Plugins
@@ -14,7 +16,7 @@ module WPScan
14
16
  found = []
15
17
 
16
18
  (items_from_links('plugins') + items_from_codes('plugins')).uniq.sort.each do |slug|
17
- found << Plugin.new(slug, target, opts.merge(found_by: found_by, confidence: 80))
19
+ found << Model::Plugin.new(slug, target, opts.merge(found_by: found_by, confidence: 80))
18
20
  end
19
21
 
20
22
  found
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Plugins
@@ -16,7 +18,7 @@ module WPScan
16
18
  response.html.xpath(config['xpath']).each do |node|
17
19
  next if config['pattern'] && !node.text.match(config['pattern'])
18
20
 
19
- return Plugin.new(
21
+ return Model::Plugin.new(
20
22
  slug,
21
23
  target,
22
24
  opts.merge(found_by: found_by(klass), confidence: config['confidence'] || DEFAULT_CONFIDENCE)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'theme_version/style'
2
4
  require_relative 'theme_version/woo_framework_meta_generator'
3
5
 
@@ -8,7 +10,7 @@ module WPScan
8
10
  class Base
9
11
  include CMSScanner::Finders::UniqueFinder
10
12
 
11
- # @param [ WPScan::Theme ] theme
13
+ # @param [ Model::Theme ] theme
12
14
  def initialize(theme)
13
15
  finders <<
14
16
  ThemeVersion::Style.new(theme) <<
@@ -19,7 +21,7 @@ module WPScan
19
21
 
20
22
  # Load the finders associated with the theme
21
23
  #
22
- # @param [ WPScan::Theme ] theme
24
+ # @param [ Model::Theme ] theme
23
25
  def load_specific_finders(theme)
24
26
  module_name = theme.classify
25
27
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module ThemeVersion
@@ -30,7 +32,7 @@ module WPScan
30
32
  def style_version
31
33
  return unless Browser.get(target.style_url).body =~ /Version:[\t ]*(?!trunk)([0-9a-z\.-]+)/i
32
34
 
33
- WPScan::Version.new(
35
+ Model::Version.new(
34
36
  Regexp.last_match[1],
35
37
  found_by: found_by,
36
38
  confidence: 80,
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module ThemeVersion
@@ -11,7 +13,7 @@ module WPScan
11
13
 
12
14
  return unless Regexp.last_match[1] == target.slug
13
15
 
14
- WPScan::Version.new(Regexp.last_match[2], found_by: found_by, confidence: 80)
16
+ Model::Version.new(Regexp.last_match[2], found_by: found_by, confidence: 80)
15
17
  end
16
18
  end
17
19
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'themes/urls_in_homepage'
2
4
  require_relative 'themes/known_locations'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Themes
@@ -5,6 +7,11 @@ module WPScan
5
7
  class KnownLocations < CMSScanner::Finders::Finder
6
8
  include CMSScanner::Finders::Finder::Enumerator
7
9
 
10
+ # @return [ Array<Integer> ]
11
+ def valid_response_codes
12
+ @valid_response_codes ||= [200, 401, 403, 301, 500].freeze
13
+ end
14
+
8
15
  # @param [ Hash ] opts
9
16
  # @option opts [ String ] :list
10
17
  #
@@ -12,12 +19,8 @@ module WPScan
12
19
  def aggressive(opts = {})
13
20
  found = []
14
21
 
15
- enumerate(target_urls(opts), opts) do |res, slug|
16
- # TODO: follow the location (from enumerate()) and remove the 301 here ?
17
- # As a result, it might remove false positive due to redirection to the homepage
18
- next unless [200, 401, 403, 301].include?(res.code)
19
-
20
- found << WPScan::Theme.new(slug, target, opts.merge(found_by: found_by, confidence: 80))
22
+ enumerate(target_urls(opts), opts.merge(check_full_response: [200, 401, 403, 500])) do |_res, slug|
23
+ found << Model::Theme.new(slug, target, opts.merge(found_by: found_by, confidence: 80))
21
24
  end
22
25
 
23
26
  found
@@ -28,12 +31,11 @@ module WPScan
28
31
  #
29
32
  # @return [ Hash ]
30
33
  def target_urls(opts = {})
31
- slugs = opts[:list] || DB::Themes.vulnerable_slugs
32
- urls = {}
33
- themes_url = target.url('wp-content/themes/')
34
+ slugs = opts[:list] || DB::Themes.vulnerable_slugs
35
+ urls = {}
34
36
 
35
37
  slugs.each do |slug|
36
- urls["#{themes_url}#{URI.encode(slug)}/"] = slug
38
+ urls[target.theme_url(slug)] = slug
37
39
  end
38
40
 
39
41
  urls
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Themes
@@ -12,7 +14,7 @@ module WPScan
12
14
  found = []
13
15
 
14
16
  (items_from_links('themes') + items_from_codes('themes')).uniq.sort.each do |slug|
15
- found << WPScan::Theme.new(slug, target, opts.merge(found_by: found_by, confidence: 80))
17
+ found << Model::Theme.new(slug, target, opts.merge(found_by: found_by, confidence: 80))
16
18
  end
17
19
 
18
20
  found
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'timthumb_version/bad_request'
2
4
 
3
5
  module WPScan
@@ -7,7 +9,7 @@ module WPScan
7
9
  class Base
8
10
  include CMSScanner::Finders::UniqueFinder
9
11
 
10
- # @param [ WPScan::Timthumb ] target
12
+ # @param [ Model::Timthumb ] target
11
13
  def initialize(target)
12
14
  finders << TimthumbVersion::BadRequest.new(target)
13
15
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module TimthumbVersion
@@ -8,7 +10,7 @@ module WPScan
8
10
  def aggressive(_opts = {})
9
11
  return unless Browser.get(target.url).body =~ /(TimThumb version\s*: ([^<]+))/
10
12
 
11
- WPScan::Version.new(
13
+ Model::Version.new(
12
14
  Regexp.last_match[2],
13
15
  found_by: 'Bad Request (Aggressive Detection)',
14
16
  confidence: 90,
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'timthumbs/known_locations'
2
4
 
3
5
  module WPScan
@@ -1,10 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Timthumbs
4
6
  # Known Locations Timthumbs Finder
7
+ # Note: A vulnerable version, 2.8.13 can be found here:
8
+ # https://github.com/GabrielGil/TimThumb/blob/980c3d6a823477761570475e8b83d3e9fcd2d7ae/timthumb.php
5
9
  class KnownLocations < CMSScanner::Finders::Finder
6
10
  include CMSScanner::Finders::Finder::Enumerator
7
11
 
12
+ # @return [ Array<Integer> ]
13
+ def valid_response_codes
14
+ @valid_response_codes ||= [400]
15
+ end
16
+
8
17
  # @param [ Hash ] opts
9
18
  # @option opts [ String ] :list Mandatory
10
19
  #
@@ -12,10 +21,10 @@ module WPScan
12
21
  def aggressive(opts = {})
13
22
  found = []
14
23
 
15
- enumerate(target_urls(opts), opts) do |res|
16
- next unless res.code == 400 && res.body =~ /no image specified/i
24
+ enumerate(target_urls(opts), opts.merge(check_full_response: 400)) do |res|
25
+ next unless res.body =~ /no image specified/i
17
26
 
18
- found << WPScan::Timthumb.new(res.request.url, opts.merge(found_by: found_by, confidence: 100))
27
+ found << Model::Timthumb.new(res.request.url, opts.merge(found_by: found_by, confidence: 100))
19
28
  end
20
29
 
21
30
  found
data/app/finders/users.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'users/author_posts'
2
4
  require_relative 'users/wp_json_api'
3
5
  require_relative 'users/oembed_api'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Users
@@ -18,7 +20,7 @@ module WPScan
18
20
 
19
21
  next unless username
20
22
 
21
- found << CMSScanner::User.new(
23
+ found << Model::User.new(
22
24
  username,
23
25
  id: id,
24
26
  found_by: format(found_by_msg, found_by),
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Users
@@ -10,7 +12,7 @@ module WPScan
10
12
  found_by_msg = 'Author Posts - %s (Passive Detection)'
11
13
 
12
14
  usernames(opts).reduce([]) do |a, e|
13
- a << CMSScanner::User.new(
15
+ a << Model::User.new(
14
16
  e[0],
15
17
  found_by: format(found_by_msg, e[1]),
16
18
  confidence: e[2]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Users
@@ -24,7 +26,7 @@ module WPScan
24
26
 
25
27
  next unless error =~ /The password you entered for the username|Incorrect Password/i
26
28
 
27
- found << CMSScanner::User.new(username, found_by: found_by, confidence: 100)
29
+ found << Model::User.new(username, found_by: found_by, confidence: 100)
28
30
  end
29
31
 
30
32
  found
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Users
@@ -21,10 +23,10 @@ module WPScan
21
23
 
22
24
  return [] unless details
23
25
 
24
- [CMSScanner::User.new(details[0],
25
- found_by: format(found_by_msg, details[1]),
26
- confidence: details[2],
27
- interesting_entries: [api_url])]
26
+ [Model::User.new(details[0],
27
+ found_by: format(found_by_msg, details[1]),
28
+ confidence: details[2],
29
+ interesting_entries: [api_url])]
28
30
  rescue JSON::ParserError
29
31
  []
30
32
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Users
@@ -17,20 +19,20 @@ module WPScan
17
19
 
18
20
  begin
19
21
  res.xml.xpath('//item/dc:creator').each do |node|
20
- potential_username = node.text.to_s
22
+ username = node.text.to_s
21
23
 
22
24
  # Ignoring potential username longer than 60 characters and containing accents
23
25
  # as they are considered invalid. See https://github.com/wpscanteam/wpscan/issues/1215
24
- next if potential_username.length > 60 || potential_username =~ /[^\x00-\x7F]/
26
+ next if username.strip.empty? || username.length > 60 || username =~ /[^\x00-\x7F]/
25
27
 
26
- potential_usernames << potential_username
28
+ potential_usernames << username
27
29
  end
28
30
  rescue Nokogiri::XML::XPath::SyntaxError
29
31
  next
30
32
  end
31
33
 
32
- potential_usernames.uniq.each do |potential_username|
33
- found << CMSScanner::User.new(potential_username, found_by: found_by, confidence: 50)
34
+ potential_usernames.uniq.each do |username|
35
+ found << Model::User.new(username, found_by: found_by, confidence: 50)
34
36
  end
35
37
 
36
38
  break
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Users
@@ -41,11 +43,11 @@ module WPScan
41
43
  found = []
42
44
 
43
45
  JSON.parse(response.body)&.each do |user|
44
- found << CMSScanner::User.new(user['slug'],
45
- id: user['id'],
46
- found_by: found_by,
47
- confidence: 100,
48
- interesting_entries: [response.effective_url])
46
+ found << Model::User.new(user['slug'],
47
+ id: user['id'],
48
+ found_by: found_by,
49
+ confidence: 100,
50
+ interesting_entries: [response.effective_url])
49
51
  end
50
52
 
51
53
  found
@@ -53,7 +55,15 @@ module WPScan
53
55
 
54
56
  # @return [ String ] The URL of the API listing the Users
55
57
  def api_url
56
- @api_url ||= target.url('wp-json/wp/v2/users/')
58
+ return @api_url if @api_url
59
+
60
+ target.in_scope_urls(target.homepage_res, "//link[@rel='https://api.w.org/']/@href").each do |url, _tag|
61
+ uri = Addressable::URI.parse(url.strip)
62
+
63
+ return @api_url = uri.join('wp/v2/users/').to_s if uri.path.include?('wp-json')
64
+ end
65
+
66
+ @api_url = target.url('wp-json/wp/v2/users/')
57
67
  end
58
68
  end
59
69
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module Users
@@ -15,10 +17,10 @@ module WPScan
15
17
 
16
18
  next unless username && !username.strip.empty?
17
19
 
18
- found << CMSScanner::User.new(username,
19
- found_by: found_by,
20
- confidence: 100,
21
- interesting_entries: [sitemap_url])
20
+ found << Model::User.new(username,
21
+ found_by: found_by,
22
+ confidence: 100,
23
+ interesting_entries: [sitemap_url])
22
24
  end
23
25
 
24
26
  found
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'wp_items/urls_in_homepage'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module WpItems
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'wp_version/rss_generator'
2
4
  require_relative 'wp_version/atom_generator'
3
5
  require_relative 'wp_version/rdf_generator'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module WpVersion
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module WpVersion
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module WpVersion
@@ -13,9 +15,9 @@ module WPScan
13
15
 
14
16
  number = Regexp.last_match(1)
15
17
 
16
- return unless WPScan::WpVersion.valid?(number)
18
+ return unless Model::WpVersion.valid?(number)
17
19
 
18
- WPScan::WpVersion.new(
20
+ Model::WpVersion.new(
19
21
  number,
20
22
  found_by: 'Readme (Aggressive Detection)',
21
23
  # Since WP 4.7, the Readme only contains the major version (ie 4.7, 4.8 etc)