Exemplo n.º 1
0
    def test_no_modification(self):
        fwe = full_width_encode()

        u = URL('http://www.w3af.com/')
        r = HTTPRequest( u )
        self.assertEqual(fwe.modify_request( r ).url_object.url_string,
                         u'http://www.w3af.com/')
Exemplo n.º 2
0
    def test_no_modification(self):
        fwe = full_width_encode()

        u = URL('http://www.w3af.com/')
        r = HTTPRequest(u)
        self.assertEqual(
            fwe.modify_request(r).url_object.url_string,
            u'http://www.w3af.com/')
Exemplo n.º 3
0
    def test_modify_path_filename(self):
        fwe = full_width_encode()
        
        u = URL('http://www.w3af.com/hola-mundo')
        r = HTTPRequest( u )
        self.assertEqual(fwe.modify_request( r ).url_object.url_string,
                         u'http://www.w3af.com/%uFF48%uFF4f%uFF4c%uFF41%uFF0d%uFF4d%uFF55%uFF4e%uFF44%uFF4f')

        #
        #    The plugins should not modify the original request
        #
        self.assertEqual(u.url_string,
                         u'http://www.w3af.com/hola-mundo')
Exemplo n.º 4
0
    def test_modify_path_filename(self):
        fwe = full_width_encode()

        u = URL('http://www.w3af.com/hola-mundo')
        r = HTTPRequest(u)
        self.assertEqual(
            fwe.modify_request(r).url_object.url_string,
            u'http://www.w3af.com/%uFF48%uFF4f%uFF4c%uFF41%uFF0d%uFF4d%uFF55%uFF4e%uFF44%uFF4f'
        )

        #
        #    The plugins should not modify the original request
        #
        self.assertEqual(u.url_string, u'http://www.w3af.com/hola-mundo')