mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
Parsers move with git mv so their history follows them, and now read a ProfileSnapshot and hand records to a Collector. The old browser/chromium runs these extractors, so today's CLI exercises them; its list --detail counters stay until the switch-over.
26 lines
962 B
Go
26 lines
962 B
Go
package browser
|
|
|
|
// DiscoverOptions is everything discovery would otherwise read from the environment.
|
|
type DiscoverOptions struct {
|
|
Home string // the user's home directory; tests pass a temp dir
|
|
ProfilePath string // the -p value; "" when not given
|
|
}
|
|
|
|
// DirID names one user data dir: Def.ID for the first one of a Def, then "-2", "-3"… in Path order. Its own type
|
|
// keeps it from being passed where a Def.ID belongs: the two are equal on a machine with one Arc.
|
|
type DirID string
|
|
|
|
// UserDataDir is one browser data directory found on this machine; ID also names its snapshot and archive directory.
|
|
type UserDataDir struct {
|
|
ID DirID
|
|
Def Def
|
|
Path string
|
|
Profiles []Profile
|
|
}
|
|
|
|
// Profile is one profile within a user data dir. Name is the output's profile value and never a path.
|
|
type Profile struct {
|
|
Name string
|
|
Dir string // slash-separated, relative to UserDataDir.Path; "" when the user data dir itself is the profile
|
|
}
|