refactor: Refactor storage queries and filters.

- Update local storage query constant and function calls
- Remove null and control characters from UTF-8 split function
This commit is contained in:
moonD4rk
2023-05-08 19:09:17 +08:00
parent 5376184c7e
commit 6c1f653b4f
3 changed files with 15 additions and 19 deletions
+3 -3
View File
@@ -101,8 +101,8 @@ func (s *storage) fillValue(b []byte) {
type FirefoxLocalStorage []storage
const (
queryFirefoxHistory = `SELECT originKey, key, value FROM webappsstore2`
closeJournalMode = `PRAGMA journal_mode=off`
queryLocalStorage = `SELECT originKey, key, value FROM webappsstore2`
closeJournalMode = `PRAGMA journal_mode=off`
)
func (f *FirefoxLocalStorage) Parse(_ []byte) error {
@@ -117,7 +117,7 @@ func (f *FirefoxLocalStorage) Parse(_ []byte) error {
if err != nil {
log.Error(err)
}
rows, err := db.Query(queryFirefoxHistory)
rows, err := db.Query(queryLocalStorage)
if err != nil {
return err
}