mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-10-13 03:37:12 +02:00
feat: add CountEntries to skip decryption for list --detail (#562)
* feat: add CountEntries to skip decryption for list --detail (#549) * test: add CountEntries and countCategory tests at browser level * fix: address review feedback on CountRows and countLocalStorage * test: add CountRows unit tests
This commit is contained in:
1 parent
5f42d4fe5f
commit
b3bbc0dadf
40 files changed
+1009
-101
No files matched your search
@@ -13,6 +13,14 @@ import (
|
||||
"github.com/moond4rk/hackbrowserdata/types"
|
||||
)
|
||||
|
||||
func countPasswords(path string) (int, error) {
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return len(gjson.GetBytes(data, "logins").Array()), nil
|
||||
}
|
||||
|
||||
// decryptPBE combines base64 decode + ASN1 PBE parse + decrypt into one call.
|
||||
func decryptPBE(encoded string, masterKey []byte) ([]byte, error) {
|
||||
raw, err := base64.StdEncoding.DecodeString(encoded)
|
||||
|
||||
Reference in new issue
Block a user