Fix #54 False positive when a plugin directory redirects to the homepage
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
|
||||
module WebSite
|
||||
|
||||
#@error_404_hash = nil
|
||||
|
||||
# Checks if the remote website is up.
|
||||
def online?
|
||||
Browser.instance.get(@uri.to_s).code != 0
|
||||
|
||||
@@ -57,11 +57,12 @@ class WpEnumerator
|
||||
request_count += 1
|
||||
|
||||
request.on_complete do |response|
|
||||
page_hash = Digest::MD5.hexdigest(response.body)
|
||||
|
||||
print "\rChecking for #{enumerate_size} total #{options[:type]}... #{(request_count * 100) / enumerate_size}% complete." if options[:show_progress_bar]
|
||||
|
||||
if WpTarget.valid_response_codes.include?(response.code)
|
||||
if Digest::MD5.hexdigest(response.body) != options[:error_404_hash]
|
||||
if page_hash != options[:error_404_hash] and page_hash != options[:homepage_hash]
|
||||
if options[:exclude_content_based]
|
||||
unless response.body[exclude_regexp]
|
||||
found << target
|
||||
|
||||
Reference in New Issue
Block a user