refactor: add nolint comment

pull/159/head
ᴍᴏᴏɴD4ʀᴋ 2 years ago
parent 63fc3a656a
commit 14fd71005a
  1. 3
      internal/browser/browser.go
  2. 5
      internal/browser/browser_windows.go
  3. 4
      internal/browser/chromium/chromium_linux.go
  4. 3
      internal/decrypter/decrypter_linux.go

@ -114,6 +114,7 @@ func ListBrowser() []string {
// home dir path for all platforms // home dir path for all platforms
var homeDir, _ = os.UserHomeDir() var homeDir, _ = os.UserHomeDir()
//nolint:unused
const ( const (
chromeName = "Chrome" chromeName = "Chrome"
chromeBetaName = "Chrome Beta" chromeBetaName = "Chrome Beta"
@ -126,4 +127,6 @@ const (
coccocName = "CocCoc" coccocName = "CocCoc"
yandexName = "Yandex" yandexName = "Yandex"
firefoxName = "Firefox" firefoxName = "Firefox"
speed360Name = "360speed"
qqBrowserName = "QQ"
) )

@ -6,11 +6,6 @@ import (
"hack-browser-data/internal/item" "hack-browser-data/internal/item"
) )
const (
speed360Name = "360speed"
qqBrowserName = "QQ"
)
var ( var (
chromiumList = map[string]struct { chromiumList = map[string]struct {
name string name string

@ -32,7 +32,9 @@ func (c *chromium) GetMasterKey() ([]byte, error) {
return nil, err return nil, err
} }
defer func() { defer func() {
session.Close() if err := session.Close(); err != nil {
log.Errorf("close session failed: %v", err)
}
}() }()
collections, err := svc.GetAllCollections() collections, err := svc.GetAllCollections()
if err != nil { if err != nil {

@ -4,9 +4,6 @@ func Chromium(key, encryptPass []byte) ([]byte, error) {
if len(encryptPass) < 3 { if len(encryptPass) < 3 {
return nil, errPasswordIsEmpty return nil, errPasswordIsEmpty
} }
if len(key) == 0 {
return nil, errSecurityKeyIsEmpty
}
chromeIV := []byte{32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32} chromeIV := []byte{32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}
return aes128CBCDecrypt(key, chromeIV, encryptPass[3:]) return aes128CBCDecrypt(key, chromeIV, encryptPass[3:])

Loading…
Cancel
Save