mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
dev: Remove CGO go-sqlite3 with pure go driver (#292)
* chore: Resize logo and update browser support in READMEs (#284) * chore: Resize logo and update browser support in READMEs * docs: Update Coverage Status badge URL * chore: add typos check linter in github actions (#285) * refactor: Disable JSON handling in logger/logger.go. * chore: Standardize spelling and add typos check workflows. * refactor: Update SQLite driver import for browsing data package. * refactor: Refactor browsing data package to use SQLite driver instead of SQLite3. * docs: Add contribution guidelines to README file (#289) * chore: Refactor file and directory names for improved organization and consistency
This commit is contained in:
@@ -7,9 +7,8 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
// import sqlite3 driver
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/tidwall/gjson"
|
||||
_ "modernc.org/sqlite" // import sqlite3 driver
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/item"
|
||||
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
|
||||
@@ -94,7 +93,7 @@ const (
|
||||
)
|
||||
|
||||
func (f *FirefoxBookmark) Parse(_ []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.FirefoxBookmark.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.FirefoxBookmark.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
// import sqlite3 driver
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
_ "modernc.org/sqlite"
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/crypto"
|
||||
"github.com/moond4rk/hackbrowserdata/item"
|
||||
@@ -36,7 +36,7 @@ const (
|
||||
)
|
||||
|
||||
func (c *ChromiumCookie) Parse(masterKey []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.ChromiumCookie.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.ChromiumCookie.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -104,7 +104,7 @@ const (
|
||||
)
|
||||
|
||||
func (f *FirefoxCookie) Parse(_ []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.FirefoxCookie.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.FirefoxCookie.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
|
||||
// import sqlite3 driver
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
_ "modernc.org/sqlite"
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/crypto"
|
||||
"github.com/moond4rk/hackbrowserdata/item"
|
||||
@@ -29,7 +29,7 @@ const (
|
||||
)
|
||||
|
||||
func (c *ChromiumCreditCard) Parse(masterKey []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.ChromiumCreditCard.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.ChromiumCreditCard.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -85,7 +85,7 @@ func (c *ChromiumCreditCard) Len() int {
|
||||
type YandexCreditCard []card
|
||||
|
||||
func (c *YandexCreditCard) Parse(masterKey []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.YandexCreditCard.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.YandexCreditCard.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
// import sqlite3 driver
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/tidwall/gjson"
|
||||
_ "modernc.org/sqlite" // import sqlite3 driver
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/item"
|
||||
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
|
||||
@@ -32,7 +31,7 @@ const (
|
||||
)
|
||||
|
||||
func (c *ChromiumDownload) Parse(_ []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.ChromiumDownload.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.ChromiumDownload.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -83,7 +82,7 @@ const (
|
||||
)
|
||||
|
||||
func (f *FirefoxDownload) Parse(_ []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.FirefoxDownload.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.FirefoxDownload.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
// import sqlite3 driver
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
_ "modernc.org/sqlite"
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/item"
|
||||
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
|
||||
@@ -28,7 +28,7 @@ const (
|
||||
)
|
||||
|
||||
func (c *ChromiumHistory) Parse(_ []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.ChromiumHistory.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.ChromiumHistory.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -79,7 +79,7 @@ const (
|
||||
)
|
||||
|
||||
func (f *FirefoxHistory) Parse(_ []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.FirefoxHistory.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.FirefoxHistory.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ const (
|
||||
)
|
||||
|
||||
func (f *FirefoxLocalStorage) Parse(_ []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.FirefoxLocalStorage.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.FirefoxLocalStorage.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -9,9 +9,8 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
// import sqlite3 driver
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/tidwall/gjson"
|
||||
_ "modernc.org/sqlite" // import sqlite3 driver
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/crypto"
|
||||
"github.com/moond4rk/hackbrowserdata/item"
|
||||
@@ -34,7 +33,7 @@ const (
|
||||
)
|
||||
|
||||
func (c *ChromiumPassword) Parse(masterKey []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.ChromiumPassword.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.ChromiumPassword.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -101,7 +100,7 @@ const (
|
||||
)
|
||||
|
||||
func (c *YandexPassword) Parse(masterKey []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.YandexPassword.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.YandexPassword.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -234,7 +233,7 @@ func (f *FirefoxPassword) Parse(masterKey []byte) error {
|
||||
}
|
||||
|
||||
func getFirefoxDecryptKey(key4file string) (item1, item2, a11, a102 []byte, err error) {
|
||||
keyDB, err := sql.Open("sqlite3", key4file)
|
||||
keyDB, err := sql.Open("sqlite", key4file)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, err
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ const (
|
||||
)
|
||||
|
||||
func (f *FirefoxSessionStorage) Parse(_ []byte) error {
|
||||
db, err := sql.Open("sqlite3", item.FirefoxSessionStorage.TempFilename())
|
||||
db, err := sql.Open("sqlite", item.FirefoxSessionStorage.TempFilename())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user