mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-08 21:37:49 +02:00
feat: add doc for interface function. Close #23
This commit is contained in:
@@ -18,9 +18,16 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Browser interface {
|
type Browser interface {
|
||||||
|
// InitSecretKey is init chrome secret key, firefox's key always empty
|
||||||
InitSecretKey() error
|
InitSecretKey() error
|
||||||
|
|
||||||
|
// GetName return browser name
|
||||||
GetName() string
|
GetName() string
|
||||||
|
|
||||||
|
// GetSecretKey return browser secret key
|
||||||
GetSecretKey() []byte
|
GetSecretKey() []byte
|
||||||
|
|
||||||
|
// GetAllItems, default return all of items(password|bookmark|cookie|history)
|
||||||
GetAllItems(itemName string) ([]common.Item, error)
|
GetAllItems(itemName string) ([]common.Item, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,19 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Item interface {
|
type Item interface {
|
||||||
|
// ChromeParse parse chrome items, Password and Cookie need secret key
|
||||||
ChromeParse(key []byte) error
|
ChromeParse(key []byte) error
|
||||||
|
|
||||||
|
// FirefoxParse parse firefox items
|
||||||
FirefoxParse() error
|
FirefoxParse() error
|
||||||
|
|
||||||
|
// OutPut with json or csv
|
||||||
OutPut(format, browser, dir string) error
|
OutPut(format, browser, dir string) error
|
||||||
|
|
||||||
|
// Copy item file to local path
|
||||||
CopyItem() error
|
CopyItem() error
|
||||||
|
|
||||||
|
// Release item file
|
||||||
Release() error
|
Release() error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ func decryptPBE(globalSalt, masterPwd, entrySalt, encrypted []byte) ([]byte, err
|
|||||||
//byte[] k1;
|
//byte[] k1;
|
||||||
//byte[] tk;
|
//byte[] tk;
|
||||||
//byte[] k2;
|
//byte[] k2;
|
||||||
//byte[] k; // final value conytaining key and iv
|
//byte[] k; // final value containing key and iv
|
||||||
glmp := append(globalSalt, masterPwd...)
|
glmp := append(globalSalt, masterPwd...)
|
||||||
hp := sha1.Sum(glmp)
|
hp := sha1.Sum(glmp)
|
||||||
s := append(hp[:], entrySalt...)
|
s := append(hp[:], entrySalt...)
|
||||||
|
|||||||
Reference in New Issue
Block a user