Exemple #1
0
    def _is_origin_checked(self, freq, orig_response):
        """
        :return: True if the remote web application verifies the Referer before
                 processing the HTTP request.
        """
        fake_ref = 'http://www.w3af.org/'

        mutant = HeadersMutant(copy.deepcopy(freq))
        headers = mutant.get_dc()
        headers['Referer'] = fake_ref
        mutant.set_token(('Referer',))

        mutant_response = self._uri_opener.send_mutant(mutant)
        
        if not self._is_resp_equal(orig_response, mutant_response):
            return True
        
        return False