Gosafebrowsingv4
a Golang Google Safe Browsing API v4 library
Check here to get an API key.
Installation
go get github.com/0xskylab/gosafebrowsingv4
Usage
ApiKey = "YOUR_API_KEY_HERE"
var tmf threatMatchesFindFormat
tmf.Client.ClientID = "yourcompanyname"
tmf.Client.ClientVersion = "1.5.2"
tmf.ThreatInfo.ThreatTypes = []string{"MALWARE"}
tmf.ThreatInfo.PlatformTypes = []string{"WINDOWS"}
tmf.ThreatInfo.ThreatEntryTypes = []string{"URL"}
tmf.ThreatInfo.ThreatEntries = []struct {
Hash string `json:"hash"`
URL string `json:"url"`
Digest string `json:"digest"`
}{
{
Hash: "",
URL: "http://malware.testing.google.test/testing/malware/",
Digest: "",
},
}
fmt.Println(string(threatMatchesFind(tmf)))
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
MIT