ssrf

package
v0.0.0-...-37abd50 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SsrfFrontOKCode int = 200

SsrfFrontOKCode is the HTTP code returned for type SsrfFrontOK

View Source
const SsrfGetQueryHTTPOKCode int = 200

SsrfGetQueryHTTPOKCode is the HTTP code returned for type SsrfGetQueryHTTPOK

Variables

This section is empty.

Functions

This section is empty.

Types

type SsrfFront

type SsrfFront struct {
	Context *middleware.Context
	Handler SsrfFrontHandler
}
SsrfFront swagger:route GET /ssrf ssrf ssrfFront

front page of the Server Side Request Forgery vulnerability

func NewSsrfFront

func NewSsrfFront(ctx *middleware.Context, handler SsrfFrontHandler) *SsrfFront

NewSsrfFront creates a new http.Handler for the ssrf front operation

func (*SsrfFront) ServeHTTP

func (o *SsrfFront) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type SsrfFrontDefault

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

SsrfFrontDefault error occured

swagger:response ssrfFrontDefault

func NewSsrfFrontDefault

func NewSsrfFrontDefault(code int) *SsrfFrontDefault

NewSsrfFrontDefault creates SsrfFrontDefault with default headers values

func (*SsrfFrontDefault) SetStatusCode

func (o *SsrfFrontDefault) SetStatusCode(code int)

SetStatusCode sets the status to the ssrf front default response

func (*SsrfFrontDefault) WithStatusCode

func (o *SsrfFrontDefault) WithStatusCode(code int) *SsrfFrontDefault

WithStatusCode adds the status to the ssrf front default response

func (*SsrfFrontDefault) WriteResponse

func (o *SsrfFrontDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type SsrfFrontHandler

type SsrfFrontHandler interface {
	Handle(SsrfFrontParams) middleware.Responder
}

SsrfFrontHandler interface for that can handle valid ssrf front params

type SsrfFrontHandlerFunc

type SsrfFrontHandlerFunc func(SsrfFrontParams) middleware.Responder

SsrfFrontHandlerFunc turns a function with the right signature into a ssrf front handler

func (SsrfFrontHandlerFunc) Handle

Handle executing the request and returning a response

type SsrfFrontOK

type SsrfFrontOK struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

SsrfFrontOK served front end for Server Side Request Forgery page of Swagger API

swagger:response ssrfFrontOK

func NewSsrfFrontOK

func NewSsrfFrontOK() *SsrfFrontOK

NewSsrfFrontOK creates SsrfFrontOK with default headers values

func (*SsrfFrontOK) SetPayload

func (o *SsrfFrontOK) SetPayload(payload string)

SetPayload sets the payload to the ssrf front o k response

func (*SsrfFrontOK) WithPayload

func (o *SsrfFrontOK) WithPayload(payload string) *SsrfFrontOK

WithPayload adds the payload to the ssrf front o k response

func (*SsrfFrontOK) WriteResponse

func (o *SsrfFrontOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type SsrfFrontParams

type SsrfFrontParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

SsrfFrontParams contains all the bound params for the ssrf front operation typically these are obtained from a http.Request

swagger:parameters SsrfFront

func NewSsrfFrontParams

func NewSsrfFrontParams() SsrfFrontParams

NewSsrfFrontParams creates a new SsrfFrontParams object

There are no default values defined in the spec.

func (*SsrfFrontParams) BindRequest

func (o *SsrfFrontParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewSsrfFrontParams() beforehand.

type SsrfFrontURL

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

SsrfFrontURL generates an URL for the ssrf front operation

func (*SsrfFrontURL) Build

func (o *SsrfFrontURL) Build() (*url.URL, error)

Build a url path and query string

func (*SsrfFrontURL) BuildFull

func (o *SsrfFrontURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*SsrfFrontURL) Must

func (o *SsrfFrontURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*SsrfFrontURL) SetBasePath

func (o *SsrfFrontURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*SsrfFrontURL) String

func (o *SsrfFrontURL) String() string

String returns the string representation of the path with query string

func (*SsrfFrontURL) StringFull

func (o *SsrfFrontURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*SsrfFrontURL) WithBasePath

func (o *SsrfFrontURL) WithBasePath(bp string) *SsrfFrontURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type SsrfGetQueryHTTP

type SsrfGetQueryHTTP struct {
	Context *middleware.Context
	Handler SsrfGetQueryHTTPHandler
}
SsrfGetQueryHTTP swagger:route GET /ssrf/http/query/{safety} ssrf ssrfGetQueryHttp

demonstrates Server Side Request Forgery via query, with vulnerable function net/http

func NewSsrfGetQueryHTTP

func NewSsrfGetQueryHTTP(ctx *middleware.Context, handler SsrfGetQueryHTTPHandler) *SsrfGetQueryHTTP

NewSsrfGetQueryHTTP creates a new http.Handler for the ssrf get query HTTP operation

func (*SsrfGetQueryHTTP) ServeHTTP

func (o *SsrfGetQueryHTTP) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type SsrfGetQueryHTTPDefault

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

SsrfGetQueryHTTPDefault Error occured

swagger:response ssrfGetQueryHttpDefault

func NewSsrfGetQueryHTTPDefault

func NewSsrfGetQueryHTTPDefault(code int) *SsrfGetQueryHTTPDefault

NewSsrfGetQueryHTTPDefault creates SsrfGetQueryHTTPDefault with default headers values

func (*SsrfGetQueryHTTPDefault) SetStatusCode

func (o *SsrfGetQueryHTTPDefault) SetStatusCode(code int)

SetStatusCode sets the status to the ssrf get query HTTP default response

func (*SsrfGetQueryHTTPDefault) WithStatusCode

func (o *SsrfGetQueryHTTPDefault) WithStatusCode(code int) *SsrfGetQueryHTTPDefault

WithStatusCode adds the status to the ssrf get query HTTP default response

func (*SsrfGetQueryHTTPDefault) WriteResponse

func (o *SsrfGetQueryHTTPDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type SsrfGetQueryHTTPHandler

type SsrfGetQueryHTTPHandler interface {
	Handle(SsrfGetQueryHTTPParams) middleware.Responder
}

SsrfGetQueryHTTPHandler interface for that can handle valid ssrf get query HTTP params

type SsrfGetQueryHTTPHandlerFunc

type SsrfGetQueryHTTPHandlerFunc func(SsrfGetQueryHTTPParams) middleware.Responder

SsrfGetQueryHTTPHandlerFunc turns a function with the right signature into a ssrf get query HTTP handler

func (SsrfGetQueryHTTPHandlerFunc) Handle

Handle executing the request and returning a response

type SsrfGetQueryHTTPOK

type SsrfGetQueryHTTPOK struct {

	/*The response when succesful query happens
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

SsrfGetQueryHTTPOK returns the rendered response as a string

swagger:response ssrfGetQueryHttpOK

func NewSsrfGetQueryHTTPOK

func NewSsrfGetQueryHTTPOK() *SsrfGetQueryHTTPOK

NewSsrfGetQueryHTTPOK creates SsrfGetQueryHTTPOK with default headers values

func (*SsrfGetQueryHTTPOK) SetPayload

func (o *SsrfGetQueryHTTPOK) SetPayload(payload string)

SetPayload sets the payload to the ssrf get query Http o k response

func (*SsrfGetQueryHTTPOK) WithPayload

func (o *SsrfGetQueryHTTPOK) WithPayload(payload string) *SsrfGetQueryHTTPOK

WithPayload adds the payload to the ssrf get query Http o k response

func (*SsrfGetQueryHTTPOK) WriteResponse

func (o *SsrfGetQueryHTTPOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type SsrfGetQueryHTTPParams

type SsrfGetQueryHTTPParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*the user provided input for the query vulnerability
	  Required: true
	  In: query
	*/
	Input string
	/*safety qualifier
	  Required: true
	  In: path
	*/
	Safety string
}

SsrfGetQueryHTTPParams contains all the bound params for the ssrf get query HTTP operation typically these are obtained from a http.Request

swagger:parameters SsrfGetQueryHTTP

func NewSsrfGetQueryHTTPParams

func NewSsrfGetQueryHTTPParams() SsrfGetQueryHTTPParams

NewSsrfGetQueryHTTPParams creates a new SsrfGetQueryHTTPParams object

There are no default values defined in the spec.

func (*SsrfGetQueryHTTPParams) BindRequest

func (o *SsrfGetQueryHTTPParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewSsrfGetQueryHTTPParams() beforehand.

type SsrfGetQueryHTTPURL

type SsrfGetQueryHTTPURL struct {
	Safety string

	Input string
	// contains filtered or unexported fields
}

SsrfGetQueryHTTPURL generates an URL for the ssrf get query HTTP operation

func (*SsrfGetQueryHTTPURL) Build

func (o *SsrfGetQueryHTTPURL) Build() (*url.URL, error)

Build a url path and query string

func (*SsrfGetQueryHTTPURL) BuildFull

func (o *SsrfGetQueryHTTPURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*SsrfGetQueryHTTPURL) Must

func (o *SsrfGetQueryHTTPURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*SsrfGetQueryHTTPURL) SetBasePath

func (o *SsrfGetQueryHTTPURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*SsrfGetQueryHTTPURL) String

func (o *SsrfGetQueryHTTPURL) String() string

String returns the string representation of the path with query string

func (*SsrfGetQueryHTTPURL) StringFull

func (o *SsrfGetQueryHTTPURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*SsrfGetQueryHTTPURL) WithBasePath

func (o *SsrfGetQueryHTTPURL) WithBasePath(bp string) *SsrfGetQueryHTTPURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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