Skip to content
The official Go client library for VirusTotal API
Go
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/feed
AUTHORS
LICENSE
README.md Rename object's GetAttributeX to GetX and implement the MustGetX vari… Jun 18, 2019
client.go
feed.go
filescan.go Improve description of FileScanner.Scan. Jun 5, 2019
iterator.go
object.go
relationship.go
urlscan.go
vt.go
vt_test.go

README.md

GoDoc Go Report Card

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.

This library is not production-ready yet, and breaking changes can still occur.

Usage example

import (
    "flag"
    "fmt"
    "log"

    vt "github.com/VirusTotal/vt-go"
)

var APIkey = flag.String("apikey", "", "VirusTotal API key")
var fileSHA256 = flag.String("sha256", "", "SHA-256 of some file")

func main() {

    flag.Parse()
    client := vt.NewClient("<apikey>")

    file, err := client.GetObject(vt.URL("file/%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", file.ID, ls)
}
You can’t perform that action at this time.