cmd

package
v0.0.0-...-2068b95 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PollFrequency defines the interval in which requests are sent to the
	// VT API to check if the analysis is completed.
	PollFrequency = 10 * time.Second
	// TimeoutLimit defines the maximum amount of minutes to wait for an
	// analysis' results.
	TimeoutLimit = 10 * time.Minute
)

Variables

View Source
var Version string

Version is the current version number. This variable is initialized using the -X linker flag while building the program.

Functions

func NewAPIClient

func NewAPIClient() (*utils.APIClient, error)

NewAPIClient returns a new utils.APIClient.

func NewAnalysisCmd

func NewAnalysisCmd() *cobra.Command

NewAnalysisCmd returns a new instance of the 'analysis' command.

func NewCollectionCmd

func NewCollectionCmd() *cobra.Command

NewCollectionCmd returns a new instance of the 'collection' command.

func NewCollectionCreateCmd

func NewCollectionCreateCmd() *cobra.Command

NewCollectionCreateCmd returns a command for creating a collection.

func NewCollectionDeleteCmd

func NewCollectionDeleteCmd() *cobra.Command

NewCollectionDeleteCmd returns a command for deleting a collection.

func NewCollectionRemoveItemsCmd

func NewCollectionRemoveItemsCmd() *cobra.Command

NewCollectionRemoveItemsCmd returns a command for removing items from a collection.

func NewCollectionRenameCmd

func NewCollectionRenameCmd() *cobra.Command

NewCollectionRenameCmd returns a command for renaming a collection.

func NewCollectionUpdateCmd

func NewCollectionUpdateCmd() *cobra.Command

NewCollectionUpdateCmd returns a command for adding new items to a collection.

func NewCompletionCmd

func NewCompletionCmd() *cobra.Command

NewCompletionCmd returns command 'completion'

func NewContentSearchCmd

func NewContentSearchCmd() *cobra.Command

NewContentSearchCmd returns a new instance of the 'search content' command.

func NewDomainCmd

func NewDomainCmd() *cobra.Command

NewDomainCmd returns a new instance of the 'domain' command.

func NewDownloadCmd

func NewDownloadCmd() *cobra.Command

NewDownloadCmd returns a new instance of the 'download' command.

func NewFileCmd

func NewFileCmd() *cobra.Command

NewFileCmd returns a new instance of the 'file' command.

func NewGenDocCmd

func NewGenDocCmd() *cobra.Command

NewGenDocCmd returns a new instance of the 'gendoc' command.

func NewGroupCmd

func NewGroupCmd() *cobra.Command

NewGroupCmd returns a new instance of the 'group' command.

func NewHuntingCmd

func NewHuntingCmd() *cobra.Command

NewHuntingCmd returns a new instance of the 'hunting' command.

func NewHuntingNotificationCmd

func NewHuntingNotificationCmd() *cobra.Command

NewHuntingNotificationCmd returns a new instance of the 'notifications' command.

func NewHuntingNotificationDeleteCmd

func NewHuntingNotificationDeleteCmd() *cobra.Command

NewHuntingNotificationDeleteCmd returns a command for deleting all hunting notifications for the current user.

func NewHuntingNotificationListCmd

func NewHuntingNotificationListCmd() *cobra.Command

NewHuntingNotificationListCmd returns a new instance of the 'notifications list' command.

func NewHuntingRulesetAddCmd

func NewHuntingRulesetAddCmd() *cobra.Command

NewHuntingRulesetAddCmd returns a command for adding a new ruleset.

func NewHuntingRulesetCmd

func NewHuntingRulesetCmd() *cobra.Command

NewHuntingRulesetCmd returns a new instance of the 'rulesets' command.

func NewHuntingRulesetDeleteCmd

func NewHuntingRulesetDeleteCmd() *cobra.Command

NewHuntingRulesetDeleteCmd returns a command for deleting a given ruleset.

func NewHuntingRulesetDisableCmd

func NewHuntingRulesetDisableCmd() *cobra.Command

NewHuntingRulesetDisableCmd returns a command for disabling a given ruleset.

func NewHuntingRulesetEnableCmd

func NewHuntingRulesetEnableCmd() *cobra.Command

NewHuntingRulesetEnableCmd returns a command for enabling a given ruleset.

func NewHuntingRulesetListCmd

func NewHuntingRulesetListCmd() *cobra.Command

NewHuntingRulesetListCmd returns a new instance of the 'rulesets list' command.

func NewHuntingRulesetRenameCmd

func NewHuntingRulesetRenameCmd() *cobra.Command

NewHuntingRulesetRenameCmd returns a command for renaming a given ruleset.

func NewHuntingRulesetSetLimitCmd

func NewHuntingRulesetSetLimitCmd() *cobra.Command

NewHuntingRulesetSetLimitCmd returns a command for changing a ruleset's limit.

func NewHuntingRulesetSetNotificationEmailsCmd

func NewHuntingRulesetSetNotificationEmailsCmd() *cobra.Command

NewHuntingRulesetSetNotificationEmailsCmd returns a command for setting notification emails to a ruleset.

func NewHuntingRulesetUpdateCmd

func NewHuntingRulesetUpdateCmd() *cobra.Command

NewHuntingRulesetUpdateCmd returns a command for updating ruleset's rules.

func NewIOCStreamCmd

func NewIOCStreamCmd() *cobra.Command

NewIOCStreamCmd returns a new instance of the `ioc

func NewIOCStreamDeleteCmd

func NewIOCStreamDeleteCmd() *cobra.Command

NewIOCStreamDeleteCmd returns a new instance of the `ioc_stream delete` command.

func NewIOCStreamListCmd

func NewIOCStreamListCmd() *cobra.Command

NewIOCStreamListCmd returns a new instance of the `ioc_stream list` command.

func NewIPCmd

func NewIPCmd() *cobra.Command

NewIPCmd returns a new instance of the 'ip' command.

func NewInitCmd

func NewInitCmd() *cobra.Command

NewInitCmd returns a 'init' command.

func NewMetaCmd

func NewMetaCmd() *cobra.Command

NewMetaCmd returns a new instance of the 'meta' command.

func NewMonitorCmd

func NewMonitorCmd() *cobra.Command

NewMonitorCmd returns a new instance of the 'monitor_item' command.

func NewMonitorItemsDeleteCmd

func NewMonitorItemsDeleteCmd() *cobra.Command

NewMonitorItemsDeleteCmd returns a command for deleting files in your monitor account.

func NewMonitorItemsDeleteDetailsCmd

func NewMonitorItemsDeleteDetailsCmd() *cobra.Command

NewMonitorItemsDeleteDetailsCmd returns a command for removing item details.

func NewMonitorItemsDownloadCmd

func NewMonitorItemsDownloadCmd() *cobra.Command

NewMonitorItemsDownloadCmd returns a command for downloading files from your monitor account.

func NewMonitorItemsListCmd

func NewMonitorItemsListCmd() *cobra.Command

NewMonitorItemsListCmd returns a list or monitor_items according to a filter.

func NewMonitorItemsSetDetailsCmd

func NewMonitorItemsSetDetailsCmd() *cobra.Command

NewMonitorItemsSetDetailsCmd returns a command for configuring item details.

func NewMonitorItemsUploadCmd

func NewMonitorItemsUploadCmd() *cobra.Command

NewMonitorItemsUploadCmd returns a new instance of the 'mointor upload file' command.

func NewMonitorPartnerCmd

func NewMonitorPartnerCmd() *cobra.Command

NewMonitorPartnerCmd returns a new instance of the 'monitor_hash' command.

func NewMonitorPartnerHashDownloadCmd

func NewMonitorPartnerHashDownloadCmd() *cobra.Command

NewMonitorPartnerHashDownloadCmd returns a command for downloading files from your monitor account.

func NewMonitorPartnerHashesListCmd

func NewMonitorPartnerHashesListCmd() *cobra.Command

NewMonitorPartnerHashesListCmd returns a list or monitor_partner according to a filter.

func NewPrinter

func NewPrinter(cmd *cobra.Command) (*utils.Printer, error)

NewPrinter creates a new utils.Printer.

func NewPrivilegeCmd

func NewPrivilegeCmd(target string) *cobra.Command

func NewPrivilegeGrantCmd

func NewPrivilegeGrantCmd(target string) *cobra.Command

func NewPrivilegeRevokeCmd

func NewPrivilegeRevokeCmd(target string) *cobra.Command

func NewRelationshipCmd

func NewRelationshipCmd(collection, relationship, use, description string) *cobra.Command

NewRelationshipCmd returns a new instance of the 'relationship' command.

func NewRelationshipsCmd

func NewRelationshipsCmd(collection, objectType, use string) *cobra.Command

NewRelationshipsCmd returns a new instance of the 'relationships' command.

func NewRetrohuntAbortCmd

func NewRetrohuntAbortCmd() *cobra.Command

NewRetrohuntAbortCmd returns a new instance of the 'abort' command.

func NewRetrohuntCmd

func NewRetrohuntCmd() *cobra.Command

NewRetrohuntCmd returns a new instance of the 'retrohunt' command.

func NewRetrohuntDeleteCmd

func NewRetrohuntDeleteCmd() *cobra.Command

NewRetrohuntDeleteCmd returns a new instance of the 'delete' command.

func NewRetrohuntListCmd

func NewRetrohuntListCmd() *cobra.Command

NewRetrohuntListCmd returns a new instance of the 'list' command.

func NewRetrohuntMatchesCmd

func NewRetrohuntMatchesCmd() *cobra.Command

NewRetrohuntMatchesCmd returns a new instance of the 'matches' command.

func NewRetrohuntStartCmd

func NewRetrohuntStartCmd() *cobra.Command

NewRetrohuntStartCmd returns a new instance of the 'start' command.

func NewScanCmd

func NewScanCmd() *cobra.Command

NewScanCmd returns a new instance of the 'scan' command.

func NewScanFileCmd

func NewScanFileCmd() *cobra.Command

NewScanFileCmd returns a new instance of the 'scan file' command.

func NewScanURLCmd

func NewScanURLCmd() *cobra.Command

NewScanURLCmd returns a new instance of the 'scan url' command.

func NewSearchCmd

func NewSearchCmd() *cobra.Command

NewSearchCmd returns a new instance of the 'search' command.

func NewURLCmd

func NewURLCmd() *cobra.Command

NewURLCmd returns a new instance of the 'url' command.

func NewUserCmd

func NewUserCmd() *cobra.Command

NewUserCmd returns a new instance of the 'user' command.

func NewVTCommand

func NewVTCommand() *cobra.Command

NewVTCommand creates the `vt` command and its nested children.

func NewVersionCmd

func NewVersionCmd() *cobra.Command

NewVersionCmd returns command 'version'

func ReadFile

func ReadFile(filename string) ([]byte, error)

ReadFile reads the specified file and returns its content. If filename is "-" the data is read from stdin.

Types

type Privilege

type Privilege struct {
	Granted        bool  `json:"granted"`
	ExpirationDate int64 `json:"expiration_date"`
}

type Privileges

type Privileges map[string]Privilege

Jump to

Keyboard shortcuts

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