Documentation
¶
Overview ¶
This package contains useful Dexter-specific functions used everywhere.
Most of the functions in this package are for looking up basic information about the local environment, and where Dexter should put things.
Index ¶
- Variables
- func BuildDemoPath()
- func DeleteS3File(path string) error
- func GetDexterDirectory() string
- func GetDexterInvestigatorFile() string
- func GetDexterKeyFile() string
- func GetS3File(name string) ([]byte, error)
- func ListS3Path(path string) ([]string, error)
- func LoadLocalKey(passwordRetriever func() string) *rsa.PrivateKey
- func LocalUsers() ([]string, error)
- func MoveS3File(oldpath, newpath string) error
- func NewDexterID() string
- func OSQuerySocket() string
- func PollInterval() int
- func ProjectName() string
- func ResolveUUID(partial string) (string, error)
- func RunningDockerImages() ([]string, error)
- func S3Bucket() *string
- func StringWithArgs(item string, args []string, private bool) string
- func StubLocalUsers(set []string)
- func StubProjectName(str string)
- func StubRunningDockerImages(images []string)
- func TaskStrings(tasks map[string][]string) []string
- func UploadS3File(path string, data io.ReadSeeker) error
Constants ¶
This section is empty.
Variables ¶
var LocalDemoPath = ""
Defines a local directory to use as the backend for Dexter. Overrides all calls to S3, used for demo purposes.
Functions ¶
func GetDexterDirectory ¶
func GetDexterDirectory() string
Find the configuration directory for Dexter.
func GetDexterInvestigatorFile ¶
func GetDexterInvestigatorFile() string
Return the full path for the file that stores the local investigator data.
func GetDexterKeyFile ¶
func GetDexterKeyFile() string
Return the full path for the file that stores a user's private key.
func ListS3Path ¶
List the contents of a path in the Dexter S3 bucket.
func LoadLocalKey ¶
func LoadLocalKey(passwordRetriever func() string) *rsa.PrivateKey
Load the local investigator's private key and decrypt it by getting the password from user interaction.
func NewDexterID ¶
func NewDexterID() string
Return a new randomly generated ID for a Dexter investigation
func ProjectName ¶
func ProjectName() string
Get the project name for this host. Useful when scoping in a production environment.
func ResolveUUID ¶
Given a prefix for an ID in Dexter, return the full ID if there is enough specificity. If there is too much ambiguity in the ID, and there are multiple possible matches, return an error. This function works for both investigation and report IDs.
func RunningDockerImages ¶
Connect to the local docker socket and get a list of running docker images.
func S3Bucket ¶
func S3Bucket() *string
Return an AWS string containing the S3 bucket defined by the DEXTER_AWS_S3_BUCKET environment variable
func StringWithArgs ¶
Create a printable representation of a string with arguments, redacting the arguments if the private argument is true.
func StubLocalUsers ¶
func StubLocalUsers(set []string)
Stub all calls to LocalUsers with a string slice. Useful for testing.
func StubProjectName ¶
func StubProjectName(str string)
Stub all calls to ProjectName with a string, for testing.
func StubRunningDockerImages ¶
func StubRunningDockerImages(images []string)
Stub all calls to RunningDockerImages with a string slice. Useful for testing.
func TaskStrings ¶
For each task in a Dexter investigation, create a printable string version. Return the slice of all of these.
func UploadS3File ¶
func UploadS3File(path string, data io.ReadSeeker) error
Upload data to a file in the Dexter S3 bucket.
Types ¶
This section is empty.