diff --git a/runner/runner.go b/runner/runner.go index a66663f27..323f950f6 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -993,6 +993,9 @@ func (r *Runner) RunEnumeration() { resp.ScreenshotPath = screenshotPath resp.ScreenshotPathRel = screenshotPathRel + if r.scanopts.NoScreenshotBytes { + resp.ScreenshotBytes = []byte{} + } } if indexFile != nil { @@ -2138,9 +2141,6 @@ retry: technologies = sliceutil.Dedupe(technologies) } } - if scanopts.NoScreenshotBytes { - screenshotBytes = []byte{} - } if scanopts.NoHeadlessBody { headlessBody = "" }