Documentation ¶
Index ¶
- Constants
- func GetTargetURL(reqURL *url.URL) string
- func NewDNSCache(logger *logrus.Logger) (*dnscache.Resolver, error)
- type GRPCConn
- type HTTPClient
- func (c *HTTPClient) SendPayload(ctx context.Context, targetURL string, payload string, encoderName string, ...) (responseMsgHeader string, responseBody string, statusCode int, err error)
- func (c *HTTPClient) SendRequest(req *http.Request, testHeaderValue string) (respHeaders http.Header, responseMsgHeader string, body string, statusCode int, ...)
- type Scanner
- type WAFDetector
Constants ¶
View Source
const (
GTWDebugHeader = "X-GoTestWAF-Test"
)
Variables ¶
This section is empty.
Functions ¶
func GetTargetURL ¶ added in v0.4.0
Types ¶
type GRPCConn ¶ added in v0.4.0
type GRPCConn struct {
// contains filtered or unexported fields
}
func (*GRPCConn) CheckAvailability ¶ added in v0.4.0
func (*GRPCConn) IsAvailable ¶ added in v0.4.0
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func (*HTTPClient) SendPayload ¶ added in v0.4.0
func (c *HTTPClient) SendPayload( ctx context.Context, targetURL string, payload string, encoderName string, placeholderName string, placeholderConfig placeholder.PlaceholderConfig, testHeaderValue string, ) (responseMsgHeader string, responseBody string, statusCode int, err error)
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner allows you to test WAF in various ways with given payloads.
func New ¶
func New( logger *logrus.Logger, cfg *config.Config, db *db.DB, dnsResolver *dnscache.Resolver, requestTemplates openapi.Templates, router routers.Router, enableDebugHeader bool, ) (*Scanner, error)
New creates a new Scanner.
func (*Scanner) CheckGRPCAvailability ¶ added in v0.4.0
CheckGRPCAvailability checks if the gRPC server is available at the given URL.
func (*Scanner) WAFBlockCheck ¶ added in v0.4.0
WAFBlockCheck checks if WAF exists and blocks malicious requests.
func (*Scanner) WAFwsBlockCheck ¶ added in v0.4.0
WAFwsBlockCheck checks if WebSocket exists and is protected by WAF.
type WAFDetector ¶ added in v0.4.0
type WAFDetector struct {
// contains filtered or unexported fields
}
func NewDetector ¶ added in v0.4.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.