api

package
v0.0.0-...-172f919 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func DefaultClient

func DefaultClient(baseUrl string) *Client

func (*Client) BurpVersion

func (c *Client) BurpVersion() (*Versions, error)

BurpVersion retrieves the version of Burp and the version of the burp-rest-api extension

eg. GET http://127.0.0.1:8090/burp/versions

func (*Client) IsInScope

func (c *Client) IsInScope(url string) (bool, error)

func (*Client) ProxyHistory

func (c *Client) ProxyHistory() ([]SiteMapEntry, error)

ProxyHistory returns details of items in Burp Suite Proxy history.

eg. GET http://127.0.0.1:8090/burp/proxy/history

func (*Client) Report

func (c *Client) Report(urlPrefix string, reportType string) (string, error)

Report returns the scan report with current Scanner issues for URLs matching the specified urlPrefix in the form of a byte array. Report format can be specified as HTML or XML. Report with scan issues of all URLs are returned in HTML format if no urlPrefix and format are specified.

eg. GET http://127.0.0.1:8090/burp/report?urlPrefix=http%3A%2F%2Fexample.com&reportType=XML

func (*Client) ReportAsHTML

func (c *Client) ReportAsHTML(urlPrefix string) (string, error)

func (*Client) ReportAsXML

func (c *Client) ReportAsXML(urlPrefix string) (string, error)

func (*Client) ScannerActiveScan

func (c *Client) ScannerActiveScan(baseUrl string) error

ScannerActiveScan scans through Burp Sitemap and sends all HTTP requests with url starting with baseUrl to Burp Scanner for active scan.

eg. POST http://127.0.0.1:8090/burp/scanner/scans/active?baseUrl=http%3A%2F%2Fexample.com

func (*Client) ScannerClearQueue

func (c *Client) ScannerClearQueue() error

ScannerClearQueue deletes the scan queue map from memory, not from Burp suite UI.

eg. DELETE https://127.0.0.1:8090/burp/scanner/scans/active

func (*Client) ScannerIssues

func (c *Client) ScannerIssues(urlPrefix string) ([]ScannerIssue, error)

ScannerIssues returns all of the current scan issues for URLs matching the specified urlPrefix. Performs a simple case-sensitive text match, returning all scan issues whose URL begins with the given urlPrefix. Returns all issues if urlPrefix is null.

eg. GET http://127.0.0.1:8090/burp/scanner/issues?urlPrefix=http%3A%2F%2Fexample.com

func (*Client) ScannerStatusPercent

func (c *Client) ScannerStatusPercent() (int, error)

ScannerStatusPercent returns an aggregate of percentage completed for all the scan queue items.

eg. GET http://127.0.0.1:8090/burp/scanner/status

func (*Client) Spider

func (c *Client) Spider(baseUrl string) error

Spider sends a seed URL to the Burp Spider tool. The baseUrl should be in Suite-wide scope for the Spider to run.

eg. POST http://127.0.0.1:8090/burp/spider?baseUrl=http%3A%2F%2Fexample.com%2F

func (*Client) SpiderSite

func (c *Client) SpiderSite(url string) error

func (*Client) TargetScopeAdd

func (c *Client) TargetScopeAdd(url string) error

TargetScopeAdd will add the supplier url prefix to the target scope.

eg. PUT http://127.0.0.1:8090/burp/target/scope?url=http%3A%2F%2Fexample.com

func (*Client) TargetScopeCheck

func (c *Client) TargetScopeCheck(url string) (*ScopeItem, error)

TargetScopeCheck will query whether a specific URL is within the current Suite-wide scope.

eg. GET http://127.0.0.1:8090/burp/target/scope?url=http%3A%2F%2Fexample.com

func (*Client) TargetScopeExclude

func (c *Client) TargetScopeExclude(url string) error

TargetScopeExclude excludes the specified URL from the Suite-wide scope.

eg. DELETE http://127.0.0.1:8090/burp/target/scope?url=http%3A%2F%2Fexample.com

func (*Client) TargetSitemap

func (c *Client) TargetSitemap(urlPrefix string) ([]SiteMapEntry, error)

TargetSitemap returns details of items in the Burp suite Site map. urlPrefix parameter can be used to specify a URL prefix, in order to extract a specific subset of the site map.

eg. GET http://127.0.0.1:8090/burp/target/sitemap?urlPrefix=http%3A%2F%2Fexample.com

type HttpMessageList

type HttpMessageList struct {
	Messages []SiteMapEntry `json:"messages"`
}

type ScanProgress

type ScanProgress struct {
	ScanPercentage int `json:"scanPercentage"`
}

type ScannerIssue

type ScannerIssue struct {
	Confidence            string         `json:"confidence"`
	Host                  string         `json:"host"`
	HttpMessages          []SiteMapEntry `json:"httpMessages"`
	IssueBackground       string         `json:"issueBackground"`
	IssueDetail           string         `json:"issueDetail"`
	IssueName             string         `json:"issueName"`
	IssueType             int            `json:"issueType"`
	Port                  int            `json:"port"`
	Protocol              string         `json:"protocol"`
	RemediationBackground string         `json:"remediationBackground"`
	RemediationDetail     string         `json:"remediationDetail"`
	Severity              string         `json:"severity"`
	Url                   string         `json:"url"`
}

type ScannerIssues

type ScannerIssues struct {
	Issues []ScannerIssue `json:"issues"`
}

type ScopeItem

type ScopeItem struct {
	InScope bool   `json:"inScope"`
	Url     string `json:"url"`
}

type SiteMapEntry

type SiteMapEntry struct {
	Comment    string `json:"comment"`
	Highlight  string `json:"highlight"`
	Host       string `json:"host"`
	Port       int    `json:"port"`
	Protocol   string `json:"protocol"`
	Request    string `json:"request"`
	Response   string `json:"response"`
	StatusCode int    `json:"statusCode"`
	URL        string `json:"url"`
}

type Versions

type Versions struct {
	BurpVersion string `json:"burpVersion"`
	RestVersion string `json:"extensionVersion"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL