· 6 years ago · Dec 08, 2019, 02:10 PM
1# import the package
2from PyBurprestapi import burpscanner
3
4# setup burp connection
5host = 'http://127.0.0.1:1337/'
6
7# Burp API key
8key = 'ADDD IN GENERATED KEY HERE'
9
10# importing host and key
11bi = burpscanner.BurpApi(host, key)
12
13#
14data = '{"urls":["http://127.0.0.1"]}'
15
16# scan Launch
17response = bi.scan(data)
18
19#issues = bi.issue_definitions()
20
21#print issues
22
23# Get the response message
24print response.message
25
26# Get response header (Scan ID found in Location)
27print response.response_headers