mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 23:47:26 +00:00
* introduce timeout variants * update instances and add codeexectimeout * fix test * default to 10s * minor * make timeouts pluggable and rename * remove residual code --------- Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
25 lines
456 B
Go
25 lines
456 B
Go
package compiler
|
|
|
|
import (
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/types"
|
|
)
|
|
|
|
// jsprotocolInit
|
|
|
|
var (
|
|
PoolingJsVmConcurrency = 100
|
|
NonPoolingVMConcurrency = 20
|
|
)
|
|
|
|
// Init initializes the javascript protocol
|
|
func Init(opts *types.Options) error {
|
|
|
|
if opts.JsConcurrency < 100 {
|
|
// 100 is reasonable default
|
|
opts.JsConcurrency = 100
|
|
}
|
|
PoolingJsVmConcurrency = opts.JsConcurrency
|
|
PoolingJsVmConcurrency -= NonPoolingVMConcurrency
|
|
return nil
|
|
}
|