mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
One Def per browser carries every OS's user data dirs, keychain label, and Windows ABE target, so the per-OS lists and the abeTargets join go away and today's configs derive from it; a test parsing com_iid.c keeps the payload's table in step with the ABE rows.
57 lines
1.8 KiB
Go
57 lines
1.8 KiB
Go
package types
|
|
|
|
import "github.com/moond4rk/hackbrowserdata/internal/record"
|
|
|
|
// BrowserKind identifies the browser engine type.
|
|
type BrowserKind int
|
|
|
|
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
|
|
)
|
|
|
|
// 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.
|
|
func (k BrowserKind) String() string {
|
|
switch k {
|
|
case Chromium:
|
|
return "chromium"
|
|
case ChromiumYandex:
|
|
return "chromium-yandex"
|
|
case ChromiumOpera:
|
|
return "chromium-opera"
|
|
case Firefox:
|
|
return "firefox"
|
|
case Safari:
|
|
return "safari"
|
|
default:
|
|
return "unknown"
|
|
}
|
|
}
|
|
|
|
// BrowserConfig holds the declarative configuration for a browser installation.
|
|
type BrowserConfig struct {
|
|
Key string // Def.ID in internal/browser; the Windows injector looks the ABE target up by it
|
|
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
|
|
}
|
|
|
|
// BrowserData holds all extracted browser data with typed slices.
|
|
type BrowserData struct {
|
|
Passwords []record.Login
|
|
Cookies []record.Cookie
|
|
Histories []record.History
|
|
Downloads []record.Download
|
|
Bookmarks []record.Bookmark
|
|
CreditCards []record.CreditCard
|
|
Extensions []record.Extension
|
|
LocalStorage []record.LocalStorage
|
|
SessionStorage []record.SessionStorage
|
|
}
|