mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-08 21:37:49 +02:00
support chrome beta
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ func Execute() {
|
|||||||
Name: "hack-browser-data",
|
Name: "hack-browser-data",
|
||||||
Usage: "Export passwords/cookies/history/bookmarks from browser",
|
Usage: "Export passwords/cookies/history/bookmarks from browser",
|
||||||
UsageText: "[hack-browser-data -b chrome -f json -dir results -cc]\n Get all data(password/cookie/history/bookmark) from chrome",
|
UsageText: "[hack-browser-data -b chrome -f json -dir results -cc]\n Get all data(password/cookie/history/bookmark) from chrome",
|
||||||
Version: "0.2.7",
|
Version: "0.2.8",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.BoolFlag{Name: "verbose", Aliases: []string{"vv"}, Destination: &verbose, Value: false, Usage: "Verbose"},
|
&cli.BoolFlag{Name: "verbose", Aliases: []string{"vv"}, Destination: &verbose, Value: false, Usage: "Verbose"},
|
||||||
&cli.BoolFlag{Name: "compress", Aliases: []string{"cc"}, Destination: &compress, Value: false, Usage: "Compress result to zip"},
|
&cli.BoolFlag{Name: "compress", Aliases: []string{"cc"}, Destination: &compress, Value: false, Usage: "Compress result to zip"},
|
||||||
|
|||||||
+1
-1
@@ -102,7 +102,7 @@ type Chromium struct {
|
|||||||
name string
|
name string
|
||||||
profilePath string
|
profilePath string
|
||||||
keyPath string
|
keyPath string
|
||||||
storage string // use for linux browser
|
storage string // storage use for linux and macOS, get secret key
|
||||||
secretKey []byte
|
secretKey []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+22
-5
@@ -10,10 +10,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
chromeProfilePath = "/Users/*/Library/Application Support/Google/Chrome/*/"
|
chromeProfilePath = "/Users/*/Library/Application Support/Google/Chrome/*/"
|
||||||
edgeProfilePath = "/Users/*/Library/Application Support/Microsoft Edge/*/"
|
chromeBetaProfilePath = "/Users/*/Library/Application Support/Google/Chrome Beta/*/"
|
||||||
fireFoxProfilePath = "/Users/*/Library/Application Support/Firefox/Profiles/*.default-release/"
|
edgeProfilePath = "/Users/*/Library/Application Support/Microsoft Edge/*/"
|
||||||
braveProfilePath = "/Users/*/Library/Application Support/BraveSoftware/Brave-Browser/*/"
|
fireFoxProfilePath = "/Users/*/Library/Application Support/Firefox/Profiles/*.default-release/"
|
||||||
|
braveProfilePath = "/Users/*/Library/Application Support/BraveSoftware/Brave-Browser/*/"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
chromeStorageName = "Chrome"
|
||||||
|
chromeBetaStorageName = "Chrome"
|
||||||
|
edgeStorageName = "Microsoft Edge"
|
||||||
|
braveStorageName = "Brave"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -32,16 +40,25 @@ var (
|
|||||||
"chrome": {
|
"chrome": {
|
||||||
ProfilePath: chromeProfilePath,
|
ProfilePath: chromeProfilePath,
|
||||||
Name: chromeName,
|
Name: chromeName,
|
||||||
|
Storage: chromeStorageName,
|
||||||
New: NewChromium,
|
New: NewChromium,
|
||||||
},
|
},
|
||||||
"edge": {
|
"edge": {
|
||||||
ProfilePath: edgeProfilePath,
|
ProfilePath: edgeProfilePath,
|
||||||
Name: edgeName,
|
Name: edgeName,
|
||||||
|
Storage: edgeStorageName,
|
||||||
New: NewChromium,
|
New: NewChromium,
|
||||||
},
|
},
|
||||||
"brave": {
|
"brave": {
|
||||||
ProfilePath: braveProfilePath,
|
ProfilePath: braveProfilePath,
|
||||||
Name: braveName,
|
Name: braveName,
|
||||||
|
Storage: braveStorageName,
|
||||||
|
New: NewChromium,
|
||||||
|
},
|
||||||
|
"chrome-beta": {
|
||||||
|
ProfilePath: chromeBetaProfilePath,
|
||||||
|
Name: chromeBetaName,
|
||||||
|
Storage: chromeBetaStorageName,
|
||||||
New: NewChromium,
|
New: NewChromium,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -53,7 +70,7 @@ func (c *Chromium) InitSecretKey() error {
|
|||||||
stdout, stderr bytes.Buffer
|
stdout, stderr bytes.Buffer
|
||||||
)
|
)
|
||||||
// ➜ security find-generic-password -wa 'Chrome'
|
// ➜ security find-generic-password -wa 'Chrome'
|
||||||
cmd = exec.Command("security", "find-generic-password", "-wa", c.name)
|
cmd = exec.Command("security", "find-generic-password", "-wa", c.storage)
|
||||||
cmd.Stdout = &stdout
|
cmd.Stdout = &stdout
|
||||||
cmd.Stderr = &stderr
|
cmd.Stderr = &stderr
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
|
|||||||
+15
-7
@@ -11,16 +11,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
fireFoxProfilePath = "/home/*/.mozilla/firefox/*.default-release/"
|
fireFoxProfilePath = "/home/*/.mozilla/firefox/*.default-release/"
|
||||||
chromeProfilePath = "/home/*/.config/google-chrome/*/"
|
chromeProfilePath = "/home/*/.config/google-chrome/*/"
|
||||||
edgeProfilePath = "/home/*/.config/microsoft-edge*/*/"
|
edgeProfilePath = "/home/*/.config/microsoft-edge*/*/"
|
||||||
braveProfilePath = "/home/*/.config/BraveSoftware/Brave-Browser/*/"
|
braveProfilePath = "/home/*/.config/BraveSoftware/Brave-Browser/*/"
|
||||||
|
chromeBateProfilePath = "/home/*/.config/google-chrome-beta/*/"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
chromeStorageName = "Chrome Safe Storage"
|
chromeStorageName = "Chrome Safe Storage"
|
||||||
edgeStorageName = "Chromium Safe Storage"
|
edgeStorageName = "Chromium Safe Storage"
|
||||||
braveStorageName = "Brave Safe Storage"
|
braveStorageName = "Brave Safe Storage"
|
||||||
|
chromeBetaStorageName = "Chrome Safe Storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -54,6 +56,12 @@ var (
|
|||||||
Storage: braveStorageName,
|
Storage: braveStorageName,
|
||||||
New: NewChromium,
|
New: NewChromium,
|
||||||
},
|
},
|
||||||
|
"chrome-beta": {
|
||||||
|
ProfilePath: chromeBateProfilePath,
|
||||||
|
Name: chromeBetaName,
|
||||||
|
Storage: chromeBetaStorageName,
|
||||||
|
New: NewChromium,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user