Exemplo n.º 1
0
 def test_check_case09(self):
     is_vuln = IsVulnerableHelper(200, 301, re.compile('def'),
                                  re.compile('xyz'), re.compile('spam'))
     url = URL('http://moth/')
     http_response = HTTPResponse(301, 'hello world abc def', Headers(),
                                  url, url)
     self.assertTrue(is_vuln.check(http_response))
Exemplo n.º 2
0
 def test_check_case09(self):
     is_vuln = IsVulnerableHelper(200, 301, re.compile('def'),
                                  re.compile('xyz'), re.compile('spam'))
     url = URL('http://moth/')
     http_response = HTTPResponse(301, 'hello world abc def', Headers(),
                                  url, url)
     self.assertTrue( is_vuln.check(http_response) )
Exemplo n.º 3
0
 def test_check_case02(self):
     is_vuln = IsVulnerableHelper(re.compile('xyz'), None, None, None, None)
     url = URL('http://moth/')
     http_response = HTTPResponse(200, 'hello world abc def', Headers(),
                                  url, url)
     self.assertFalse(is_vuln.check(http_response))
Exemplo n.º 4
0
 def test_check_case05(self):
     is_vuln = IsVulnerableHelper(200, 301, None, None, None)
     url = URL('http://moth/')
     http_response = HTTPResponse(301, 'hello world abc def', Headers(),
                                  url, url)
     self.assertTrue(is_vuln.check(http_response))
Exemplo n.º 5
0
 def test_check_case02(self):
     is_vuln = IsVulnerableHelper(re.compile('xyz'), None, None, None, None)
     url = URL('http://moth/')
     http_response = HTTPResponse(200, 'hello world abc def', Headers(),
                                  url, url)
     self.assertFalse( is_vuln.check(http_response) )
Exemplo n.º 6
0
 def test_check_case05(self):
     is_vuln = IsVulnerableHelper(200, 301, None, None, None)
     url = URL('http://moth/')
     http_response = HTTPResponse(301, 'hello world abc def', Headers(),
                                  url, url)
     self.assertTrue( is_vuln.check(http_response) )