fix: improve extract parsing with proper decoding and error handling (#543)

* fix: implement proper Chromium localStorage LevelDB parsing
* feat: add IsMeta field to StorageEntry and keep META entries
* fix: add error logging for decryption and missing data fields
* fix: address PR review for localStorage parsing
* fix: use naïve instead of café in Latin-1 test to avoid typos false positive
* fix: extension enabled detection and sessionStorage decoding
* fix: session storage origin resolution and extension enabled detection
* fix: address PR review comments for storage parsing
This commit is contained in:
Roger
2026-04-04 18:52:54 +08:00
committed by GitHub
parent a58d432688
commit 068b82178f
10 changed files with 497 additions and 57 deletions
+5 -1
View File
@@ -6,6 +6,7 @@ import (
"database/sql"
"sort"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/types"
"github.com/moond4rk/hackbrowserdata/utils/sqliteutil"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
@@ -31,7 +32,10 @@ func extractCookies(masterKey []byte, path string) ([]types.CookieEntry, error)
return types.CookieEntry{}, err
}
value, _ := decryptValue(masterKey, encryptedValue)
value, err := decryptValue(masterKey, encryptedValue)
if err != nil {
log.Debugf("decrypt cookie %s on %s: %v", name, host, err)
}
value = stripCookieHash(value, host)
return types.CookieEntry{
Name: name,