Merge pull request #220 from moonD4rk/dev

feat: support Arc Browser for macOS
pull/224/head
ᴍᴏᴏɴD4ʀᴋ 1 year ago committed by GitHub
commit 3eaa2dd2bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      .golangci.yml
  2. 3
      README.md
  3. 37
      README_ZH.md
  4. 8
      browingdata/bookmark/bookmark.go
  5. 24
      browingdata/browsingdata.go
  6. 8
      browingdata/cookie/cookie.go
  7. 6
      browingdata/creditcard/creditcard.go
  8. 6
      browingdata/download/download.go
  9. 6
      browingdata/extension/extension.go
  10. 6
      browingdata/history/history.go
  11. 8
      browingdata/localstorage/localstorage.go
  12. 8
      browingdata/password/password.go
  13. 8
      browingdata/sessionstorage/sessionstorage.go
  14. 12
      browser/browser.go
  15. 10
      browser/browser_darwin.go
  16. 2
      browser/browser_linux.go
  17. 2
      browser/browser_windows.go
  18. 8
      browser/chromium/chromium.go
  19. 4
      browser/chromium/chromium_darwin.go
  20. 4
      browser/chromium/chromium_linux.go
  21. 8
      browser/chromium/chromium_windows.go
  22. 1
      browser/consts.go
  23. 8
      browser/firefox/firefox.go
  24. 6
      cmd/hack-browser-data/main.go
  25. 2
      go.mod

@ -65,3 +65,13 @@ issues:
- 'unused'
max-issues-per-linter: 0
max-same-issues: 0
linters-settings:
depguard:
rules:
main:
files:
- $all
deny:
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package

@ -53,12 +53,13 @@ Based on Apple's security policy, some browsers **require a current user passwor
| OperaGX | ✅ | ✅ | ✅ | ✅ |
| Vivaldi | ✅ | ✅ | ✅ | ✅ |
| CocCoc | ✅ | ✅ | ✅ | ✅ |
| Yandex | ✅ | ✅ | ✅ | ✅ |
| Arc | ✅ | ✅ | ✅ | ✅ |
| Firefox | ✅ | ✅ | ✅ | ✅ |
| Firefox Beta | ✅ | ✅ | ✅ | ✅ |
| Firefox Dev | ✅ | ✅ | ✅ | ✅ |
| Firefox ESR | ✅ | ✅ | ✅ | ✅ |
| Firefox Nightly | ✅ | ✅ | ✅ | ✅ |
| Yandex | ✅ | ✅ | ✅ | ✅ |
| Safari | ❌ | ❌ | ❌ | ❌ |
### Linux

@ -39,24 +39,25 @@
由于 MacOS 的安全性设置,基于 `Chromium` 内核浏览器解密时**需要当前用户密码**
| 浏览器 | 密码 | Cookie | 书签 | 历史记录 |
|:-------------------|:---:|:------:|:---:|:----:|
| Google Chrome | ✅ | ✅ | ✅ | ✅ |
| Google Chrome Beta | ✅ | ✅ | ✅ | ✅ |
| Chromium | ✅ | ✅ | ✅ | ✅ |
| Microsoft Edge | ✅ | ✅ | ✅ | ✅ |
| Brave | ✅ | ✅ | ✅ | ✅ |
| Opera | ✅ | ✅ | ✅ | ✅ |
| OperaGX | ✅ | ✅ | ✅ | ✅ |
| Vivaldi | ✅ | ✅ | ✅ | ✅ |
| Yandex | ✅ | ✅ | ✅ | ✅ |
| CocCoc | ✅ | ✅ | ✅ | ✅ |
| Firefox | ✅ | ✅ | ✅ | ✅ |
| Firefox Beta | ✅ | ✅ | ✅ | ✅ |
| Firefox Dev | ✅ | ✅ | ✅ | ✅ |
| Firefox ESR | ✅ | ✅ | ✅ | ✅ |
| Firefox Nightly | ✅ | ✅ | ✅ | ✅ |
| Safari | ❌ | ❌ | ❌ | ❌ |
| 浏览器 | 密码 | Cookie | 书签 | 历史记录 |
|:-------------------|:--:|:------:|:--:|:----:|
| Google Chrome | ✅ | ✅ | ✅ | ✅ |
| Google Chrome Beta | ✅ | ✅ | ✅ | ✅ |
| Chromium | ✅ | ✅ | ✅ | ✅ |
| Microsoft Edge | ✅ | ✅ | ✅ | ✅ |
| Brave | ✅ | ✅ | ✅ | ✅ |
| Opera | ✅ | ✅ | ✅ | ✅ |
| OperaGX | ✅ | ✅ | ✅ | ✅ |
| Vivaldi | ✅ | ✅ | ✅ | ✅ |
| CocCoc | ✅ | ✅ | ✅ | ✅ |
| Yandex | ✅ | ✅ | ✅ | ✅ |
| Arc | ✅ | ✅ | ✅ | ✅ |
| Firefox | ✅ | ✅ | ✅ | ✅ |
| Firefox Beta | ✅ | ✅ | ✅ | ✅ |
| Firefox Dev | ✅ | ✅ | ✅ | ✅ |
| Firefox ESR | ✅ | ✅ | ✅ | ✅ |
| Firefox Nightly | ✅ | ✅ | ✅ | ✅ |
| Safari | ❌ | ❌ | ❌ | ❌ |
### Linux

@ -10,10 +10,10 @@ import (
_ "github.com/mattn/go-sqlite3"
"github.com/tidwall/gjson"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/fileutil"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type ChromiumBookmark []bookmark

@ -3,18 +3,18 @@ package browingdata
import (
"path"
"github.com/moond4rk/HackBrowserData/browingdata/bookmark"
"github.com/moond4rk/HackBrowserData/browingdata/cookie"
"github.com/moond4rk/HackBrowserData/browingdata/creditcard"
"github.com/moond4rk/HackBrowserData/browingdata/download"
"github.com/moond4rk/HackBrowserData/browingdata/extension"
"github.com/moond4rk/HackBrowserData/browingdata/history"
"github.com/moond4rk/HackBrowserData/browingdata/localstorage"
"github.com/moond4rk/HackBrowserData/browingdata/password"
"github.com/moond4rk/HackBrowserData/browingdata/sessionstorage"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/fileutil"
"github.com/moond4rk/hackbrowserdata/browingdata/bookmark"
"github.com/moond4rk/hackbrowserdata/browingdata/cookie"
"github.com/moond4rk/hackbrowserdata/browingdata/creditcard"
"github.com/moond4rk/hackbrowserdata/browingdata/download"
"github.com/moond4rk/hackbrowserdata/browingdata/extension"
"github.com/moond4rk/hackbrowserdata/browingdata/history"
"github.com/moond4rk/hackbrowserdata/browingdata/localstorage"
"github.com/moond4rk/hackbrowserdata/browingdata/password"
"github.com/moond4rk/hackbrowserdata/browingdata/sessionstorage"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
)
type Data struct {

@ -9,10 +9,10 @@ import (
// import sqlite3 driver
_ "github.com/mattn/go-sqlite3"
"github.com/moond4rk/HackBrowserData/crypto"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/crypto"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type ChromiumCookie []cookie

@ -7,9 +7,9 @@ import (
// import sqlite3 driver
_ "github.com/mattn/go-sqlite3"
"github.com/moond4rk/HackBrowserData/crypto"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/hackbrowserdata/crypto"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
)
type ChromiumCreditCard []card

@ -11,9 +11,9 @@ import (
_ "github.com/mattn/go-sqlite3"
"github.com/tidwall/gjson"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type ChromiumDownload []download

@ -5,9 +5,9 @@ import (
"github.com/tidwall/gjson"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/fileutil"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
)
type ChromiumExtension []*extension

@ -9,9 +9,9 @@ import (
// import sqlite3 driver
_ "github.com/mattn/go-sqlite3"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type ChromiumHistory []history

@ -11,10 +11,10 @@ import (
"golang.org/x/text/encoding/unicode"
"golang.org/x/text/transform"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/byteutil"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/byteutil"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type ChromiumLocalStorage []storage

@ -12,10 +12,10 @@ import (
_ "github.com/mattn/go-sqlite3"
"github.com/tidwall/gjson"
"github.com/moond4rk/HackBrowserData/crypto"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/crypto"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type ChromiumPassword []loginData

@ -11,10 +11,10 @@ import (
"golang.org/x/text/encoding/unicode"
"golang.org/x/text/transform"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/byteutil"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/byteutil"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type ChromiumSessionStorage []session

@ -5,12 +5,12 @@ import (
"sort"
"strings"
"github.com/moond4rk/HackBrowserData/browingdata"
"github.com/moond4rk/HackBrowserData/browser/chromium"
"github.com/moond4rk/HackBrowserData/browser/firefox"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/fileutil"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/browingdata"
"github.com/moond4rk/hackbrowserdata/browser/chromium"
"github.com/moond4rk/hackbrowserdata/browser/firefox"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type Browser interface {

@ -3,7 +3,7 @@
package browser
import (
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/hackbrowserdata/item"
)
var (
@ -73,6 +73,12 @@ var (
profilePath: yandexProfilePath,
items: item.DefaultYandex,
},
"arc": {
name: arcName,
profilePath: arcProfilePath,
storage: arcStorageName,
items: item.DefaultChromium,
},
}
firefoxList = map[string]struct {
name string
@ -99,6 +105,7 @@ var (
vivaldiProfilePath = homeDir + "/Library/Application Support/Vivaldi/Default/"
coccocProfilePath = homeDir + "/Library/Application Support/Coccoc/Default/"
yandexProfilePath = homeDir + "/Library/Application Support/Yandex/YandexBrowser/Default/"
arcProfilePath = homeDir + "/Library/Application Support/Arc/User Data/Default"
firefoxProfilePath = homeDir + "/Library/Application Support/Firefox/Profiles/"
)
@ -113,4 +120,5 @@ const (
vivaldiStorageName = "Vivaldi"
coccocStorageName = "CocCoc"
yandexStorageName = "Yandex"
arcStorageName = "Arc"
)

@ -3,7 +3,7 @@
package browser
import (
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/hackbrowserdata/item"
)
var (

@ -3,7 +3,7 @@
package browser
import (
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/hackbrowserdata/item"
)
var (

@ -5,10 +5,10 @@ import (
"path/filepath"
"strings"
"github.com/moond4rk/HackBrowserData/browingdata"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/utils/fileutil"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/browingdata"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type Chromium struct {

@ -13,8 +13,8 @@ import (
"golang.org/x/crypto/pbkdf2"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
)
var (

@ -11,8 +11,8 @@ import (
keyring "github.com/ppacher/go-dbus-keyring"
"golang.org/x/crypto/pbkdf2"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
)
func (c *Chromium) GetMasterKey() ([]byte, error) {

@ -9,10 +9,10 @@ import (
"github.com/tidwall/gjson"
"github.com/moond4rk/HackBrowserData/crypto"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/fileutil"
"github.com/moond4rk/hackbrowserdata/crypto"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
)
var errDecodeMasterKeyFailed = errors.New("decode master key failed")

@ -23,4 +23,5 @@ const (
qqBrowserName = "QQ"
dcBrowserName = "DC"
sogouName = "Sogou"
arcName = "Arc"
)

@ -6,10 +6,10 @@ import (
"io/fs"
"path/filepath"
"github.com/moond4rk/HackBrowserData/browingdata"
"github.com/moond4rk/HackBrowserData/item"
"github.com/moond4rk/HackBrowserData/utils/fileutil"
"github.com/moond4rk/HackBrowserData/utils/typeutil"
"github.com/moond4rk/hackbrowserdata/browingdata"
"github.com/moond4rk/hackbrowserdata/item"
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
)
type Firefox struct {

@ -5,9 +5,9 @@ import (
"github.com/urfave/cli/v2"
"github.com/moond4rk/HackBrowserData/browser"
"github.com/moond4rk/HackBrowserData/log"
"github.com/moond4rk/HackBrowserData/utils/fileutil"
"github.com/moond4rk/hackbrowserdata/browser"
"github.com/moond4rk/hackbrowserdata/log"
"github.com/moond4rk/hackbrowserdata/utils/fileutil"
)
var (

@ -1,4 +1,4 @@
module github.com/moond4rk/HackBrowserData
module github.com/moond4rk/hackbrowserdata
go 1.20

Loading…
Cancel
Save