예제 #1
0
파일: test_pykto.py 프로젝트: HamzaKo/w3af
 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) )
예제 #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))
예제 #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))
예제 #4
0
 def test_checks_only_response_code_case04(self):
     is_vuln = IsVulnerableHelper(re.compile('a'), re.compile('b'), None,
                                  None, None)
     self.assertFalse(is_vuln.checks_only_response_code())
예제 #5
0
 def test_checks_only_response_code_case02(self):
     is_vuln = IsVulnerableHelper(200, 302, None, None, None)
     self.assertTrue(is_vuln.checks_only_response_code())
예제 #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))
예제 #7
0
파일: test_pykto.py 프로젝트: HamzaKo/w3af
 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) )
예제 #8
0
파일: test_pykto.py 프로젝트: HamzaKo/w3af
 def test_checks_only_response_code_case04(self):
     is_vuln = IsVulnerableHelper(re.compile('a'), re.compile('b'),
                                  None, None, None)
     self.assertFalse( is_vuln.checks_only_response_code() )
예제 #9
0
파일: test_pykto.py 프로젝트: HamzaKo/w3af
 def test_checks_only_response_code_case02(self):
     is_vuln = IsVulnerableHelper(200, 302, None, None, None)
     self.assertTrue( is_vuln.checks_only_response_code() )
예제 #10
0
파일: test_pykto.py 프로젝트: HamzaKo/w3af
 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) )