From dccfc10b1050e3db714a83848ff700b8476b0823 Mon Sep 17 00:00:00 2001 From: Dogan Can Bakir <65292895+dogancanbakir@users.noreply.github.com> Date: Mon, 1 Apr 2024 23:11:10 +0300 Subject: [PATCH] fix nocolor output (#4954) Co-authored-by: Sandeep Singh --- internal/runner/runner.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/runner/runner.go b/internal/runner/runner.go index ba82073f..3c6aaf0b 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -374,7 +374,7 @@ func (r *Runner) setupPDCPUpload(writer output.Writer) output.Writer { r.options.EnableCloudUpload = true } if !(r.options.EnableCloudUpload || EnableCloudUpload) { - r.pdcpUploadErrMsg = fmt.Sprintf("[%v] Scan results upload to cloud is disabled.", aurora.BrightYellow("WRN")) + r.pdcpUploadErrMsg = fmt.Sprintf("[%v] Scan results upload to cloud is disabled.", r.colorizer.BrightYellow("WRN")) return writer } color := aurora.NewAurora(!r.options.NoColor) @@ -668,6 +668,7 @@ func (r *Runner) displayExecutionInfo(store *loader.Store) { cfg := config.DefaultConfig + updateutils.Aurora = r.colorizer gologger.Info().Msgf("Current nuclei version: %v %v", config.Version, updateutils.GetVersionDescription(config.Version, cfg.LatestNucleiVersion)) gologger.Info().Msgf("Current nuclei-templates version: %v %v", cfg.TemplateVersion, updateutils.GetVersionDescription(cfg.TemplateVersion, cfg.LatestNucleiTemplatesVersion)) if !HideAutoSaveMsg { @@ -690,7 +691,7 @@ func (r *Runner) displayExecutionInfo(store *loader.Store) { value := v.Load() if value > 0 { if k == templates.Unsigned && !r.options.Silent && !config.DefaultConfig.HideTemplateSigWarning { - gologger.Print().Msgf("[%v] Executing %d unsigned templates for scan. Use with caution.", aurora.BrightYellow("WRN"), value) + gologger.Print().Msgf("[%v] Loading %d unsigned templates for scan. Use with caution.", r.colorizer.BrightYellow("WRN"), value) } else { gologger.Info().Msgf("Executing %d signed templates from %s", value, k) }