Documentation
¶
Overview ¶
Package storage implements a encrypted storage mechanism for interactsh external interaction data.
Index ¶
- Constants
- type CacheMetrics
- type CorrelationData
- type PersistentEntry
- type Storage
- func (s *Storage) AddInteraction(correlationID string, data []byte) error
- func (s *Storage) AddInteractionWithId(id string, data []byte) error
- func (s *Storage) GetAllDescriptions() []*communication.DescriptionEntry
- func (s *Storage) GetCacheItem(token string) (*CorrelationData, error)
- func (s *Storage) GetCacheMetrics() *CacheMetrics
- func (s *Storage) GetDescription(correlationID string) (string, error)
- func (s *Storage) GetInteractions(correlationID, secret string) ([]string, string, error)
- func (s *Storage) GetInteractionsWithId(id string) ([]string, error)
- func (s *Storage) GetPersistentInteractions(correlationID string) ([]string, error)
- func (s *Storage) GetRegisteredSessions(activeOnly bool, from, to time.Time, desc string) ([]*communication.SessionEntry, error)
- func (s *Storage) RemoveID(correlationID, secret string) error
- func (s *Storage) SetDescription(correlationID string, description string) error
- func (s *Storage) SetID(ID string) error
- func (s *Storage) SetIDPublicKey(correlationID, secretKey string, publicKey string, description string) error
Constants ¶
const YYYYMMDD = "2006-01-02"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheMetrics ¶
type CorrelationData ¶
type CorrelationData struct { // data contains data for a correlation-id in AES encrypted json format. Data []string `json:"data"` // AESKey is the AES encryption key in encrypted format. AESKey string `json:"aes-key"` // contains filtered or unexported fields }
CorrelationData is the data for a correlation-id.
func (*CorrelationData) GetInteractions ¶
func (c *CorrelationData) GetInteractions() []string
GetInteractions returns the uncompressed interactions for a correlation-id
type PersistentEntry ¶
type PersistentEntry struct { //Description of the connection Description string // contains filtered or unexported fields }
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is an storage for interactsh interaction data as well as correlation-id -> rsa-public-key data.
func (*Storage) AddInteraction ¶
AddInteraction adds an interaction data to the correlation ID after encrypting it with Public Key for the provided correlation ID.
func (*Storage) AddInteractionWithId ¶
AddInteractionWithId adds an interaction data to the id bucket
func (*Storage) GetAllDescriptions ¶
func (s *Storage) GetAllDescriptions() []*communication.DescriptionEntry
GetAllDescriptions returns all descriptions
func (*Storage) GetCacheItem ¶
func (s *Storage) GetCacheItem(token string) (*CorrelationData, error)
GetCacheItem returns an item as is
func (*Storage) GetCacheMetrics ¶
func (s *Storage) GetCacheMetrics() *CacheMetrics
func (*Storage) GetDescription ¶
GetDescription returns the description for a correlationID
func (*Storage) GetInteractions ¶
GetInteractions returns the interactions for a correlationID and removes it from the storage. It also returns AES Encrypted Key for the IDs.
func (*Storage) GetInteractionsWithId ¶
GetInteractions returns the interactions for a id and empty the cache
func (*Storage) GetPersistentInteractions ¶
GetPersistentInteractions returns the interactions for a correlationID. It also returns AES Encrypted Key for the IDs.
func (*Storage) GetRegisteredSessions ¶
func (s *Storage) GetRegisteredSessions(activeOnly bool, from, to time.Time, desc string) ([]*communication.SessionEntry, error)
func (*Storage) SetDescription ¶
SetDescription sets the description of an associated ID