refactor: merge the browser tables into internal/browser (#654)

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.
This commit is contained in:
Roger authored and GitHub committed 2026-10-27 16:06:57 +08:00
1 parent 0b8cc23216
commit b655afd054
17 files changed
+432 -424

No files matched your search

-64
View File
@@ -2,70 +2,6 @@
package browser
import (
"github.com/moond4rk/hackbrowserdata/types"
)
func platformBrowsers() []types.BrowserConfig {
return []types.BrowserConfig{
{
Key: "chrome",
Name: chromeName,
Kind: types.Chromium,
KeychainLabel: "Chrome Safe Storage",
UserDataDir: homeDir + "/.config/google-chrome",
},
{
Key: "edge",
Name: edgeName,
Kind: types.Chromium,
KeychainLabel: "Chromium Safe Storage",
UserDataDir: homeDir + "/.config/microsoft-edge",
},
{
Key: "chromium",
Name: chromiumName,
Kind: types.Chromium,
KeychainLabel: "Chromium Safe Storage",
UserDataDir: homeDir + "/.config/chromium",
},
{
Key: "chrome-beta",
Name: chromeBetaName,
Kind: types.Chromium,
KeychainLabel: "Chrome Safe Storage",
UserDataDir: homeDir + "/.config/google-chrome-beta",
},
{
Key: "opera",
Name: operaName,
Kind: types.ChromiumOpera,
KeychainLabel: "Chromium Safe Storage",
UserDataDir: homeDir + "/.config/opera",
},
{
Key: "vivaldi",
Name: vivaldiName,
Kind: types.Chromium,
KeychainLabel: "Chrome Safe Storage",
UserDataDir: homeDir + "/.config/vivaldi",
},
{
Key: "brave",
Name: braveName,
Kind: types.Chromium,
KeychainLabel: "Brave Safe Storage",
UserDataDir: homeDir + "/.config/BraveSoftware/Brave-Browser",
},
{
Key: "firefox",
Name: firefoxName,
Kind: types.Firefox,
UserDataDir: homeDir + "/.mozilla/firefox",
},
}
}
// newCredentialInjector is a no-op on Linux: RetrieveAll runs the peanuts (v10) and D-Bus keyring (v11)
// retrievers itself, and a Chromium browser builds the rest of its Locator from its own config.
func newCredentialInjector(_ DiscoverOptions) browserInjector {