From 8f4f1bb1ecb26585c3b86643048ab618e3bef9f8 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Thu, 17 Sep 2020 11:08:26 -0400 Subject: [PATCH] Types --- modules/http/scanner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/http/scanner.go b/modules/http/scanner.go index 4c3e702..f4e4fef 100644 --- a/modules/http/scanner.go +++ b/modules/http/scanner.go @@ -416,9 +416,9 @@ func (scan *scan) Grab() *zgrab2.ScanError { } if len(scan.results.Response.BodyText) > 0 { - if scan.ComputeDecodedBodyHash { + if scan.scanner.config.ComputeDecodedBodyHash { raw_hash := sha256.Sum256([]byte(scan.results.Response.BodyText)) - scan.results.Response.BodyHash = fmt.Sprintf("sha256:%s", hex.EncodeToString(raw_hash)) + scan.results.Response.BodyHash = fmt.Sprintf("sha256:%s", hex.EncodeToString(raw_hash[:])) } else { m := sha256.New() m.Write(buf.Bytes())