mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 21:55:27 +00:00
21 lines
378 B
Go
21 lines
378 B
Go
|
|
package compiler
|
||
|
|
|
||
|
|
import "github.com/projectdiscovery/nuclei/v3/pkg/types"
|
||
|
|
|
||
|
|
// jsprotocolInit
|
||
|
|
|
||
|
|
var (
|
||
|
|
// Per Execution Javascript timeout in seconds
|
||
|
|
JsProtocolTimeout = 10
|
||
|
|
)
|
||
|
|
|
||
|
|
// Init initializes the javascript protocol
|
||
|
|
func Init(opts *types.Options) error {
|
||
|
|
if opts.Timeout < 10 {
|
||
|
|
// keep existing 10s timeout
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
JsProtocolTimeout = opts.Timeout
|
||
|
|
return nil
|
||
|
|
}
|