gomalshare: github.com/MonaxGT/gomalshare Index | Files

package gomalshare

import "github.com/MonaxGT/gomalshare"


Package Files


type Client Uses

type Client struct {
    // contains filtered or unexported fields

Client main struct

func New Uses

func New(apiKey string, url string) (*Client, error)

New constructor function

func (*Client) DownloadFileFromHash Uses

func (c *Client) DownloadFileFromHash(hash string) ([]byte, error)

DownloadFileFromHash return file for specific hash

func (*Client) GetLimitKey Uses

func (c *Client) GetLimitKey() (*LimitKey, error)

GetLimitKey return allocated number of API key requests per day and remaining

func (*Client) GetListOfHash24 Uses

func (c *Client) GetListOfHash24() (*[]HashList, error)

GetListOfHash24 return list hashes from the past 24 hours

func (*Client) GetListOfHash24Type Uses

func (c *Client) GetListOfHash24Type(typeFile string) (*[]HashList, error)

GetListOfHash24Type return list MD5/SHA1/SHA256 hashes of a specific type from the past 24 hours

func (*Client) GetListOfSource24 Uses

func (c *Client) GetListOfSource24() (*[]string, error)

GetListOfSource24 return list of sample sources from the past 24 hours

func (*Client) GetListOfTypesFile24 Uses

func (c *Client) GetListOfTypesFile24() (map[string]uint64, error)

GetListOfTypesFile24 return list of file types & count from the past 24 hours

func (*Client) GetSearchResult Uses

func (c *Client) GetSearchResult(str string) (*[]SearchDetails, error)

GetSearchResult return details form search sample hashes, sources and file names

func (*Client) GetStoredFileDetails Uses

func (c *Client) GetStoredFileDetails(hash string) (*FileDetails, error)

GetStoredFileDetails return stored file details

func (*Client) UploadFile Uses

func (c *Client) UploadFile(filename string) error

UploadFile used for upload using FormData field "upload"

type FileDetails Uses

type FileDetails struct {
    Ssdeep  string   `json:"ssdeep,omitempty"`
    FType   string   `json:"f_type,omitempty"`
    Sources []string `json:"sources,omitempty"`

FileDetails unmarshal special fields

type HashList Uses

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 Uses

type LimitKey struct {
    Limit     string `json:"limit,omitempty"`
    Remaining string `json:"remaining,omitempty"`

LimitKey struct for unmarshal limits of API

type SearchDetails Uses

type SearchDetails struct {
    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

Package gomalshare imports 10 packages (graph). Updated 2019-05-03. Refresh now. Tools for package owners.