class documentation

High level interface for the Burp Suite Security Tool.

Parameters
api_urlBurp Suite REST API Extension URL. Environment variable: 'BURP_API_URL'.
api_portBurp REST API Extension Port (default: 8090). Environment variable: 'BURP_API_PORT'.
new_api_urlBurp Suite Official REST API URL (default: Same as api_url). Environment variable: 'BURP_NEW_API_URL'.
new_api_portBurp Suite Official REST API Port (default: 1337). Environment variable: 'BURP_NEW_API_PORT'.
new_api_keyBurp Suite Official REST API key. Environment variable: 'BURP_NEW_API_KEY'.
quietBe less verbose, only print on errors.
verboseBe more verbose, prints complete trace on errors.
no_bannerDo not print burpa banner.
Method __init__ Undocumented
Method proxy_listen_all_interfaces Check the Burp proxy configuration to make sure it's running and listening on all interfaces and update the Burp proxy configuration if necessary.
Method report Generate the reports for the specified targets URLs. If targets is 'all', generate reports that contains all issues for all targets.
Method scan Launch an active scan, wait until the end and report the results.
Method schedule Launch Burp Suite scans between certain times only.
Method stop Shut down the Burp Suite. You can use systemctl or supervisord (Linux) or NSSM (Windows) to automatically restart the Burp Suite Service when it stopped running.
Method test Test if burpa can connect to Burp Suite REST APIs.
Method version Print burpa version and exit.
Method _get_running_scans Construct a list of the running scans names from the existing Task IDs in the Burp server.
Method _report Undocumented
Method _scan_metrics Print metrics and set the ScanRecord.metrics attribute.
Method _scheduled_scan Undocumented
Method _start_scan Start a Burp Suite active scan.
Method _stop Undocumented
Method _test Undocumented
Method _wait_scan Wait until the end of the scan(s) and set the ScanRecord.status attribute.
Instance Variable _api Undocumented
Instance Variable _logger Undocumented
Instance Variable _newapi Undocumented
def __init__(self, api_url: str = '', api_port: str = '8090', new_api_url: str = '', new_api_port: str = '1337', new_api_key: str = '', verbose: bool = False, quiet: bool = False, no_banner: bool = False): (source)

Undocumented

def proxy_listen_all_interfaces(self, proxy_port: str): (source)

Check the Burp proxy configuration to make sure it's running and listening on all interfaces and update the Burp proxy configuration if necessary.

You might need this if you want to send traffic to the Burp proxy.

Parameters
proxy_port:strBurp Proxy Port.
def report(self, *targets: str, report_type: str = 'HTML', report_output_dir: str = '', issue_severity: Union[str, Tuple[str, ...]] = 'All', issue_confidence: Union[str, Tuple[str, ...]] = 'All', csv: bool = False) -> List[str]: (source)

Generate the reports for the specified targets URLs. If targets is 'all', generate reports that contains all issues for all targets.

Parameters
*targets:strTarget URL(s) or filename to load target URL(s) from. Use 'all' keyword to search in the proxy history and load target URLs from there.
report_type:strBurp scan report type (default: HTML). Use 'none' to skip reporting.
report_output_dir:strDirectory to store the reports. Store report in temp directory if empty.
issue_severity:Union[str, Tuple[str, ...]]Severity of the scan issues to be included in the report. Acceptable values are All, High, Medium, Low and Information. Multiple values are also accepted if they are comma-separated.
issue_confidence:Union[str, Tuple[str, ...]]Confidence of the scan issues to be included in the report. Acceptable values are All, Certain, Firm and Tentative. Multiple values are also accepted if they are comma-separated.
csv:boolWhether to generate a CSV summary with all issues.
Returns
list of strlist of generated report files
def scan(self, *targets: str, report_type: str = 'HTML', report_output_dir: str = '', excluded: str = '', config: str = '', config_file: str = '', app_user: str = '', app_pass: str = '', issue_severity: Union[str, Tuple[str, ...]] = 'All', issue_confidence: Union[str, Tuple[str, ...]] = 'All', csv: bool = False) -> List[ScanRecord]: (source)

Launch an active scan, wait until the end and report the results.

It will use the official REST API to launch the scan, and the burp-rest-api to get the pretty HTML report.

Parameters
*targets:strTarget URL(s) or filename to load target URL(s) from. Use 'all' keyword to search in the proxy history and load target URLs from there.
report_type:strBurp scan report type (default: HTML). Use 'none' to skip reporting.
report_output_dir:strDirectory to store the reports. Store report in temp directory if empty.
excluded:strCommas separated values of the URLs to exclude from the scope of the scan.
config:strCommas separated values of the scan configuration(s) names to apply.
config_file:strCommas separated values of the scan configuration(s) JSON file to read and apply.
app_user:strApplication username for authenticated scans.
app_pass:strApplication password for authenticated scans
issue_severity:Union[str, Tuple[str, ...]]Severity of the scan issues to be included in the report. Acceptable values are All, High, Medium, Low and Information. Multiple values are also accepted if they are comma-separated.
issue_confidence:Union[str, Tuple[str, ...]]Confidence of the scan issues to be included in the report. Acceptable values are All, Certain, Firm and Tentative. Multiple values are also accepted if they are comma-separated.
csv:boolWhether to generate a CSV summary with all issues.
Returns
list of ScanRecordlist of scan records
def schedule(self, *targets: str, report_type: str = 'HTML', report_output_dir: str = '', excluded: str = '', config: str = '', app_user: str = '', app_pass: str = '', begin_time: str = '22:00', end_time: str = '05:00', workers: int = 1, issue_severity: Union[str, Tuple[str, ...]] = 'All', issue_confidence: Union[str, Tuple[str, ...]] = 'All', csv: bool = False): (source)

Launch Burp Suite scans between certain times only.

See 'burpa scan --help' for details on other arguments.

Parameters
*targets:strUndocumented
report_type:strUndocumented
report_output_dir:strUndocumented
excluded:strUndocumented
config:strUndocumented
app_user:strUndocumented
app_pass:strUndocumented
begin_time:str

At what time to start the scans. (Default "22:00")

Formats should be:
hh:mm or hh:mm:ss
end_time:strAt what time to end the scans. Running scans will finish after the end time. (Default "05:00")
workers:intHow many asynchronous scans to launch.
issue_severity:Union[str, Tuple[str, ...]]Undocumented
issue_confidence:Union[str, Tuple[str, ...]]Undocumented
csv:boolUndocumented
def stop(self, wait: str = '0', force: bool = False): (source)

Shut down the Burp Suite. You can use systemctl or supervisord (Linux) or NSSM (Windows) to automatically restart the Burp Suite Service when it stopped running.

Parameters
wait:strIf other burpa processes running, number of seconds to wait until all the running scans ends.
force:boolStop Burp even if scans are running.
def test(self, wait: str = '0'): (source)

Test if burpa can connect to Burp Suite REST APIs.

Parameters
wait:strNumber of seconds to wait until the Burp REST APIs are accessible.
def version(self): (source)

Print burpa version and exit.

def _get_running_scans(self) -> List[str]: (source)

Construct a list of the running scans names from the existing Task IDs in the Burp server.

def _report(self, target: str, report_type: str, timestamp: str, report_output_dir: str, issue_severity: Union[str, Tuple[str, ...]] = 'All', issue_confidence: Union[str, Tuple[str, ...]] = 'All', csv: bool = False) -> List[str]: (source)

Undocumented

def _scan_metrics(self, *records: ScanRecord): (source)

Print metrics and set the ScanRecord.metrics attribute.

def _scheduled_scan(self, target: str, begin_time: str, end_time: str, **kwargs: Any): (source)

Undocumented

def _start_scan(self, *targets: str, excluded: str = '', config: str = '', config_file: str = '', app_user: str = '', app_pass: str = '') -> List[ScanRecord]: (source)

Start a Burp Suite active scan.

def _stop(self): (source)

Undocumented

def _test(self): (source)

Undocumented

def _wait_scan(self, *records: ScanRecord): (source)

Wait until the end of the scan(s) and set the ScanRecord.status attribute.

_api: BurpRestApiClient = (source)

Undocumented

Undocumented

Undocumented