Skip to content

Commit

Permalink
Fixing issue with 204
Browse files Browse the repository at this point in the history
  • Loading branch information
andresriancho committed Oct 14, 2019
1 parent e24cab6 commit e001c81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions w3af/plugins/infrastructure/find_vhosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from w3af.core.controllers.threads.threadpool import return_args, one_to_many
from w3af.core.controllers.misc.is_ip_address import is_ip_address
from w3af.core.controllers.misc.is_private_site import is_private_site
from w3af.core.data.url.helpers import is_no_content_response
from w3af.core.data.fuzzer.utils import rand_alnum
from w3af.core.data.bloomfilter.scalable_bloom import ScalableBloomFilter
from w3af.core.data.dc.headers import Headers
Expand Down Expand Up @@ -97,6 +98,7 @@ def _get_dead_domains(self, fuzzable_request):
# Failed to find a suitable parser for the document
return

#
# Note:
#
# - With parsed_references I'm 100% that it's really something in the
Expand All @@ -107,6 +109,7 @@ def _get_dead_domains(self, fuzzable_request):
#
# In this case, and because I'm only going to use the domain name of the
# URL I'm going to trust the re_references also.
#
parsed_references, re_references = dp.get_references()
parsed_references.extend(re_references)

Expand Down Expand Up @@ -181,6 +184,9 @@ def _response_is_different(self, vhost_response, orig_resp_body, non_existent_re
that do not exist in the remote server
:return: True if vhost_response is different from orig_resp_body and non_existent_responses
"""
if is_no_content_response(vhost_response):
return False

if fuzzy_equal(vhost_response.get_body(), orig_resp_body, 0.35):
return False

Expand Down

0 comments on commit e001c81

Please sign in to comment.