Types
This commit is contained in:
parent
30e6cdb73f
commit
8f4f1bb1ec
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user