Esempio n. 1
0
    def test_import_csv_line_GET_with_post_data(self):
        irp = import_results()
        pdr = irp._obj_from_csv(('GET', 'http://www.w3af.com/xyz', 'id=1'))

        self.assertIsInstance(pdr, HTTPPostDataRequest)
        self.assertEqual(pdr.get_url().get_domain(), 'www.w3af.com')
        self.assertEqual(pdr.get_url().get_path(), '/xyz')
        self.assertEqual(pdr.get_method(), 'GET')
        self.assertEqual(pdr.get_data(), 'id=1')
Esempio n. 2
0
    def test_import_csv_line_query_string(self):
        irp = import_results()
        qsr = irp._obj_from_csv(('GET', 'http://www.w3af.com/?id=1', ''))

        self.assertIsInstance(qsr, HTTPQSRequest)
        self.assertEqual(qsr.get_url().get_domain(), 'www.w3af.com')
        self.assertEqual(qsr.get_url().get_path(), '/')
        self.assertEqual(qsr.get_method(), 'GET')
        self.assertEqual(qsr.get_uri().get_querystring(), {u'id': [u'1']})
Esempio n. 3
0
    def test_import_csv_line(self):
        irp = import_results()

        qsr = irp._obj_from_csv(('GET', 'http://www.w3af.com/', ''))

        self.assertIsInstance(qsr, HTTPQSRequest)
        self.assertEqual(qsr.get_url().get_domain(), 'www.w3af.com')
        self.assertEqual(qsr.get_url().get_path(), '/')
        self.assertEqual(qsr.get_method(), 'GET')
Esempio n. 4
0
    def test_import_csv_line_GET_with_post_data(self):
        irp = import_results()
        pdr = irp._obj_from_csv(('GET', 'http://www.w3af.com/xyz', 'id=1'))

        self.assertIsInstance(pdr, FuzzableRequest)
        self.assertEqual(pdr.get_url().get_domain(), 'www.w3af.com')
        self.assertEqual(pdr.get_url().get_path(), '/xyz')
        self.assertEqual(pdr.get_method(), 'GET')
        self.assertEqual(pdr.get_data(), 'id=1')
Esempio n. 5
0
    def test_import_csv_line_query_string(self):
        irp = import_results()
        qsr = irp._obj_from_csv(('GET', 'http://www.w3af.com/?id=1', ''))

        self.assertIsInstance(qsr, HTTPQSRequest)
        self.assertEqual(qsr.get_url().get_domain(), 'www.w3af.com')
        self.assertEqual(qsr.get_url().get_path(), '/')
        self.assertEqual(qsr.get_method(), 'GET')
        self.assertEqual(qsr.get_uri().get_querystring(), {u'id': [u'1']})
Esempio n. 6
0
    def test_import_csv_line(self):
        irp = import_results()

        qsr = irp._obj_from_csv(('GET', 'http://www.w3af.com/', ''))

        self.assertIsInstance(qsr, HTTPQSRequest)
        self.assertEqual(qsr.get_url().get_domain(), 'www.w3af.com')
        self.assertEqual(qsr.get_url().get_path(), '/')
        self.assertEqual(qsr.get_method(), 'GET')