Documentation
¶
Index ¶
- type EndpointRecorder
- type ObservedEndpoint
- type Proxy
- func (p *Proxy) EndpointCount() int
- func (p *Proxy) ExportCA(path string) error
- func (p *Proxy) ExportEndpoints(path string) error
- func (p *Proxy) Findings() []*vulns.Finding
- func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (p *Proxy) SetScope(hosts []string)
- func (p *Proxy) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointRecorder ¶ added in v1.0.1
type EndpointRecorder struct {
// contains filtered or unexported fields
}
EndpointRecorder accumulates observed endpoints from intercepted traffic and exports them as an OpenAPI 3.0 document for later reuse.
func NewEndpointRecorder ¶ added in v1.0.1
func NewEndpointRecorder() *EndpointRecorder
NewEndpointRecorder creates an empty recorder.
func (*EndpointRecorder) Count ¶ added in v1.0.1
func (er *EndpointRecorder) Count() int
Count returns how many distinct endpoints have been recorded.
func (*EndpointRecorder) ExportOpenAPI ¶ added in v1.0.1
func (er *EndpointRecorder) ExportOpenAPI(path string) error
ExportOpenAPI writes an OpenAPI 3.0 document to the given path.
type ObservedEndpoint ¶ added in v1.0.1
type ObservedEndpoint struct {
Method string
Host string
Scheme string
RawPath string // first observed concrete path
TemplatePath string // path with dynamic segments replaced by {param}
QueryParams map[string]string // param name -> sample value
HeaderParams map[string]string // non-standard request headers -> sample
BodyType string // application/json, form, etc.
BodySample string // a sanitized sample body
BodyFields map[string]string // for JSON/form: field name -> inferred type
StatusCodes map[int]bool // observed response status codes
Hits int // how many times seen
}
ObservedEndpoint holds everything learned about one endpoint.
type Proxy ¶
Proxy is a MITM HTTP/HTTPS proxy with light fuzzing.
func (*Proxy) EndpointCount ¶ added in v1.0.1
EndpointCount returns how many distinct endpoints were observed.
func (*Proxy) ExportEndpoints ¶ added in v1.0.1
ExportEndpoints writes the discovered endpoints as an OpenAPI 3.0 spec.
Click to show internal directories.
Click to hide internal directories.