mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 22:05:27 +00:00
* js hotfix: wrap javascript source in anon functions * mysql module improvements * misc mysql bugs * js vm pooling: soft deprecation + incentivised pooling * misc updates * disable interactsh failed test * disable interactsh.yaml integration test on win & mac
29 lines
633 B
Go
29 lines
633 B
Go
package compiler
|
|
|
|
import "github.com/projectdiscovery/nuclei/v3/pkg/types"
|
|
|
|
// jsprotocolInit
|
|
|
|
var (
|
|
// Per Execution Javascript timeout in seconds
|
|
JsProtocolTimeout = 10
|
|
PoolingJsVmConcurrency = 100
|
|
NonPoolingVMConcurrency = 20
|
|
)
|
|
|
|
// Init initializes the javascript protocol
|
|
func Init(opts *types.Options) error {
|
|
if opts.Timeout < 10 {
|
|
// keep existing 10s timeout
|
|
return nil
|
|
}
|
|
if opts.JsConcurrency < 100 {
|
|
// 100 is reasonable default
|
|
opts.JsConcurrency = 100
|
|
}
|
|
JsProtocolTimeout = opts.Timeout
|
|
PoolingJsVmConcurrency = opts.JsConcurrency
|
|
PoolingJsVmConcurrency -= NonPoolingVMConcurrency
|
|
return nil
|
|
}
|