Documentation
¶
Index ¶
- func AddRequestToQueue(w http.ResponseWriter, r *http.Request)
- func BulkRequestQueue(w http.ResponseWriter, r *http.Request)
- func CACertificate(w http.ResponseWriter, r *http.Request)
- func CloseOutOfBandClient()
- func GetFuzzdbPayload(w http.ResponseWriter, r *http.Request)
- func GetInjectPayloads(w http.ResponseWriter, r *http.Request)
- func GetInterceptedRequests(w http.ResponseWriter, r *http.Request)
- func GetOOBURL(w http.ResponseWriter, r *http.Request)
- func HandleInterceptSettingsRequest(w http.ResponseWriter, r *http.Request)
- func HandleSettingsRequest(w http.ResponseWriter, r *http.Request)
- func MakeRequest(w http.ResponseWriter, r *http.Request)
- func RestartListeners(settings *ProxySettings) error
- func RunInjection(w http.ResponseWriter, r *http.Request)
- func SaveSettings(settings *ProxySettings) error
- func SetInterceptedResponse(w http.ResponseWriter, r *http.Request)
- func StartHttpPreviewProxy(listener net.Listener) error
- func StartListeners() error
- func StartOutOfBandClient() error
- func StopListeners() error
- type AddRequestToQueueParameters
- type BulkRequestQueueParameters
- type CertificateRecord
- type InterceptSettings
- type InterceptedRequestResponse
- type MakeRequestParameters
- type PayloadEntry
- type PayloadFile
- type PayloadFileArray
- type PayloadOptions
- type ProxySettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRequestToQueue ¶
func AddRequestToQueue(w http.ResponseWriter, r *http.Request)
AddRequestToQueue godoc @Summary Add Request to Queue @Description add a request to the queue for scanning sites @Tags Requests @Security ApiKeyAuth @Param body body proxy.AddRequestToQueueParameters true "Request Details" @Success 200 @Failure 500 {string} string Error @Router /requests/queue [post]
func BulkRequestQueue ¶
func BulkRequestQueue(w http.ResponseWriter, r *http.Request)
BulkRequestQueue godoc @Summary Add Multiple Requests to the Qeueue @Description add multiple requests to the queue for scanning sites @Tags Requests @Security ApiKeyAuth @Param body body proxy.BulkRequestQueueParameters true "Request and Injection Details" @Success 200 @Failure 500 {string} string Error @Router /requests/bulk_queue [post]
func CACertificate ¶
func CACertificate(w http.ResponseWriter, r *http.Request)
CACertificate godoc @Summary Gets the root CA @Description returns the certificate authority root certificate @Tags Proxy @Produce plain @Security ApiKeyAuth @Success 200 {string} string certificate @Failure 500 {string} string Error @Router /proxy/ca_certificate.pem [get]
func CloseOutOfBandClient ¶
func CloseOutOfBandClient()
func GetFuzzdbPayload ¶
func GetFuzzdbPayload(w http.ResponseWriter, r *http.Request)
GetFuzzDB Payload godoc @Summary Get a fuzzdb file @Description gets a specific fuzzdb file @Tags Injection Operations @Produce json @Security ApiKeyAuth @Param file query string true "The file path of the fuzzdb file to fetch the payload for" @Success 200 {array} string @Failure 500 {string} string Error @Router /inject_operations/fuzzdb_payload [get]
func GetInjectPayloads ¶
func GetInjectPayloads(w http.ResponseWriter, r *http.Request)
GetPayloads godoc @Summary Gets injection payloads @Description gets all available payloads available for injection @Tags Injection Operations @Produce json @Security ApiKeyAuth @Success 200 {object} proxy.PayloadEntry @Failure 500 {string} string Error @Router /inject_operations/payloads [get]
func GetInterceptedRequests ¶
func GetInterceptedRequests(w http.ResponseWriter, r *http.Request)
GetInterceptRequests godoc @Summary Get Intercept Requests @Description gets a list of all requests which have been intercepted, which are awaiting a response @Tags Proxy @Produce json @Security ApiKeyAuth @Success 200 {array} project.InterceptedRequest @Failure 500 {string} string Error @Router /proxy/intercepted_requests [get]
func GetOOBURL ¶
func GetOOBURL(w http.ResponseWriter, r *http.Request)
GetOOBURL godoc @Summary Get Out of Band URL @Description gets a unique URL which can be used to test out of band interactions @Tags Out of Band @Produce json @Security ApiKeyAuth @Success 200 {string} string @Failure 500 {string} string Error @Router /out_of_band/url [get]
func HandleInterceptSettingsRequest ¶
func HandleInterceptSettingsRequest(w http.ResponseWriter, r *http.Request)
func HandleSettingsRequest ¶
func HandleSettingsRequest(w http.ResponseWriter, r *http.Request)
func MakeRequest ¶
func MakeRequest(w http.ResponseWriter, r *http.Request)
MakeRequest godoc @Summary Make a single request @Description makes a single request to a given server @Tags Requests @Accept json @Produce json @Security ApiKeyAuth @Param body body proxy.MakeRequestParameters true "Make Request Parameters in JSON format" @Success 200 {string} string Message @Failure 400 {string} string Error @Failure 500 {string} string Error @Router /requests/make [post]
func RestartListeners ¶
func RestartListeners(settings *ProxySettings) error
RestartListeners restarts all proxy listeners, with the new addresses
func RunInjection ¶
func RunInjection(w http.ResponseWriter, r *http.Request)
RunInjection godoc @Summary Run an Injection Operation @Description creates and runs an injection operation @Tags Injection Operations @Accept json @Produce json @Security ApiKeyAuth @Param body body project.InjectOperation true "Injection details in JSON format (not all fields can be set)" @Success 200 {string} string GUID @Failure 500 {string} string Error @Router /inject_operations/run [post]
func SaveSettings ¶
func SaveSettings(settings *ProxySettings) error
func SetInterceptedResponse ¶
func SetInterceptedResponse(w http.ResponseWriter, r *http.Request)
InterceptSettings godoc @Summary Modify Intercepted Request @Description set how an intercepted request will be responded to @Tags Proxy @Security ApiKeyAuth @Param body body proxy.InterceptedRequestResponse true "Proxy Intercept Response Object" @Success 200 @Failure 500 {string} string Error @Router /proxy/set_intercepted_response [put]
func StartHttpPreviewProxy ¶
func StartListeners ¶
func StartListeners() error
StartListeners starts all proxy listeners using either the default settings or the ones read from the configuration file
func StartOutOfBandClient ¶
func StartOutOfBandClient() error
func StopListeners ¶
func StopListeners() error
StopListeners stops all proxy listeners and closes the request queue
Types ¶
type BulkRequestQueueParameters ¶
type BulkRequestQueueParameters struct {
Host string `json:"host"`
SSL bool `json:"ssl"`
ScanID string `json:"scan_id"`
Replacements [][]string `json:"replacements"`
Request []project.InjectOperationRequestPart `json:"request"`
}
BulkRequestQueueParameters contains the parameters which are passed to the Bulk Request API call
type CertificateRecord ¶
CertificateRecord contains the data required to present a valid certificate to browsers, and encrypt intercepted traffic
type InterceptSettings ¶
type MakeRequestParameters ¶
type MakeRequestParameters struct {
RequestBase64 string `json:"request" example:"<base64 encoded request>"`
Host string `json:"host"`
SSL bool `json:"ssl"`
ScanID string `json:"scan_id"`
ClientCert string `json:"client_cert"`
ClientCertKey string `json:"client_cert_key"`
}
MakeRequestParameters contains the parameters which are passed to the Make Request API call
func (*MakeRequestParameters) Request ¶
func (params *MakeRequestParameters) Request() []byte
Request returns the base64 decoded request
type PayloadEntry ¶
type PayloadEntry struct {
Filename string
IsDirectory bool
ResourcePath string
SamplePayloads []string
SubEntries []PayloadEntry
Title string
PayloadCount int
}
PayloadEntry contains a single entry within the payloads list
type PayloadFile ¶
type PayloadFileArray ¶
type PayloadFileArray []PayloadFile
type PayloadOptions ¶
type PayloadOptions struct {
Attack PayloadFileArray
KnownFiles PayloadFileArray
}
PayloadOptions contains maps of filename[title] for each type of payload for injection
type ProxySettings ¶
type ProxySettings struct {
Http11ProxyAddr string
Http11UpstreamProxyAddr string
MaxConnectionsPerHost int
Http11ProxyListening bool
OpenFile string // cannot be set externally
OpenTempFile string // cannot be set externally
OpenProcessPID int32 // cannot be set externally
}
func GetSettings ¶
func GetSettings() (*ProxySettings, error)