types

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: 1 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

AllCategories returns all supported data categories.

Functions

This section is empty.

Types

type BookmarkEntry added in v0.5.0

type BookmarkEntry struct {
	ID        int64     `json:"id" csv:"id"`
	Name      string    `json:"name" csv:"name"`
	Type      string    `json:"type" csv:"type"`
	URL       string    `json:"url" csv:"url"`
	Folder    string    `json:"folder" csv:"folder"`
	CreatedAt time.Time `json:"created_at" csv:"created_at"`
}

BookmarkEntry represents a single browser bookmark.

type BrowserConfig added in v0.5.0

type BrowserConfig struct {
	Key           string      // lookup key; doubles as the Windows ABE / winutil.Table key when WindowsABE is true
	Name          string      // display name
	Kind          BrowserKind // engine type
	KeychainLabel string      // macOS Keychain account / Linux D-Bus Secret Service label; "" = none
	WindowsABE    bool        // enable Windows App-Bound Encryption v20 (reflective injection)
	UserDataDir   string      // base browser directory
}

BrowserConfig holds the declarative configuration for a browser installation.

type BrowserData added in v0.5.0

type BrowserData struct {
	Passwords      []LoginEntry
	Cookies        []CookieEntry
	Histories      []HistoryEntry
	Downloads      []DownloadEntry
	Bookmarks      []BookmarkEntry
	CreditCards    []CreditCardEntry
	Extensions     []ExtensionEntry
	LocalStorage   []StorageEntry
	SessionStorage []StorageEntry
}

BrowserData holds all extracted browser data with typed slices.

type BrowserKind added in v0.5.0

type BrowserKind int

BrowserKind identifies the browser engine type.

const (
	Chromium       BrowserKind = iota
	ChromiumYandex             // Chromium variant with different file names and extract logic
	ChromiumOpera              // Opera: extensions in "opsettings" key, data in Roaming
	Firefox
	Safari
)

func (BrowserKind) String added in v1.1.0

func (k BrowserKind) String() string

String returns the canonical lowercase name of the engine kind; the chromium-family values are also the stable wire form carried in a keys dump, so don't change them lightly.

type Category added in v0.5.0

type Category int

Category represents a kind of browser data. It is browser-agnostic — a password is a password regardless of which browser it came from.

const (
	Password Category = iota
	Cookie
	Bookmark
	History
	Download
	CreditCard
	Extension
	LocalStorage
	SessionStorage
)

func NonSensitiveCategories added in v0.5.0

func NonSensitiveCategories() []Category

NonSensitiveCategories returns categories that are safe to export by default.

func (Category) IsSensitive added in v0.5.0

func (c Category) IsSensitive() bool

IsSensitive returns whether the category contains sensitive data that requires explicit opt-in to export.

func (Category) String added in v0.5.0

func (c Category) String() string

String returns the human-readable name of the category.

type CookieEntry added in v0.5.0

type CookieEntry struct {
	Host         string    `json:"host" csv:"host"`
	Path         string    `json:"path" csv:"path"`
	Name         string    `json:"name" csv:"name"`
	Value        string    `json:"value" csv:"value"`
	IsSecure     bool      `json:"is_secure" csv:"is_secure"`
	IsHTTPOnly   bool      `json:"is_http_only" csv:"is_http_only"`
	HasExpire    bool      `json:"has_expire" csv:"has_expire"`
	IsPersistent bool      `json:"is_persistent" csv:"is_persistent"`
	ExpireAt     time.Time `json:"expire_at" csv:"expire_at"`
	CreatedAt    time.Time `json:"created_at" csv:"created_at"`
}

CookieEntry represents a single browser cookie.

type CountResult added in v1.1.0

type CountResult struct {
	Profile
	Counts map[Category]int
}

CountResult pairs a profile with its per-category entry counts.

type CreditCardEntry added in v0.5.0

type CreditCardEntry struct {
	GUID     string `json:"guid" csv:"guid"`
	Name     string `json:"name" csv:"name"`
	Number   string `json:"number" csv:"number"`
	ExpMonth string `json:"exp_month" csv:"exp_month"`
	ExpYear  string `json:"exp_year" csv:"exp_year"`
	NickName string `json:"nick_name" csv:"nick_name"`
	Address  string `json:"address" csv:"address"`
	CVC      string `json:"cvc" csv:"cvc"`
	Comment  string `json:"comment" csv:"comment"`
}

CreditCardEntry represents a single saved credit card. CVC and Comment are Yandex-specific; Chromium leaves them empty.

type DownloadEntry added in v0.5.0

type DownloadEntry struct {
	URL        string    `json:"url" csv:"url"`
	TargetPath string    `json:"target_path" csv:"target_path"`
	MimeType   string    `json:"mime_type" csv:"mime_type"`
	TotalBytes int64     `json:"total_bytes" csv:"total_bytes"`
	StartTime  time.Time `json:"start_time" csv:"start_time"`
	EndTime    time.Time `json:"end_time" csv:"end_time"`
}

DownloadEntry represents a single browser download record.

type ExtensionEntry added in v0.5.0

type ExtensionEntry struct {
	Name        string `json:"name" csv:"name"`
	ID          string `json:"id" csv:"id"`
	Description string `json:"description" csv:"description"`
	Version     string `json:"version" csv:"version"`
	HomepageURL string `json:"homepage_url" csv:"homepage_url"`
	Enabled     bool   `json:"enabled" csv:"enabled"`
}

ExtensionEntry represents a single browser extension.

type ExtractResult added in v1.1.0

type ExtractResult struct {
	Profile
	Data *BrowserData
}

ExtractResult pairs a profile with the data extracted from it.

type HistoryEntry added in v0.5.0

type HistoryEntry struct {
	URL        string    `json:"url" csv:"url"`
	Title      string    `json:"title" csv:"title"`
	VisitCount int       `json:"visit_count" csv:"visit_count"`
	LastVisit  time.Time `json:"last_visit" csv:"last_visit"`
}

HistoryEntry represents a single browser history record.

type LoginEntry added in v0.5.0

type LoginEntry struct {
	URL       string    `json:"url" csv:"url"`
	Username  string    `json:"username" csv:"username"`
	Password  string    `json:"password" csv:"password"`
	CreatedAt time.Time `json:"created_at" csv:"created_at"`
}

LoginEntry represents a single saved login credential.

type Profile added in v1.1.0

type Profile struct {
	Name string
	Dir  string
}

Profile identifies one browser profile — a leaf under an installation.

type StorageEntry added in v0.5.0

type StorageEntry struct {
	IsMeta bool   `json:"is_meta" csv:"is_meta"`
	URL    string `json:"url" csv:"url"`
	Key    string `json:"key" csv:"key"`
	Value  string `json:"value" csv:"value"`
}

StorageEntry represents a single key-value pair from local or session storage.

Jump to

Keyboard shortcuts

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