api

package
v0.0.0-...-b369aa6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LimitFor         = "X-RateLimit-For"
	LimitInterval    = "X-RateLimit-Interval"
	LimitLimit       = "X-RateLimit-Limit"
	LimitRemainingIn = "X-RateLimit-Reset"
	LimitReset       = "X-RateLimit-Reset"
	LimitUsed        = "X-RateLimit-Used"
)

URL for API

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	URL    string
	Token  string
	Client *http.Client
	Limits map[string][]string
	Type   int
}

API struct containing main details

func NewAPI

func NewAPI(apikey string) (API, error)

NewAPI object

func (*API) DomainDetails

func (api *API) DomainDetails(domain string) (string, error)

func (*API) DomainsDetails

func (api *API) DomainsDetails(address []string) (string, error)

func (*API) FindOrScan

func (api *API) FindOrScan(path, hash string, headers []string, lookup, poll bool) (string, error)

FindOrScan file by hash

func (*API) GetCVEDetails

func (api *API) GetCVEDetails(CVE, property string) (string, error)

GetCVEDetails returns CVE details or products, vendors, hashes for that cve

func (*API) GetCVEs

func (api *API) GetCVEs() (string, error)

GetCVEs lists all CVEs

func (*API) GetFalsePositivesFeed

func (api *API) GetFalsePositivesFeed(engine string, page int) (string, error)

GetFalsePositivesFeed gets newly discovered files which are considered possible false positives. An infected scan result is considered to be false positive if 2 or less engines detected the file as being infected. The feed is updated on a daily basis and contains files that are detected in the previous day. This feed contains data about all engines.

func (api *API) GetHashDownloadLink(hash string) (string, error)

GetHashDownloadLink Retrieve the download link for a specific file. Any of the md5, sha1 and sha256 hashes can be used for downloading the file. This endpoint must be called for each file.

func (*API) GetHashesFeed

func (api *API) GetHashesFeed(page int) (string, error)

GetHashesFeed gets newly discovered hashes

func (*API) GetInfectedHashesFeed

func (api *API) GetInfectedHashesFeed(fmtType string, page int) (string, error)

GetInfectedHashesFeed gets newly discovered malicious hashes. The feed is updated on a daily basis and contains files that are detected as being malicious in the previous day by at least 3 engines.

func (api *API) GetSanitizedLink(fileID string) (string, error)

GetSanitizedLink Retrieve the download link for a sanitized file

func (*API) HashAppinfo

func (api *API) HashAppinfo(hash string) (string, error)

HashAppinfo by file_id

func (*API) HashDetails

func (api *API) HashDetails(hash string) (string, error)

HashDetails by file_id

func (*API) HashVulnerabilities

func (api *API) HashVulnerabilities(hash string, limit, offset int) (string, error)

HashVulnerabilities by hash

func (*API) HashesDetails

func (api *API) HashesDetails(hashes []string) (string, error)

HashesDetails by file_ids

func (*API) IPDetails

func (api *API) IPDetails(ip string) (string, error)

IPDetails by file_id

func (*API) IPsDetails

func (api *API) IPsDetails(address []string) (string, error)

IPsDetails by file_ids

func (*API) RescanFile

func (api *API) RescanFile(fileID string) (string, error)

RescanFile by file_id

func (*API) RescanFiles

func (api *API) RescanFiles(fileIDs []string) (string, error)

RescanFiles by file_ids

func (*API) ResultsByDataID

func (api *API) ResultsByDataID(dataID string) (string, error)

ResultsByDataID by data_id

func (*API) ScanFile

func (api *API) ScanFile(path string, headers []string, poll bool) (string, error)

ScanFile sends to API

func (*API) UrlDetails

func (api *API) UrlDetails(Url string) (string, error)

func (*API) UrlsDetails

func (api *API) UrlsDetails(address []string) (string, error)

type ApiError

type ApiError struct {
	Code     int      `json:"code"`
	Messages []string `json:"messages"`
}

type ApikeyStatus

type ApikeyStatus struct {
	QosScan  string `json:"qos_scan"`
	PaidUser int    `json:"paid_user"`
}

type RescanReq

type RescanReq struct {
	FileIDs []string `json:"file_ids"`
}

RescanReq used for rescan body

type ScanResp

type ScanResp struct {
	DataID      string `json:"data_id"`
	ScanResults struct {
		ProgressPercentage int `json:"progress_percentage"`
	} `json:"scan_results"`
	Error ApiError `json:"error"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL