mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-04 21:37:47 +02:00
chore: set max local storage value length is 2kb
This commit is contained in:
@@ -26,7 +26,7 @@ type storage struct {
|
|||||||
Value string
|
Value string
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxLocalStorageLength = 1024 * 2
|
const maxLocalStorageValueLength = 1024 * 2
|
||||||
|
|
||||||
func (c *ChromiumLocalStorage) Parse(masterKey []byte) error {
|
func (c *ChromiumLocalStorage) Parse(masterKey []byte) error {
|
||||||
db, err := leveldb.OpenFile(item.TempChromiumLocalStorage, nil)
|
db, err := leveldb.OpenFile(item.TempChromiumLocalStorage, nil)
|
||||||
@@ -42,11 +42,11 @@ func (c *ChromiumLocalStorage) Parse(masterKey []byte) error {
|
|||||||
value := iter.Value()
|
value := iter.Value()
|
||||||
s := new(storage)
|
s := new(storage)
|
||||||
s.fillKey(key)
|
s.fillKey(key)
|
||||||
// don't all value upper than 1kB
|
// don't all value upper than 2KB
|
||||||
if len(value) < maxLocalStorageLength {
|
if len(value) < maxLocalStorageValueLength {
|
||||||
s.fillValue(value)
|
s.fillValue(value)
|
||||||
} else {
|
} else {
|
||||||
s.Value = fmt.Sprintf("value is too long, length is %d, supportted max length is %d", len(value), maxLocalStorageLength)
|
s.Value = fmt.Sprintf("value is too long, length is %d, supportted max length is %d", len(value), maxLocalStorageValueLength)
|
||||||
}
|
}
|
||||||
if s.IsMeta {
|
if s.IsMeta {
|
||||||
s.Value = fmt.Sprintf("meta data, value bytes is %v", value)
|
s.Value = fmt.Sprintf("meta data, value bytes is %v", value)
|
||||||
|
|||||||
Reference in New Issue
Block a user