mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-08 21:37:49 +02:00
fix: Improve error handling in browsing data and file copying functions
- Improve error handling in browsingdata.go Recovery function - Add logging for file copy errors in chromium.go - Modify copyItemToLocal function to continue copying files on error
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/moond4rk/hackbrowserdata/browsingdata"
|
"github.com/moond4rk/hackbrowserdata/browsingdata"
|
||||||
"github.com/moond4rk/hackbrowserdata/item"
|
"github.com/moond4rk/hackbrowserdata/item"
|
||||||
|
"github.com/moond4rk/hackbrowserdata/log"
|
||||||
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
|
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
|
||||||
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
|
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
|
||||||
)
|
)
|
||||||
@@ -89,7 +90,8 @@ func (c *Chromium) copyItemToLocal() error {
|
|||||||
err = fileutil.CopyFile(path, filename)
|
err = fileutil.CopyFile(path, filename)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
log.Errorf("copy %s to %s error: %v", path, filename, err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ func (d *Data) Recovery(masterKey []byte) error {
|
|||||||
for _, source := range d.sources {
|
for _, source := range d.sources {
|
||||||
if err := source.Parse(masterKey); err != nil {
|
if err := source.Parse(masterKey); err != nil {
|
||||||
log.Errorf("parse %s error %s", source.Name(), err.Error())
|
log.Errorf("parse %s error %s", source.Name(), err.Error())
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user