mirror of https://github.com/daffainfo/nuclei.git
Replacing murmur3 with internal safe-pointer version
parent
faae9672ab
commit
357916a6e2
|
@ -153,7 +153,9 @@ func init() {
|
||||||
return hex.EncodeToString(hash.Sum(nil)), nil
|
return hex.EncodeToString(hash.Sum(nil)), nil
|
||||||
}),
|
}),
|
||||||
"mmh3": makeDslFunction(1, func(args ...interface{}) (interface{}, error) {
|
"mmh3": makeDslFunction(1, func(args ...interface{}) (interface{}, error) {
|
||||||
return fmt.Sprintf("%d", int32(murmur3.Sum32WithSeed([]byte(types.ToString(args[0])), 0))), nil
|
hasher := murmur3.New32WithSeed(0)
|
||||||
|
hasher.Write([]byte(fmt.Sprint(args[0])))
|
||||||
|
return fmt.Sprint(hasher.Sum32()), nil
|
||||||
}),
|
}),
|
||||||
"contains": makeDslFunction(2, func(args ...interface{}) (interface{}, error) {
|
"contains": makeDslFunction(2, func(args ...interface{}) (interface{}, error) {
|
||||||
return strings.Contains(types.ToString(args[0]), types.ToString(args[1])), nil
|
return strings.Contains(types.ToString(args[0]), types.ToString(args[1])), nil
|
||||||
|
|
Loading…
Reference in New Issue