mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-08 21:37:49 +02:00
feat: add Chromium Browser with new v2 architecture (#530)
* feat: add Chromium Browser implementation with new architecture * refactor: replace Walk with ReadDir+Stat for profile discovery * refactor: remove queries override, use extractors for Yandex passwords * refactor: remove dataSource wrapper, use []sourcePath directly * fix: address Copilot review feedback on chromium_new.go * fix: always call key retriever regardless of Local State existence
This commit is contained in:
@@ -11,11 +11,11 @@ import (
|
||||
|
||||
const defaultLoginQuery = `SELECT origin_url, username_value, password_value, date_created FROM logins`
|
||||
|
||||
func extractPasswords(masterKey []byte, path, query string) ([]types.LoginEntry, error) {
|
||||
if query == "" {
|
||||
query = defaultLoginQuery
|
||||
}
|
||||
func extractPasswords(masterKey []byte, path string) ([]types.LoginEntry, error) {
|
||||
return extractPasswordsWithQuery(masterKey, path, defaultLoginQuery)
|
||||
}
|
||||
|
||||
func extractPasswordsWithQuery(masterKey []byte, path, query string) ([]types.LoginEntry, error) {
|
||||
logins, err := sqliteutil.QueryRows(path, false, query,
|
||||
func(rows *sql.Rows) (types.LoginEntry, error) {
|
||||
var url, username string
|
||||
@@ -41,3 +41,10 @@ func extractPasswords(masterKey []byte, path, query string) ([]types.LoginEntry,
|
||||
})
|
||||
return logins, nil
|
||||
}
|
||||
|
||||
// extractYandexPasswords extracts passwords from Yandex's Ya Passman Data,
|
||||
// which stores the URL in action_url instead of origin_url.
|
||||
func extractYandexPasswords(masterKey []byte, path string) ([]types.LoginEntry, error) {
|
||||
const yandexLoginQuery = `SELECT action_url, username_value, password_value, date_created FROM logins`
|
||||
return extractPasswordsWithQuery(masterKey, path, yandexLoginQuery)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user