feat(honeypot/naive): attempt to automatically filter out based on crawling

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-12-16 01:22:13 -05:00
parent e0f4468b03
commit 958daba4a1
5 changed files with 407 additions and 59 deletions

View File

@@ -14,6 +14,14 @@ type Impl interface {
Hash() string
}
type Func func(*http.Request) (bool, error)
func (f Func) Check(r *http.Request) (bool, error) {
return f(r)
}
func (f Func) Hash() string { return internal.FastHash(fmt.Sprintf("%#v", f)) }
type List []Impl
// Check runs each checker in the list against the request.