mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-04 21:37:47 +02:00
* feat(restore): cross-platform restore via dump engine rebuild (#606) Restore previously required the dump's origin OS, overlaying keys onto locally-discovered browsers. It now rebuilds Chromium engines from the dump's vaults (v2 adds engine kind), so copied data or an archive zip decrypts on any OS. * fix(restore): polish help text, drop dead check, dedup dump kinds pflag treats backticked words in flag usage as the value placeholder, so --data-zip rendered as "--data-zip archive" in help output.
This commit is contained in:
@@ -81,6 +81,25 @@ const (
|
||||
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 // lookup key; doubles as the Windows ABE / winutil.Table key when WindowsABE is true
|
||||
|
||||
@@ -27,6 +27,23 @@ func TestCategory_String(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBrowserKind_String(t *testing.T) {
|
||||
tests := []struct {
|
||||
kind BrowserKind
|
||||
want string
|
||||
}{
|
||||
{Chromium, "chromium"},
|
||||
{ChromiumYandex, "chromium-yandex"},
|
||||
{ChromiumOpera, "chromium-opera"},
|
||||
{Firefox, "firefox"},
|
||||
{Safari, "safari"},
|
||||
{BrowserKind(999), "unknown"},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
assert.Equal(t, tt.want, tt.kind.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestCategory_IsSensitive(t *testing.T) {
|
||||
sensitive := []Category{Password, Cookie, CreditCard}
|
||||
for _, c := range sensitive {
|
||||
|
||||
Reference in New Issue
Block a user