Documentation
¶
Index ¶
- type Client
- func (c *Client) DownloadFileFromHash(hash string) ([]byte, error)
- func (c *Client) GetLimitKey() (*LimitKey, error)
- func (c *Client) GetListOfHash24() (*[]HashList, error)
- func (c *Client) GetListOfHash24Type(typeFile string) (*[]HashList, error)
- func (c *Client) GetListOfSource24() (*[]string, error)
- func (c *Client) GetListOfTypesFile24() (map[string]uint64, error)
- func (c *Client) GetSearchResult(str string) (*[]SearchDetails, error)
- func (c *Client) GetStoredFileDetails(hash string) (*FileDetails, error)
- func (c *Client) UploadFile(filename string) error
- type FileDetails
- type HashList
- type LimitKey
- type SearchDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client main struct
func (*Client) DownloadFileFromHash ¶
DownloadFileFromHash return file for specific hash
func (*Client) GetLimitKey ¶
GetLimitKey return allocated number of API key requests per day and remaining
func (*Client) GetListOfHash24 ¶
GetListOfHash24 return list hashes from the past 24 hours
func (*Client) GetListOfHash24Type ¶
GetListOfHash24Type return list MD5/SHA1/SHA256 hashes of a specific type from the past 24 hours
func (*Client) GetListOfSource24 ¶
GetListOfSource24 return list of sample sources from the past 24 hours
func (*Client) GetListOfTypesFile24 ¶
GetListOfTypesFile24 return list of file types & count from the past 24 hours
func (*Client) GetSearchResult ¶
func (c *Client) GetSearchResult(str string) (*[]SearchDetails, error)
GetSearchResult return details form search sample hashes, sources and file names
func (*Client) GetStoredFileDetails ¶
func (c *Client) GetStoredFileDetails(hash string) (*FileDetails, error)
GetStoredFileDetails return stored file details
func (*Client) UploadFile ¶
UploadFile used for upload using FormData field "upload"
type FileDetails ¶
type FileDetails struct {
HashList
Ssdeep string `json:"ssdeep,omitempty"`
FType string `json:"f_type,omitempty"`
Sources []string `json:"sources,omitempty"`
}
FileDetails unmarshal special fields
type HashList ¶
type HashList struct {
Md5 string `json:"md5,omitempty"`
Sha1 string `json:"sha1,omitempty"`
Sha256 string `json:"sha256,omitempty"`
}
HashList struct for unmarshal general hash fields
type LimitKey ¶
type LimitKey struct {
Limit string `json:"limit,omitempty"`
Remaining string `json:"remaining,omitempty"`
}
LimitKey struct for unmarshal limits of API
type SearchDetails ¶
type SearchDetails struct {
HashList
TypeSample string `json:"type,omitempty"`
Added uint64 `json:"added,omitempty"`
Source string `json:"source,omitempty"`
YaraHits struct {
Yara []string `json:"yara,omitempty"`
} `json:"yarahits,omitempty"`
Parentfiles []interface{} `json:"parentfiles,omitempty"`
Subfiles []interface{} `json:"subfiles,omitempty"`
}
SearchDetails return searching result