mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 11:55:26 +00:00
* js protocol timeout using -timeout flag * fix zgrab smb hang * fix lint error * custom timeout field in js protocol * minor update: bound checking * add 6 * -timeout in code protocol by default
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
|
|
}
|