2022-04-11 11:57:40 +00:00
|
|
|
//go:build linux
|
|
|
|
|
2023-03-10 06:52:26 +00:00
|
|
|
package browser
|
2022-04-13 07:30:30 +00:00
|
|
|
|
|
|
|
import (
|
2024-04-12 11:10:41 +00:00
|
|
|
"github.com/moond4rk/hackbrowserdata/types"
|
2022-04-13 07:30:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
chromiumList = map[string]struct {
|
|
|
|
name string
|
|
|
|
storage string
|
|
|
|
profilePath string
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes []types.DataType
|
2022-04-13 07:30:30 +00:00
|
|
|
}{
|
|
|
|
"chrome": {
|
|
|
|
name: chromeName,
|
|
|
|
storage: chromeStorageName,
|
|
|
|
profilePath: chromeProfilePath,
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes: types.DefaultChromiumTypes,
|
2022-04-13 07:30:30 +00:00
|
|
|
},
|
|
|
|
"edge": {
|
|
|
|
name: edgeName,
|
|
|
|
storage: edgeStorageName,
|
|
|
|
profilePath: edgeProfilePath,
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes: types.DefaultChromiumTypes,
|
2022-04-13 07:30:30 +00:00
|
|
|
},
|
|
|
|
"chromium": {
|
|
|
|
name: chromiumName,
|
|
|
|
storage: chromiumStorageName,
|
|
|
|
profilePath: chromiumProfilePath,
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes: types.DefaultChromiumTypes,
|
2022-04-13 07:30:30 +00:00
|
|
|
},
|
|
|
|
"chrome-beta": {
|
|
|
|
name: chromeBetaName,
|
|
|
|
storage: chromeBetaStorageName,
|
|
|
|
profilePath: chromeBetaProfilePath,
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes: types.DefaultChromiumTypes,
|
2022-04-13 07:30:30 +00:00
|
|
|
},
|
|
|
|
"opera": {
|
|
|
|
name: operaName,
|
|
|
|
profilePath: operaProfilePath,
|
|
|
|
storage: operaStorageName,
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes: types.DefaultChromiumTypes,
|
2022-04-13 07:30:30 +00:00
|
|
|
},
|
|
|
|
"vivaldi": {
|
|
|
|
name: vivaldiName,
|
|
|
|
storage: vivaldiStorageName,
|
|
|
|
profilePath: vivaldiProfilePath,
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes: types.DefaultChromiumTypes,
|
2022-04-13 07:30:30 +00:00
|
|
|
},
|
|
|
|
"brave": {
|
|
|
|
name: braveName,
|
|
|
|
profilePath: braveProfilePath,
|
|
|
|
storage: braveStorageName,
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes: types.DefaultChromiumTypes,
|
2022-04-13 07:30:30 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
firefoxList = map[string]struct {
|
|
|
|
name string
|
|
|
|
storage string
|
|
|
|
profilePath string
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes []types.DataType
|
2022-04-13 07:30:30 +00:00
|
|
|
}{
|
|
|
|
"firefox": {
|
|
|
|
name: firefoxName,
|
|
|
|
profilePath: firefoxProfilePath,
|
2024-04-12 11:10:41 +00:00
|
|
|
dataTypes: types.DefaultFirefoxTypes,
|
2022-04-13 07:30:30 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2022-04-14 06:53:16 +00:00
|
|
|
firefoxProfilePath = homeDir + "/.mozilla/firefox/"
|
2022-04-14 15:36:11 +00:00
|
|
|
chromeProfilePath = homeDir + "/.config/google-chrome/Default/"
|
|
|
|
chromiumProfilePath = homeDir + "/.config/chromium/Default/"
|
2022-04-17 08:35:40 +00:00
|
|
|
edgeProfilePath = homeDir + "/.config/microsoft-edge/Default/"
|
2022-04-14 15:36:11 +00:00
|
|
|
braveProfilePath = homeDir + "/.config/BraveSoftware/Brave-Browser/Default/"
|
|
|
|
chromeBetaProfilePath = homeDir + "/.config/google-chrome-beta/Default/"
|
|
|
|
operaProfilePath = homeDir + "/.config/opera/Default/"
|
|
|
|
vivaldiProfilePath = homeDir + "/.config/vivaldi/Default/"
|
2022-04-13 07:30:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
chromeStorageName = "Chrome Safe Storage"
|
|
|
|
chromiumStorageName = "Chromium Safe Storage"
|
|
|
|
edgeStorageName = "Chromium Safe Storage"
|
|
|
|
braveStorageName = "Brave Safe Storage"
|
|
|
|
chromeBetaStorageName = "Chrome Safe Storage"
|
|
|
|
operaStorageName = "Chromium Safe Storage"
|
|
|
|
vivaldiStorageName = "Chrome Safe Storage"
|
|
|
|
)
|