Skip to content

Commit

Permalink
fix header for hashdeep no 256
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Jul 28, 2022
1 parent 20dd599 commit 078702d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion processor/formatters.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ func toHashDeep(input chan Result) string {
}

str.WriteString("%%%% HASHDEEP-1.0\n")
str.WriteString("%%%% size,md5,sha256,filename\n")
if !contains(Hash, "sha256") && !contains(Hash, "all") {
str.WriteString("%%%% size,md5,filename\n")
} else {
str.WriteString("%%%% size,md5,sha256,filename\n")
}
str.WriteString(fmt.Sprintf("## Invoked from: %s\n", pwd))
str.WriteString(fmt.Sprintf("## $ %s\n", strings.Join(os.Args, " ")))
str.WriteString("##\n")
Expand Down

0 comments on commit 078702d

Please sign in to comment.