mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
refactor(chromium): isolate Yandex protocol specifics design (#598)
This commit is contained in:
@@ -32,24 +32,6 @@ var chromiumSources = map[types.Category][]sourcePath{
|
||||
types.SessionStorage: {dir("Session Storage")},
|
||||
}
|
||||
|
||||
// yandexSourceOverrides contains only the entries that differ from chromiumSources.
|
||||
var yandexSourceOverrides = map[types.Category][]sourcePath{
|
||||
types.Password: {file("Ya Passman Data")},
|
||||
types.CreditCard: {file("Ya Credit Cards")},
|
||||
}
|
||||
|
||||
// yandexSources returns chromiumSources with Yandex-specific overrides applied.
|
||||
func yandexSources() map[types.Category][]sourcePath {
|
||||
sources := make(map[types.Category][]sourcePath, len(chromiumSources))
|
||||
for k, v := range chromiumSources {
|
||||
sources[k] = v
|
||||
}
|
||||
for k, v := range yandexSourceOverrides {
|
||||
sources[k] = v
|
||||
}
|
||||
return sources
|
||||
}
|
||||
|
||||
// sourcesForKind returns the source mapping for a browser kind.
|
||||
func sourcesForKind(kind types.BrowserKind) map[types.Category][]sourcePath {
|
||||
switch kind {
|
||||
@@ -106,13 +88,6 @@ func (e creditCardExtractor) extract(keys keyretriever.MasterKeys, path string,
|
||||
return err
|
||||
}
|
||||
|
||||
// yandexExtractors overrides Password and CreditCard extraction for Yandex, which wraps its data-encryption key inside
|
||||
// meta.local_encryptor_data, binds per-row AAD to GCM, and stores cards as JSON blobs in a records table.
|
||||
var yandexExtractors = map[types.Category]categoryExtractor{
|
||||
types.Password: passwordExtractor{fn: extractYandexPasswords},
|
||||
types.CreditCard: creditCardExtractor{fn: extractYandexCreditCards},
|
||||
}
|
||||
|
||||
// operaExtractors overrides Extension extraction for Opera,
|
||||
// which stores settings under "extensions.opsettings".
|
||||
var operaExtractors = map[types.Category]categoryExtractor{
|
||||
|
||||
Reference in New Issue
Block a user