Reduces time to detect non WP sites

This commit is contained in:
erwanlr
2020-02-13 19:15:30 +00:00
parent 72d699b39a
commit c100372b31
2 changed files with 25 additions and 2 deletions

View File

@@ -32,8 +32,12 @@ module WPScan
if %i[mixed aggressive].include?(detection_mode)
%w[wp-admin/install.php wp-login.php].each do |path|
return true if in_scope_uris(Browser.get_and_follow_location(url(path))).any? do |uri|
WORDPRESS_PATTERN.match?(uri.path)
res = Browser.get_and_follow_location(url(path))
next unless res.code == 200
in_scope_uris(res, '//link/@href|//script/@src') do |uri|
return true if WORDPRESS_PATTERN.match?(uri.path)
end
end
end