2022-04-11 11:57:40 +00:00
|
|
|
//go:build linux
|
|
|
|
|
2022-01-16 14:31:51 +00:00
|
|
|
package browser
|
2022-04-13 07:30:30 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"hack-browser-data/internal/item"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
chromiumList = map[string]struct {
|
|
|
|
name string
|
|
|
|
storage string
|
|
|
|
profilePath string
|
|
|
|
items []item.Item
|
|
|
|
}{
|
|
|
|
"chrome": {
|
|
|
|
name: chromeName,
|
|
|
|
storage: chromeStorageName,
|
|
|
|
profilePath: chromeProfilePath,
|
|
|
|
items: item.DefaultChromium,
|
|
|
|
},
|
|
|
|
"edge": {
|
|
|
|
name: edgeName,
|
|
|
|
storage: edgeStorageName,
|
|
|
|
profilePath: edgeProfilePath,
|
|
|
|
items: item.DefaultChromium,
|
|
|
|
},
|
|
|
|
"chromium": {
|
|
|
|
name: chromiumName,
|
|
|
|
storage: chromiumStorageName,
|
|
|
|
profilePath: chromiumProfilePath,
|
|
|
|
items: item.DefaultChromium,
|
|
|
|
},
|
|
|
|
"chrome-beta": {
|
|
|
|
name: chromeBetaName,
|
|
|
|
storage: chromeBetaStorageName,
|
|
|
|
profilePath: chromeBetaProfilePath,
|
|
|
|
items: item.DefaultChromium,
|
|
|
|
},
|
|
|
|
"opera": {
|
|
|
|
name: operaName,
|
|
|
|
profilePath: operaProfilePath,
|
|
|
|
storage: operaStorageName,
|
|
|
|
items: item.DefaultChromium,
|
|
|
|
},
|
|
|
|
"vivaldi": {
|
|
|
|
name: vivaldiName,
|
|
|
|
storage: vivaldiStorageName,
|
|
|
|
profilePath: vivaldiProfilePath,
|
|
|
|
items: item.DefaultChromium,
|
|
|
|
},
|
|
|
|
"brave": {
|
|
|
|
name: braveName,
|
|
|
|
profilePath: braveProfilePath,
|
|
|
|
storage: braveStorageName,
|
|
|
|
items: item.DefaultChromium,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
firefoxList = map[string]struct {
|
|
|
|
name string
|
|
|
|
storage string
|
|
|
|
profilePath string
|
|
|
|
items []item.Item
|
|
|
|
}{
|
|
|
|
"firefox": {
|
|
|
|
name: firefoxName,
|
|
|
|
profilePath: firefoxProfilePath,
|
|
|
|
items: item.DefaultFirefox,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
firefoxProfilePath = homeDir + "/.mozilla/firefox/*.default-release*/"
|
|
|
|
chromeProfilePath = homeDir + "/.config/google-chrome/*/"
|
|
|
|
chromiumProfilePath = homeDir + "/.config/chromium/*/"
|
|
|
|
edgeProfilePath = homeDir + "/.config/microsoft-edge*/*/"
|
|
|
|
braveProfilePath = homeDir + "/.config/BraveSoftware/Brave-Browser/*/"
|
|
|
|
chromeBetaProfilePath = homeDir + "/.config/google-chrome-beta/*/"
|
|
|
|
operaProfilePath = homeDir + "/.config/opera/"
|
|
|
|
vivaldiProfilePath = homeDir + "/.config/vivaldi/*/"
|
|
|
|
)
|
|
|
|
|
|
|
|
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"
|
|
|
|
)
|