diff --git a/browingdata/password/password.go b/browingdata/password/password.go index 48184d0..e4541ce 100644 --- a/browingdata/password/password.go +++ b/browingdata/password/password.go @@ -169,7 +169,7 @@ const ( queryNssPrivate = `SELECT a11, a102 from nssPrivate` ) -func (f *FirefoxPassword) Parse(masterKey []byte) error { +func (f *FirefoxPassword) Parse(_ []byte) error { globalSalt, metaBytes, nssA11, nssA102, err := getFirefoxDecryptKey(item.TempFirefoxKey4) if err != nil { return err diff --git a/crypto/crypto.go b/crypto/crypto.go index f0bfbc2..eb2e325 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -32,22 +32,22 @@ func NewASN1PBE(b []byte) (pbe ASN1PBE, err error) { l loginPBE errs []string ) - if _, err := asn1.Unmarshal(b, &n); err == nil { + if _, err = asn1.Unmarshal(b, &n); err == nil { return n, nil - } else { - errs = append(errs, err.Error()) } - if _, err := asn1.Unmarshal(b, &m); err == nil { + errs = append(errs, err.Error()) + + if _, err = asn1.Unmarshal(b, &m); err == nil { return m, nil - } else { - errs = append(errs, err.Error()) } - if _, err := asn1.Unmarshal(b, &l); err == nil { + errs = append(errs, err.Error()) + + if _, err = asn1.Unmarshal(b, &l); err == nil { return l, nil - } else { - errs = append(errs, err.Error()) } - return nil, fmt.Errorf("%w: %s", err, strings.Join(errs, "; ")) + errs = append(errs, err.Error()) + + return nil, fmt.Errorf("%w: %s", errDecodeASN1Failed, strings.Join(errs, "; ")) } // nssPBE Struct diff --git a/firefox.go b/firefox.go index 7e429db..c59a54e 100644 --- a/firefox.go +++ b/firefox.go @@ -9,6 +9,7 @@ import ( "path/filepath" "strings" + // import sqlite3 driver _ "github.com/mattn/go-sqlite3" "github.com/moond4rk/hackbrowserdata/crypto"