Created
January 17, 2019 13:32
-
-
Save kohnakagawa/95a802852343ae296b3a53bfaa864362 to your computer and use it in GitHub Desktop.
ssdeep example in Go lang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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