MCPcopy Index your code
hub / github.com/VirusTotal/vt-go

github.com/VirusTotal/vt-go @v1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.0 ↗ · + Follow
192 symbols 588 edges 14 files 116 documented · 60% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.

Usage example

package main

import (
    "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)
}

Extension points exported contracts — how you extend this code

FeedOption (FuncType)
FeedOption represents an option passed to a NewFeed.
feed.go
IteratorOption (FuncType)
IteratorOption represents an option passed to an iterator.
iterator.go
RequestOption (FuncType)
RequestOption represents an option passed to some functions in this package.
client.go
VTClient (Interface)
(no doc) [2 implementers]
client.go
ClientOption (FuncType)
ClientOption represents an option passed to NewClient.
client.go

Core symbols most depended-on inside this repo

Get
called by 29
client.go
Error
called by 26
vt.go
Close
called by 26
iterator.go
URL
called by 20
vt.go
Set
called by 13
object.go
SetHost
called by 10
vt.go
NewClient
called by 10
client.go
sendRequest
called by 10
client.go

Shape

Method 131
Function 31
Struct 23
FuncType 4
TypeAlias 2
Interface 1

Languages

Go100%

Modules by API surface

client.go48 symbols
object.go45 symbols
iterator.go22 symbols
mock/client.go18 symbols
vt_test.go17 symbols
feed.go13 symbols
filescan.go9 symbols
vt.go6 symbols
relationship.go4 symbols
monitor.go4 symbols
urlscan.go2 symbols
client_test.go2 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add vt-go \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact