def test_add_to_url_with_path(self): sr = self_reference() u = URL('http://www.w3af.com/abc/') r = HTTPRequest(u) self.assertEqual(sr.modify_request(r).url_object.url_string, u'http://www.w3af.com/./abc/./')
def test_send_mangled(self): xurllib = ExtendedUrllib() xurllib.set_evasion_plugins([self_reference(), ]) url = URL('http://moth/') http_response = xurllib.GET(url) self.assertEqual(http_response.get_url().url_string, u'http://moth/./')
def test_send_mangled(self): xurllib = ExtendedUrllib() xurllib.set_evasion_plugins([ self_reference(), ]) url = URL('http://moth/') http_response = xurllib.GET(url) self.assertEqual(http_response.get_url().url_string, u'http://moth/./')
def test_add_to_url_with_qs(self): sr = self_reference() u = URL('http://www.w3af.com/abc/def.htm?id=1') r = HTTPRequest(u) self.assertEqual(sr.modify_request(r).url_object.url_string, u'http://www.w3af.com/./abc/./def.htm?id=1') # # The plugins should not modify the original request # self.assertEqual(u.url_string, u'http://www.w3af.com/abc/def.htm?id=1')
def test_add_to_url_with_qs(self): sr = self_reference() u = URL('http://www.w3af.com/abc/def.htm?id=1') r = HTTPRequest(u) self.assertEqual( sr.modify_request(r).url_object.url_string, u'http://www.w3af.com/./abc/./def.htm?id=1') # # The plugins should not modify the original request # self.assertEqual(u.url_string, u'http://www.w3af.com/abc/def.htm?id=1')