mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 20:35:26 +00:00
* feat http response memory optimization + reuse buffers * update nuclei version * feat: reuse js vm's and compile to programs * fix failing http integration test * remove dead code + add -jsc * feat reuse js vms in pool with concurrency * update comments as per review * bug fix+ update interactsh test to look for dns interaction * try enabling all interactsh integration tests --------- Co-authored-by: mzack <marco.rivoli.nvh@gmail.com>
27 lines
533 B
Go
27 lines
533 B
Go
package compiler
|
|
|
|
import "github.com/projectdiscovery/nuclei/v3/pkg/types"
|
|
|
|
// jsprotocolInit
|
|
|
|
var (
|
|
// Per Execution Javascript timeout in seconds
|
|
JsProtocolTimeout = 10
|
|
JsVmConcurrency = 500
|
|
)
|
|
|
|
// 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
|
|
JsVmConcurrency = opts.JsConcurrency
|
|
return nil
|
|
}
|