@@ -73,7 +73,7 @@ func (e *NucleiEngine) applyRequiredDefaults(ctx context.Context) {
7373 if e .customProgress == nil {
7474 e .customProgress = & testutils.MockProgressClient {}
7575 }
76- if e .hostErrCache == nil {
76+ if e .hostErrCache == nil && e . opts . ShouldUseHostError () {
7777 e .hostErrCache = hosterrorscache .New (30 , hosterrorscache .DefaultMaxHostsCount , nil )
7878 }
7979 // setup interactsh
@@ -161,19 +161,21 @@ func (e *NucleiEngine) init(ctx context.Context) error {
161161 }
162162
163163 e .executerOpts = protocols.ExecutorOptions {
164- Output : e .customWriter ,
165- Options : e .opts ,
166- Progress : e .customProgress ,
167- Catalog : e .catalog ,
168- IssuesClient : e .rc ,
169- RateLimiter : e .rateLimiter ,
170- Interactsh : e .interactshClient ,
171- HostErrorsCache : e .hostErrCache ,
172- Colorizer : aurora .NewAurora (true ),
173- ResumeCfg : types .NewResumeCfg (),
174- Browser : e .browserInstance ,
175- Parser : e .parser ,
176- InputHelper : input .NewHelper (),
164+ Output : e .customWriter ,
165+ Options : e .opts ,
166+ Progress : e .customProgress ,
167+ Catalog : e .catalog ,
168+ IssuesClient : e .rc ,
169+ RateLimiter : e .rateLimiter ,
170+ Interactsh : e .interactshClient ,
171+ Colorizer : aurora .NewAurora (true ),
172+ ResumeCfg : types .NewResumeCfg (),
173+ Browser : e .browserInstance ,
174+ Parser : e .parser ,
175+ InputHelper : input .NewHelper (),
176+ }
177+ if e .opts .ShouldUseHostError () && e .hostErrCache != nil {
178+ e .executerOpts .HostErrorsCache = e .hostErrCache
177179 }
178180 if len (e .opts .SecretsFile ) > 0 {
179181 authTmplStore , err := runner .GetAuthTmplStore (* e .opts , e .catalog , e .executerOpts )
0 commit comments