Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VirusTotal/vt-go
The official Go client library for VirusTotal API
https://github.com/VirusTotal/vt-go
go library virustotal
Last synced: 3 months ago
JSON representation
The official Go client library for VirusTotal API
- Host: GitHub
- URL: https://github.com/VirusTotal/vt-go
- Owner: VirusTotal
- License: apache-2.0
- Created: 2018-05-15T11:19:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-08T15:00:51.000Z (4 months ago)
- Last Synced: 2024-07-08T18:49:38.548Z (4 months ago)
- Topics: go, library, virustotal
- Language: Go
- Homepage:
- Size: 107 KB
- Stars: 164
- Watchers: 29
- Forks: 28
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
[![GoDoc](https://godoc.org/github.com/VirusTotal/vt-go?status.svg)](https://godoc.org/github.com/VirusTotal/vt-go)
[![Go Report Card](https://goreportcard.com/badge/github.com/VirusTotal/vt-go)](https://goreportcard.com/report/github.com/VirusTotal/vt-go)# vt-go
This is the official Go client library for VirusTotal. With this library you can
interact with the VirusTotal REST API v3 without having to send plain HTTP requests
with the standard "http" package.## Usage example
```golang
package mainimport (
"flag"
"fmt"
"log"
"os"vt "github.com/VirusTotal/vt-go"
)var apikey = flag.String("apikey", "", "VirusTotal API key")
var sha256 = flag.String("sha256", "", "SHA-256 of some file")func main() {
flag.Parse()
if *apikey == "" || *sha256 == "" {
fmt.Println("Must pass both the --apikey and --sha256 arguments.")
os.Exit(0)
}client := vt.NewClient(*apikey)
file, err := client.GetObject(vt.URL("files/%s", *sha256))
if err != nil {
log.Fatal(err)
}ls, err := file.GetTime("last_submission_date")
if err != nil {
log.Fatal(err)
}fmt.Printf("File %s was submitted for the last time on %v\n", file.ID(), ls)
}
```