mirror of https://github.com/daffainfo/nuclei.git
Merge pull request #950 from projectdiscovery/933-bugfix-dsl-number-conversion
Fixing wrong type conversion in DSL helperdev
commit
0ab66782e0
|
@ -220,10 +220,10 @@ var functions = map[string]govaluate.ExpressionFunction{
|
|||
max := math.MaxInt32
|
||||
|
||||
if len(args) >= 1 {
|
||||
min = args[0].(int)
|
||||
min = int(args[0].(float64))
|
||||
}
|
||||
if len(args) >= withMaxRandArgsSize {
|
||||
max = args[1].(int)
|
||||
max = int(args[1].(float64))
|
||||
}
|
||||
return rand.Intn(max-min) + min, nil
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue