class documentation

class BurpRestApiClient(ApiBase): (source)

View In Hierarchy

Interface for the third party extension burp-rest-api.

Parameters
proxy_url
api_portDefaults to 8090
Method active_scan Send a URL to Burp to perform active scan.
Method burp_stop Stop the Burp Suite
Method check_proxy_listen_all_interfaces Check the Burp proxy configuration to make sure it's running and listening on all interfaces
Method enable_proxy_listen_all_interfaces Update the Burp proxy configuration to listen on all interfaces
Method exclude Remove a target from the scope.
Method include Add a target to the scope.
Method is_in_scope Query whether a URL is within the current scope
Method proxy_history Retrieve the Burp proxy history
Method scan_issues Get list of scan issues for URLs matching the specified urlPrefix
Method scan_status Get the percentage completed for the scan queue items
Method verify_uri No summary
Method write_report Write the scan report for URLs matching the specified url_prefix to the given io wrapper. report_type can be HTML/XML.
Constant PARAMS Undocumented
Instance Variable api_port Undocumented
Instance Variable proxy_url Undocumented
Property burp_version The version of Burp
Property proxy_uri Undocumented
Property rest_api_version The version of the burp-rest-api Extension
Method _update_scope Include in scope / Exclude from scope
Instance Variable _logger Undocumented

Inherited from ApiBase:

Method request No summary
Method _api_request Undocumented
Method _serialize_request_kwargs Undocumented
def active_scan(self, base_url: str): (source)

Send a URL to Burp to perform active scan.

def burp_stop(self): (source)

Stop the Burp Suite

def check_proxy_listen_all_interfaces(self) -> bool: (source)

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

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

Update the Burp proxy configuration to listen on all interfaces

def exclude(self, *targets: str): (source)

Remove a target from the scope.

def include(self, *targets: str): (source)

Add a target to the scope.

def is_in_scope(self, url: str) -> bool: (source)

Query whether a URL is within the current scope

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

Retrieve the Burp proxy history

def scan_issues(self, url_prefix: str) -> Optional[List[Dict[str, Any]]]: (source)

Get list of scan issues for URLs matching the specified urlPrefix

def scan_status(self) -> int: (source)

Get the percentage completed for the scan queue items

def verify_uri(self): (source)
Raises
BurpaErrorIf cannot connect to burp-rest-api extension URI.
def write_report(self, report_type: str, url_prefix: str, report_io: TextIO, issue_severity: Union[str, Tuple[str, ...]] = 'All', issue_confidence: Union[str, Tuple[str, ...]] = 'All'): (source)

Write the scan report for URLs matching the specified url_prefix to the given io wrapper. report_type can be HTML/XML.

Undocumented

Value
{'get_config': ('get', '/burp/configuration', None),
 'enable_proxy_listen_all_interfaces': ('put',
                                        '/burp/configuration',
                                        Template('''
                            {
                                "proxy": {
                                    "request_listeners": [{
                                        "certificate_mode": "per_host",
                                        "listen_mode": "all_interfaces",
                                        "listener_port": $proxy_port,
                                        "running": True,
                                        "support_invisible_proxying": True
                                    }]
                                }
                            }
                            ''')),
 'get_proxy_history': ('get', '/burp/proxy/history', None),
 'include_scope': ('put', Template('/burp/target/scope?url=$url'), None),
 'exclude_scope': ('delete', Template('/burp/target/scope?url=$url'), None),
 'is_in_scope': ('get', Template('/burp/target/scope?url=$url'), None),
 'active_scan': ('post',
                 Template('/burp/scanner/scans/active?baseUrl=$base_url'),
                 None),
 'delete_scan_queue': ('delete', '/burp/scanner/scans/active', None),
 'scan_status': ('get', '/burp/scanner/status', None),
 'scan_issues': ('get',
                 Template('/burp/scanner/issues?urlPrefix=$url_prefix'),
                 None),
 'all_scans_issues': ('get', '/burp/scanner/issues', None),
 'scan_report': ('get',
                 Template('/burp/report?urlPrefix=$url_prefix&reportType=$report
_type'),
                 None),
 'all_scans_report': ('get',
                      Template('/burp/report?reportType=$report_type'),
                      None),
 'scan_report_2_2': ('get',
                     Template('/burp/report?urlPrefix=$url_prefix&reportType=$re
port_type&issueSeverity=$issue_severity&issueConfidence=$issue_confidence'),
                     None),
 'all_scans_report_2_2': ('get',
                          Template('/burp/report?reportType=$report_type&issueSe
verity=$issue_severity&issueConfidence=$issue_confidence'),
                          None),
 'burp_stop': ('get', '/burp/stop', None),
 'docs': ('get', '/v2/api-docs', None),
 'versions': ('get', '/burp/versions', None)}
api_port: str = (source)

Undocumented

proxy_url: str = (source)

Undocumented

@property
burp_version: Tuple[int, ...] = (source)

The version of Burp

@property
rest_api_version: Tuple[int, ...] = (source)

The version of the burp-rest-api Extension

def _update_scope(self, action: str, scope: Iterable[str]): (source)

Include in scope / Exclude from scope