def test_fuzzable_request_list(self):
        httpretty.register_uri(httpretty.GET,
                               self.get_url('/'),
                               body=INDEX_RESPONSE,
                               content_type='application/json')

        httpretty.register_uri(httpretty.GET,
                               self.get_url('/version'),
                               body=VERSION_RESPONSE,
                               content_type='application/json')

        httpretty.register_uri(httpretty.GET,
                               self.get_url('/scans/0/fuzzable-requests/'),
                               body=FR_LIST_RESPONSE,
                               content_type='application/json')

        conn = Connection(self.api_url)

        scan = Scan(conn, scan_id=0)
        frs = scan.get_fuzzable_requests()

        self.assertEqual(frs, EXPECTED_FRS)
    def test_fuzzable_request_list(self):
        httpretty.register_uri(httpretty.GET,
                               self.get_url('/'),
                               body=INDEX_RESPONSE,
                               content_type='application/json')

        httpretty.register_uri(httpretty.GET,
                               self.get_url('/version'),
                               body=VERSION_RESPONSE,
                               content_type='application/json')

        httpretty.register_uri(httpretty.GET,
                               self.get_url('/scans/0/fuzzable-requests/'),
                               body=FR_LIST_RESPONSE,
                               content_type='application/json')

        conn = Connection(self.api_url)

        scan = Scan(conn, scan_id=0)
        frs = scan.get_fuzzable_requests()

        self.assertEqual(frs, EXPECTED_FRS)
from w3af_api_client import Connection, Scan

connection = Connection('http://127.0.0.1:5000/')
print connection.get_version()

profile = file('w3af/profiles/OWASP_TOP10.pw3af').read()
target = ['http://localhost']

scan = Scan(connection)
scan.start(profile, target)

scan.get_urls()
scan.get_log()
scan.get_findings()
scan.get_fuzzable_requests()