gfwaf

package module
v0.0.0-...-9656c79 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 2 Imported by: 0

README

通过gframe的中间件思路,实现一个简单的waf,拦截sql注入和xss攻击

http://localhost:8199/api.v2/gfwaf

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRules = []Rule{
	rules.IsSQLInject,
	rules.IsXSS,
}

Functions

func New

func New(rules []Rule, errResponse interface{}) func(r *ghttp.Request)

func NewWaf

func NewWaf(rules []Rule, errResponse interface{}) waf

Types

type Rule

type Rule func(payload string) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳