Skip to content

Instantly share code, notes, and snippets.

@kohnakagawa
Created January 17, 2019 13:32
Show Gist options
  • Save kohnakagawa/95a802852343ae296b3a53bfaa864362 to your computer and use it in GitHub Desktop.
Save kohnakagawa/95a802852343ae296b3a53bfaa864362 to your computer and use it in GitHub Desktop.
ssdeep example in Go lang
package main
import (
ssdeep "github.com/glaslos/ssdeep"
"fmt"
"os"
"io/ioutil"
)
func main() {
file, err := os.Open("notepad.exe")
if err != nil {
fmt.Println(err.Error())
}
bytes, err := ioutil.ReadAll(file)
if err != nil{
fmt.Println(err.Error())
}
hashStr, err := ssdeep.FuzzyBytes(bytes)
if err != nil {
fmt.Println(err.Error())
}
fmt.Println(hashStr)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment