mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-12 12:55:53 +02:00
add libinjection expr helpers (#2914)
This commit is contained in:
parent
7779c7ff0c
commit
52f86c2d10
3 changed files with 91 additions and 0 deletions
17
pkg/exprhelpers/libinjection.go
Normal file
17
pkg/exprhelpers/libinjection.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package exprhelpers
|
||||
|
||||
import "github.com/corazawaf/libinjection-go"
|
||||
|
||||
func LibInjectionIsSQLI(params ...any) (any, error) {
|
||||
str := params[0].(string)
|
||||
|
||||
ret, _ := libinjection.IsSQLi(str)
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func LibInjectionIsXSS(params ...any) (any, error) {
|
||||
str := params[0].(string)
|
||||
|
||||
ret := libinjection.IsXSS(str)
|
||||
return ret, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue