mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-23 21:55:28 +00:00
Fixed internal config reading crashes
This commit is contained in:
parent
b7e3eec8db
commit
b83de5fb88
@ -379,8 +379,9 @@ func (r *Runner) RunEnumeration() error {
|
|||||||
messageStr = builder.String()
|
messageStr = builder.String()
|
||||||
builder.Reset()
|
builder.Reset()
|
||||||
|
|
||||||
gologger.Info().Msgf("Using Nuclei Templates %s%s", r.templatesConfig.CurrentVersion, messageStr)
|
if r.templatesConfig != nil {
|
||||||
|
gologger.Info().Msgf("Using Nuclei Templates %s%s", r.templatesConfig.CurrentVersion, messageStr)
|
||||||
|
}
|
||||||
if r.interactsh != nil {
|
if r.interactsh != nil {
|
||||||
gologger.Info().Msgf("Using Interactsh Server %s", r.options.InteractshURL)
|
gologger.Info().Msgf("Using Interactsh Server %s", r.options.InteractshURL)
|
||||||
}
|
}
|
||||||
@ -513,6 +514,9 @@ func (r *Runner) RunEnumeration() error {
|
|||||||
|
|
||||||
// readNewTemplatesFile reads newly added templates from directory if it exists
|
// readNewTemplatesFile reads newly added templates from directory if it exists
|
||||||
func (r *Runner) readNewTemplatesFile() ([]string, error) {
|
func (r *Runner) readNewTemplatesFile() ([]string, error) {
|
||||||
|
if r.templatesConfig == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
additionsFile := filepath.Join(r.templatesConfig.TemplatesDirectory, ".new-additions")
|
additionsFile := filepath.Join(r.templatesConfig.TemplatesDirectory, ".new-additions")
|
||||||
file, err := os.Open(additionsFile)
|
file, err := os.Open(additionsFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -534,6 +538,9 @@ func (r *Runner) readNewTemplatesFile() ([]string, error) {
|
|||||||
|
|
||||||
// readNewTemplatesFile reads newly added templates from directory if it exists
|
// readNewTemplatesFile reads newly added templates from directory if it exists
|
||||||
func (r *Runner) countNewTemplates() int {
|
func (r *Runner) countNewTemplates() int {
|
||||||
|
if r.templatesConfig == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
additionsFile := filepath.Join(r.templatesConfig.TemplatesDirectory, ".new-additions")
|
additionsFile := filepath.Join(r.templatesConfig.TemplatesDirectory, ".new-additions")
|
||||||
file, err := os.Open(additionsFile)
|
file, err := os.Open(additionsFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user