Documentation
¶
Overview ¶
Package proxy provides the MITM HTTP/HTTPS proxy engine for bola.
Index ¶
- func ImportHAR(harPath string, cfg *config.Config, db *graph.DB, v *vault.Vault) (int, error)
- func InScope(path string, include, exclude []string) bool
- func MatchGlob(pattern, path string) bool
- func NormalizePath(path string) string
- type HAR
- type HARContent
- type HARCookie
- type HAREntry
- type HARHeader
- type HARLog
- type HARPost
- type HARQuery
- type HARRequest
- type HARResponse
- type IDType
- type ObjectID
- type Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchGlob ¶
MatchGlob performs a simple glob-style path match. Supports * as a wildcard for one or more path segments.
func NormalizePath ¶
NormalizePath replaces ID-like segments with type placeholders.
Types ¶
type HARContent ¶
type HARContent struct {
Size int `json:"size"`
MimeType string `json:"mimeType"`
Text string `json:"text"`
}
HARContent represents the response body.
type HAREntry ¶
type HAREntry struct {
Request HARRequest `json:"request"`
Response HARResponse `json:"response"`
}
HAREntry represents a single HTTP exchange in a HAR file.
type HARRequest ¶
type HARRequest struct {
Method string `json:"method"`
URL string `json:"url"`
Headers []HARHeader `json:"headers"`
QueryString []HARQuery `json:"queryString"`
PostData *HARPost `json:"postData,omitempty"`
Cookies []HARCookie `json:"cookies"`
}
HARRequest represents the request portion of a HAR entry.
type HARResponse ¶
type HARResponse struct {
Status int `json:"status"`
Headers []HARHeader `json:"headers"`
Content HARContent `json:"content"`
}
HARResponse represents the response portion of a HAR entry.
type IDType ¶
type IDType string
IDType represents the classification of an extracted object identifier.
func ClassifyID ¶
ClassifyID determines the type of an identifier string. Returns empty string if the value doesn't look like an ID.
type ObjectID ¶
type ObjectID struct {
Value string // the actual ID value
Type IDType // uuid | integer | mongoid | hash
Location string // path | query | body | header
Key string // the parameter or JSON key name
}
ObjectID represents an object identifier extracted from an HTTP exchange.
func ExtractAll ¶
ExtractAll extracts all object IDs from a URL, response body, and headers.
func ExtractFromBody ¶
ExtractFromBody extracts object IDs from a response body.
func ExtractFromHeaders ¶
ExtractFromHeaders extracts object IDs from HTTP response headers.
func ExtractFromURL ¶
ExtractFromURL extracts object IDs from URL path segments and query parameters.