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
var homeDir, _ = os.UserHomeDir()
//nolint:unused
const (
chromeName = "Chrome"
chromeBetaName = "Chrome Beta"
@ -126,4 +127,6 @@ const (
coccocName = "CocCoc"
yandexName = "Yandex"
firefoxName = "Firefox"
speed360Name = "360speed"
qqBrowserName = "QQ"
)

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

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

@ -4,9 +4,6 @@ func Chromium(key, encryptPass []byte) ([]byte, error) {
if len(encryptPass) < 3 {
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}
return aes128CBCDecrypt(key, chromeIV, encryptPass[3:])

Loading…
Cancel
Save