mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
add chrome password decrypt
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package utils
|
||||
|
||||
const (
|
||||
winChromeDir = "/Users/*/Library/Application Support/Google/Chrome/*/"
|
||||
)
|
||||
|
||||
func GetDBPath(dbName string) string {
|
||||
s, err := filepath.Glob(winChromeDir + dbName)
|
||||
if err != nil && len(s) == 0 {
|
||||
panic(err)
|
||||
}
|
||||
return s[0]
|
||||
}
|
||||
|
||||
func AesGCMDecrypt(crypted, key, nounce []byte) ([]byte, error) {
|
||||
block, err := aes.NewCipher(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
blockMode, _ := cipher.NewGCM(block)
|
||||
origData, err := blockMode.Open(nil, nounce, crypted, nil)
|
||||
if err != nil{
|
||||
return nil, err
|
||||
}
|
||||
return origData, nil
|
||||
}
|
||||
Reference in New Issue
Block a user