mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
feat: replace log with stdout color
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
|
||||
"hack-browser-data/internal/item"
|
||||
"hack-browser-data/internal/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -52,5 +53,6 @@ func (c *chromium) GetMasterKey() ([]byte, error) {
|
||||
return nil, ErrWrongSecurityCommand
|
||||
}
|
||||
c.masterKey = key
|
||||
log.Infof("%s initialized master key success", c.name)
|
||||
return key, nil
|
||||
}
|
||||
|
||||
@@ -64,5 +64,6 @@ func (c *chromium) GetMasterKey() ([]byte, error) {
|
||||
// @https://source.chromium.org/chromium/chromium/src/+/master:components/os_crypt/os_crypt_linux.cc
|
||||
key := pbkdf2.Key(chromiumSecret, chromiumSalt, 1, 16, sha1.New)
|
||||
c.masterKey = key
|
||||
log.Infof("%s initialized master key success", c.name)
|
||||
return key, nil
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"hack-browser-data/internal/decrypter"
|
||||
"hack-browser-data/internal/item"
|
||||
"hack-browser-data/internal/log"
|
||||
"hack-browser-data/internal/utils/fileutil"
|
||||
)
|
||||
|
||||
@@ -29,6 +30,7 @@ func (c *chromium) GetMasterKey() ([]byte, error) {
|
||||
return nil, errDecodeMasterKeyFailed
|
||||
}
|
||||
c.masterKey, err = decrypter.DPApi(pureKey[5:])
|
||||
log.Infof("%s initialized master key success", c.name)
|
||||
return c.masterKey, err
|
||||
}
|
||||
return nil, nil
|
||||
|
||||
Reference in New Issue
Block a user