mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-10-13 03:37:12 +02:00
fix: per-tier master-key retrievers for mixed-cipher profiles (#579)
* fix: per-tier master-key retrievers for mixed-cipher profiles
This commit is contained in:
1 parent
e50c623db0
commit
7b9a973c9c
29 files changed
+699
-227
No files matched your search
@@ -5,6 +5,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/crypto/keyretriever"
|
||||
)
|
||||
|
||||
func setupLoginDB(t *testing.T) string {
|
||||
@@ -18,7 +20,7 @@ func setupLoginDB(t *testing.T) string {
|
||||
func TestExtractPasswords(t *testing.T) {
|
||||
path := setupLoginDB(t)
|
||||
|
||||
got, err := extractPasswords(nil, path)
|
||||
got, err := extractPasswords(keyretriever.MasterKeys{}, path)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, got, 2)
|
||||
|
||||
@@ -54,7 +56,7 @@ func TestExtractYandexPasswords(t *testing.T) {
|
||||
insertLogin("https://origin.yandex.ru", "https://action.yandex.ru/submit", "user", "", 13350000000000000),
|
||||
)
|
||||
|
||||
got, err := extractYandexPasswords(nil, path)
|
||||
got, err := extractYandexPasswords(keyretriever.MasterKeys{}, path)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, got, 1)
|
||||
assert.Equal(t, "https://action.yandex.ru/submit", got[0].URL) // action_url, not origin_url
|
||||
|
||||
Reference in new issue
Block a user