add JA4H expr helper (#3401)

This commit is contained in:
blotus 2025-02-24 15:20:33 +01:00 committed by GitHub
parent a3187d6f2c
commit ce5b4b435b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 656 additions and 6 deletions

13
pkg/exprhelpers/waf.go Normal file
View file

@ -0,0 +1,13 @@
package exprhelpers
import (
"net/http"
"github.com/crowdsecurity/crowdsec/pkg/appsec/ja4h"
)
// JA4H(req *http.Request) string
func JA4H(params ...any) (any, error) {
req := params[0].(*http.Request)
return ja4h.JA4H(req), nil
}