From 86d900527f1aa3840c0dca57cf7fdd0ab08409b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=8D=E1=B4=8F=E1=B4=8F=C9=B4D4=CA=80=E1=B4=8B?= Date: Wed, 13 Apr 2022 16:44:52 +0800 Subject: [PATCH] fix: wrong yandex password filename --- internal/browingdata/browsingdata.go | 1 + internal/browingdata/password.go | 3 ++- internal/item/filename.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/browingdata/browsingdata.go b/internal/browingdata/browsingdata.go index 5177eca..aeed250 100644 --- a/internal/browingdata/browsingdata.go +++ b/internal/browingdata/browsingdata.go @@ -71,6 +71,7 @@ func (d *Data) addSource(Sources []item.Item) { const ( queryChromiumCredit = `SELECT guid, name_on_card, expiration_month, expiration_year, card_number_encrypted FROM credit_cards` queryChromiumLogin = `SELECT origin_url, username_value, password_value, date_created FROM logins` + queryYandexLogin = `SELECT action_url, username_value, password_value, date_created FROM logins` queryChromiumHistory = `SELECT url, title, visit_count, last_visit_time FROM urls` queryChromiumDownload = `SELECT target_path, tab_url, total_bytes, start_time, end_time, mime_type FROM downloads` queryChromiumCookie = `SELECT name, encrypted_value, host_key, path, creation_utc, expires_utc, is_secure, is_httponly, has_expires, is_persistent FROM cookies` diff --git a/internal/browingdata/password.go b/internal/browingdata/password.go index 6c4823f..a578937 100644 --- a/internal/browingdata/password.go +++ b/internal/browingdata/password.go @@ -86,7 +86,7 @@ func (c *YandexPassword) Parse(masterKey []byte) error { } defer os.Remove(item.TempYandexPassword) defer loginDB.Close() - rows, err := loginDB.Query(queryChromiumLogin) + rows, err := loginDB.Query(queryYandexLogin) if err != nil { return err } @@ -106,6 +106,7 @@ func (c *YandexPassword) Parse(masterKey []byte) error { encryptPass: pwd, LoginUrl: url, } + log.Debug(login) if len(pwd) > 0 { var err error if masterKey == nil { diff --git a/internal/item/filename.go b/internal/item/filename.go index e8868e6..028d6cf 100644 --- a/internal/item/filename.go +++ b/internal/item/filename.go @@ -11,7 +11,7 @@ const ( fileChromiumBookmark = "Bookmarks" fileChromiumLocalStorage = "chromiumLocalStorage" - fileYandexPassword = "Ya PassMan Data" + fileYandexPassword = "Ya Passman Data" fileYandexCredit = "Ya Credit Cards" fileFirefoxKey4 = "key4.db"