Removes Changelog detection

This commit is contained in:
erwanlr
2019-03-28 13:40:58 +00:00
parent 1cf330b389
commit 0aa1f20d47
11 changed files with 2 additions and 32 deletions

View File

@@ -9,8 +9,7 @@ module WPScan
include CMSScanner::Target::Platform::PHP
include CMSScanner::Target::Server::Generic
READMES = %w[readme.txt README.txt README.md readme.md Readme.txt].freeze
CHANGELOGS = %w[changelog.txt CHANGELOG.md changelog.md].freeze
READMES = %w[readme.txt README.txt README.md readme.md Readme.txt].freeze
attr_reader :uri, :slug, :detection_opts, :version_detection_opts, :blog, :path_from_blog, :db_data
@@ -127,21 +126,6 @@ module WPScan
@readme_url = false
end
# @return [ String, false ] The changelog url if found, false otherwise
def changelog_url
return if detection_opts[:mode] == :passive
return @changelog_url unless @changelog_url.nil?
CHANGELOGS.each do |path|
t_url = url(path)
return @changelog_url = t_url if Browser.forge_request(t_url, blog.head_or_get_params).run.code == 200
end
@changelog_url = false
end
# @param [ String ] path
# @param [ Hash ] params The request params
#

View File

@@ -8,9 +8,6 @@
<% if @wp_item.readme_url -%>
| Readme: <%= @wp_item.readme_url %>
<% end -%>
<% if @wp_item.changelog_url -%>
| Changelog: <%= @wp_item.changelog_url %>
<% end -%>
<% if @wp_item.latest_version && @wp_item.outdated? -%>
| <%= warning_icon %> The version is out of date, the latest version is <%= @wp_item.latest_version %>
<% end -%>

View File

@@ -4,6 +4,5 @@
"last_updated": <%= @wp_item.last_updated.to_json %>,
"outdated": <%= @wp_item.outdated?.to_json %>,
"readme_url": <%= @wp_item.readme_url.to_json %>,
"changelog_url": <%= @wp_item.changelog_url.to_json %>,
"directory_listing": <%= @wp_item.directory_listing?.to_json %>,
"error_log_url": <% if @wp_item.error_log? %><%= @wp_item.url('error_log').to_json %><% else %>null<% end %>