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,39 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"hack-browser-data/log"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
const (
|
||||
LoginData = "Login Data"
|
||||
History = "History"
|
||||
Cookies = "Cookies"
|
||||
WebData = "Web Data"
|
||||
)
|
||||
|
||||
func CopyDB(source, dest string) error {
|
||||
// remove current path db file first
|
||||
locals, _ := filepath.Glob("*")
|
||||
for _, v := range locals {
|
||||
if v == dest {
|
||||
err := os.Remove(dest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
sourceFile, err := ioutil.ReadFile(source)
|
||||
if err != nil {
|
||||
log.Println(err.Error())
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(dest, sourceFile, 644)
|
||||
if err != nil {
|
||||
log.Println(err.Error())
|
||||
}
|
||||
err = os.Chmod(dest, 0777)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user