browser

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDump added in v1.1.0

func BuildDump(browsers []Browser) masterkey.Dump

BuildDump exports one Vault per installation (Firefox/Safari, lacking KeyManager, are skipped). Partial results are kept — a Chrome 127+ profile mixes v10+v20, so a v20-only failure must not discard a usable v10 key.

func ListBrowsers

func ListBrowsers() []string

ListBrowsers returns sorted keys of all platform browsers.

func Names

func Names() string

Names returns a pipe-separated list of browser keys for CLI help text.

func WriteArchive added in v1.1.0

func WriteArchive(browsers []Browser, categories []types.Category, outPath string) (int, error)

WriteArchive packs each browser's decryption-relevant files into a zip whose internal layout is <browser-key>/<User Data layout>, so a restore can re-expand it and decrypt with a keys.json. Files are staged through a locked-file session first because Windows holds exclusive SQLite locks. Returns the number of source entries staged (a directory source counts once).

Types

type Archivable added in v1.1.0

type Archivable interface {
	BrowserKey() string
	ArchiveSources(categories []types.Category) []chromium.ArchiveSource
}

Archivable is implemented by installations that can enumerate their decryption-relevant files for cross-host transport (Chromium only).

type Browser

type Browser interface {
	BrowserName() string
	UserDataDir() string
	Profiles() []types.Profile
	Extract(categories []types.Category) ([]types.ExtractResult, error)
	CountEntries(categories []types.Category) ([]types.CountResult, error)
}

Browser is one installation: a UserDataDir holding profiles that (for Chromium) share one master key.

func BuildFromDump added in v1.1.0

func BuildFromDump(dump masterkey.Dump, dataDir, filter string) ([]Browser, error)

BuildFromDump reconstructs Chromium engines straight from a dump's vaults, rooted at copied data instead of the local platform table — this is what lets an analyst host decrypt a browser its OS never installs. filter is a browser key ("" or "all" = every vault); a filter matching no vault is an error rather than silent empty output.

Data layout is resolved two ways. When dataDir holds per-key subdirs (the archive layout), each vault is rooted at dataDir/<key>. Otherwise dataDir is treated as one browser's User Data (a hand-copied folder), which is unambiguous only for a single vault — so filter must pick one.

func DiscoverBrowsers added in v0.5.0

func DiscoverBrowsers(opts DiscoverOptions) ([]Browser, error)

DiscoverBrowsers skips credential injection: metadata (Profiles, CountEntries) works, Extract won't decrypt protected data, and macOS never prompts. Use it for list-style commands.

func DiscoverBrowsersWithKeys added in v1.1.0

func DiscoverBrowsersWithKeys(opts DiscoverOptions) ([]Browser, error)

DiscoverBrowsersWithKeys is DiscoverBrowsers plus credential injection, so the returned installations are ready for Extract. On macOS it may prompt for the login password — metadata-only callers should use DiscoverBrowsers to avoid the prompt.

type DiscoverOptions added in v1.1.0

type DiscoverOptions struct {
	Name             string // "all"|"chrome"|"firefox"|...
	ProfilePath      string // custom profile dir override
	KeychainPassword string // macOS only — see browser_darwin.go
}

type KeyManager added in v1.1.0

type KeyManager interface {
	SetRetrievers(masterkey.Retrievers)
	ExportKeys() (masterkey.MasterKeys, error)
	BrowserKey() string
	Kind() types.BrowserKind
}

KeyManager is implemented by installations accepting external master-key retrievers (Chromium only). BrowserKey/Kind expose the identity a portable dump needs to rebuild the engine off the platform table.

type KeychainPasswordReceiver added in v1.1.0

type KeychainPasswordReceiver interface {
	SetKeychainPassword(string)
}

KeychainPasswordReceiver is implemented by installations that need the macOS login password (Safari only).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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