From f0ae857db37ccc680dd640d07226f2c065e04484 Mon Sep 17 00:00:00 2001 From: Lukas Rist Date: Thu, 7 Dec 2017 16:44:15 +0100 Subject: [PATCH] release fixes --- .gitignore | 3 +-- app/ssdeep.go | 1 + ssdeep.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 35afb10..5e4ca2d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Folders _obj _test +dist/ # Architecture specific extensions/prefixes *.[568vq] @@ -22,5 +23,3 @@ _testmain.go *.exe *.test *.prof - -ssdeep diff --git a/app/ssdeep.go b/app/ssdeep.go index ad4f57d..dac13c3 100644 --- a/app/ssdeep.go +++ b/app/ssdeep.go @@ -59,4 +59,5 @@ func main() { score := ssdeep.Distance(h1, h2) fmt.Println(score) } + println(h1.String()) } diff --git a/ssdeep.go b/ssdeep.go index d670869..ad28a40 100644 --- a/ssdeep.go +++ b/ssdeep.go @@ -116,7 +116,7 @@ func (sdeep *SSDEEP) processByte(b byte) { sdeep.blockHash1 = sumHash(b, sdeep.blockHash1) sdeep.blockHash2 = sumHash(b, sdeep.blockHash2) sdeep.rollHash(b) - rh := int(sdeep.rollingState.rollSum()) + rh := int(sdeep.rollingState.h1 + sdeep.rollingState.h2 + sdeep.rollingState.h3) if rh%sdeep.blockSize == (sdeep.blockSize - 1) { if len(sdeep.hashString1) < spamSumLength-1 { sdeep.hashString1 += string(b64[sdeep.blockHash1%64])