Skip to main content

File Intel | Golang SDK

The File Intel service enables you to submit a file's hash and get the file's attributes back - giving you insight into the disposition of the file.

Reputation check

func (e *fileIntel) Reputation(ctx context.Context, input *FileReputationRequest) (*pangea.PangeaResponse[FileReputationResult], error)

Lookup a file's hash to retrieve reputation data.

required parameters

context.Context
input := &file_intel.FileReputationRequest{
	Hash: "322ccbd42b7e4fd3a9d0167ca2fa9f6483d9691364c431625f1df54270647ca8",
	HashType: "sha256",
	Raw: true,
	Verbose: true,
	Provider: "reversinglabs",
}

checkOutput, _, err := fileintel.Reputation(ctx, input)

Reputation check V2

func (e *fileIntel) ReputationBulk(ctx context.Context, input *FileReputationBulkRequest) (*pangea.PangeaResponse[FileReputationBulkResult], error)

Retrieve a reputation score for a set of file hashes from a provider, including an optional detailed report.

required parameters

context.Context
hashes := [...]string{"179e2b8a4162372cd9344b81793cbf74a9513a002eda3324e6331243f3137a63"}

input := &file_intel.FileReputationBulkRequest{
	Hashes: hashes,
	HashType: "sha256",
	Raw: true,
	Verbose: true,
	Provider: "reversinglabs",
}

checkOutput, _, err := fileintel.ReputationBulk(ctx, input)

Type Client

type Client interface

required parameters

func(ctx context.Context, req *FileReputationRequest) (*pangea.PangeaResponse[FileReputationResult], error)
context.Context
func(ctx context.Context, req *FileReputationBulkRequest) (*pangea.PangeaResponse[FileReputationBulkResult], error)
context.Context
pangea.BaseServicer

Base service methods

type Client interface {
	Reputation(ctx context.Context, req *FileReputationRequest) (*pangea.PangeaResponse[FileReputationResult], error)
	ReputationBulk(ctx context.Context, req *FileReputationBulkRequest) (*pangea.PangeaResponse[FileReputationBulkResult], error)

	// Base service methods
	pangea.BaseServicer
}

Type FileReputationBulkRequest

type FileReputationBulkRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

[]string `json:"hashes"`
string `json:"hash_type"`

One of "sha256", "sha", "md5".

*bool `json:"verbose,omitempty"`

Echo the API parameters in the response.

*bool `json:"raw,omitempty"`

Include raw data from this provider.

string `json:"provider,omitempty"`

Use reputation data from this provider.

type FileReputationBulkRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Hashes	[]string	`json:"hashes"`

	// One of "sha256", "sha", "md5".
	HashType	string	`json:"hash_type"`

	// Echo the API parameters in the response.
	Verbose	*bool	`json:"verbose,omitempty"`

	// Include raw data from this provider.
	Raw	*bool	`json:"raw,omitempty"`

	// Use reputation data from this provider.
	Provider	string	`json:"provider,omitempty"`
}

Type FileReputationBulkResult

type FileReputationBulkResult struct

required parameters

map[string]ReputationData `json:"data"`

High-level normalized results sent by the Pangea service

map[string]any `json:"parameters,omitempty"`

The parameters, which were passed in the request, echoed back

map[string]any `json:"raw_data,omitempty"`

The raw data from the provider. Each provider's data will have its own format

type FileReputationBulkResult struct {
	// High-level normalized results sent
	// by the Pangea service
	Data	map[string]ReputationData	`json:"data"`

	// The parameters, which were passed in
	// the request, echoed back
	Parameters	map[string]any	`json:"parameters,omitempty"`

	// The raw data from the provider.
	// Each provider's data will have its own format
	RawData	map[string]any	`json:"raw_data,omitempty"`
}

Type FileReputationRequest

type FileReputationRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"hash"`
string `json:"hash_type"`

One of "sha256", "sha", "md5".

*bool `json:"verbose,omitempty"`

Echo the API parameters in the response.

*bool `json:"raw,omitempty"`

Include raw data from this provider.

string `json:"provider,omitempty"`

Use reputation data from this provider.

type FileReputationRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Hash	string	`json:"hash"`

	// One of "sha256", "sha", "md5".
	HashType	string	`json:"hash_type"`

	// Echo the API parameters in the response.
	Verbose	*bool	`json:"verbose,omitempty"`

	// Include raw data from this provider.
	Raw	*bool	`json:"raw,omitempty"`

	// Use reputation data from this provider.
	Provider	string	`json:"provider,omitempty"`
}

Type FileReputationResult

type FileReputationResult struct

required parameters

ReputationData `json:"data"`

High-level normalized results sent by the Pangea service

interface{} `json:"parameters,omitempty"`

The parameters, which were passed in the request, echoed back

interface{} `json:"raw_data,omitempty"`

The raw data from the provider. Each provider's data will have its own format

type FileReputationResult struct {
	// High-level normalized results sent
	// by the Pangea service
	Data	ReputationData	`json:"data"`

	// The parameters, which were passed in
	// the request, echoed back
	Parameters	interface{}	`json:"parameters,omitempty"`

	// The raw data from the provider.
	// Each provider's data will have its own format
	RawData	interface{}	`json:"raw_data,omitempty"`
}

Type ReputationData

type ReputationData struct

required parameters

[]string `json:"category"`

The categories that apply to this indicator as determined by the provider

int `json:"score"`

The score, given by the Pangea service, for the indicator

string `json:"verdict"`

The verdict, given by the Pangea service, for the indicator

type ReputationData struct {
	// The categories that apply to this
	// indicator as determined by the provider
	Category	[]string	`json:"category"`

	// The score, given by the Pangea service,
	// for the indicator
	Score	int	`json:"score"`

	// The verdict, given by the Pangea service,
	// for the indicator
	Verdict	string	`json:"verdict"`
}

Type fileIntel

type fileIntel struct
type fileIntel struct {
	pangea.BaseService
}