mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-23 19:14:01 +02:00
refactor: only handle error if security command not found
This commit is contained in:
@@ -14,10 +14,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
errSecurityKeyIsEmpty = errors.New("input [security find-generic-password -wa 'Chrome'] in terminal")
|
errPasswordIsEmpty = errors.New("password is empty")
|
||||||
errPasswordIsEmpty = errors.New("password is empty")
|
errDecodeASN1Failed = errors.New("decode ASN1 data failed")
|
||||||
errDecodeASN1Failed = errors.New("decode ASN1 data failed")
|
errEncryptedLength = errors.New("length of encrypted password less than block size")
|
||||||
errEncryptedLength = errors.New("length of encrypted password less than block size")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ASN1PBE interface {
|
type ASN1PBE interface {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package decrypter
|
package decrypter
|
||||||
|
|
||||||
|
var (
|
||||||
|
errSecurityKeyIsEmpty = errors.New("input [security find-generic-password -wa 'Chrome'] in terminal")
|
||||||
|
)
|
||||||
|
|
||||||
func Chromium(key, encryptPass []byte) ([]byte, error) {
|
func Chromium(key, encryptPass []byte) ([]byte, error) {
|
||||||
if len(encryptPass) <= 3 {
|
if len(encryptPass) <= 3 {
|
||||||
return nil, errPasswordIsEmpty
|
return nil, errPasswordIsEmpty
|
||||||
|
|||||||
Reference in New Issue
Block a user