Documentation
¶
Overview ¶
Package browser holds the browser table and the types the base packages hand the pipeline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base int
Base is what a browser is built on; it selects the base package and the key path.
type Browser ¶
type Browser struct {
Name string
DisplayName string
Base Base
Darwin Platform
Linux Platform
Windows Platform
}
Browser is one browser HBD knows. Name is the -b value and the keys.json vault key; DisplayName goes on every record.
func Lookup ¶
Lookup finds a browser by name in the whole table, whatever the OS, so restore resolves another host's vaults.
func Supported ¶
func Supported() []Browser
Supported returns the browsers of the running OS, in table order.
func (Browser) UserDataDirID ¶
func (b Browser) UserDataDirID(index int) UserDataDirID
UserDataDirID numbers by path order among a browser's user data dirs, so IDs stay the same from run to run.
type Collector ¶
Collector sets every record's Browser and Profile; Fail reports a bad record and the extraction goes on.
type DiscoverOptions ¶
type DiscoverOptions struct {
Home string // the user's home directory; tests pass a temp dir
ProfilePath string // the -p value; "" when not given
}
DiscoverOptions is everything discovery would otherwise read from the environment.
type Extractors ¶
type FileSpec ¶
type FileSpec struct {
Paths []string // slash-separated, relative to the profile dir, or to the user data dir when Shared
IsDir bool
Optional bool // the extraction still runs without it
}
FileSpec is one file or directory an extractor reads; Paths are its candidates in priority order.
func (FileSpec) CandidatePaths ¶
CandidatePaths are the Paths for a profile, relative to the user data dir, in priority order.
type Platform ¶
type Platform struct {
UserDataDirs []string // slash-separated, relative to the home directory; globs allowed
KeychainLabel string // macOS Keychain account / Linux Secret Service label; "" = none
Exe string // Windows: the program the ABE payload is injected into
ExeFallbacks []string // Windows: program paths tried when the registry has no App Paths entry
ABE masterkey.ABEKind
}
Platform is one OS's half of a Browser; one without UserDataDirs means the browser is not supported there.
type Profile ¶
type Profile struct {
Name string
Dir string // slash-separated, relative to UserDataDir.Path; "" when the user data dir itself is the profile
}
Profile is one profile within a user data dir. Name is the output's profile value and never a path.
type ProfileSnapshot ¶
type ProfileSnapshot struct {
Profile Profile
// contains filtered or unexported fields
}
func NewProfileSnapshot ¶
func NewProfileSnapshot(dirSnapshot snapshot.Snapshot, profile Profile, masterKeys func(context.Context) masterkey.Set) ProfileSnapshot
NewProfileSnapshot takes masterKeys, the dir's call-once retrieval, nil for bases that keep no Chromium keys.
func (ProfileSnapshot) MasterKeys ¶
func (ps ProfileSnapshot) MasterKeys(ctx context.Context) masterkey.Set
MasterKeys may block on its first call; a key version that could not be retrieved is absent from the Set.
type UserDataDir ¶
type UserDataDir struct {
ID UserDataDirID
Browser Browser
Path string
Profiles []Profile
}
UserDataDir is one browser data directory found on this machine; ID also names its snapshot and archive directory.
type UserDataDirID ¶
type UserDataDirID string
UserDataDirID is Browser.Name, then "-2", "-3"... in Path order; its own type keeps it apart from that name.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package chromium is the Chromium base: profile discovery, file parsing, and where a user data dir's keys come from.
|
Package chromium is the Chromium base: profile discovery, file parsing, and where a user data dir's keys come from. |
|
Package firefox is the Firefox base: profile discovery, file parsing, and each profile's own key4.db.
|
Package firefox is the Firefox base: profile discovery, file parsing, and each profile's own key4.db. |
|
Package safari is the Safari base: default and named profiles under ~/Library, their files, and the login keychain.
|
Package safari is the Safari base: default and named profiles under ~/Library, their files, and the login keychain. |