From b448aa223ea7d720000e93ff4ec120ab46c6f462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=8D=E1=B4=8F=E1=B4=8F=C9=B4D4=CA=80=E1=B4=8B?= Date: Sun, 28 Jun 2020 21:17:28 +0800 Subject: [PATCH] add qq browser --- .gitignore | 1 + README.md | 27 ++++++++++++++++++--------- utils/utils_darwin.go | 13 ++++++------- utils/utils_windows.go | 11 ++++++++--- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index ba76033..ef364b0 100644 --- a/.gitignore +++ b/.gitignore @@ -180,4 +180,5 @@ Login Data Cookies hack-browser-data History +*.db diff --git a/README.md b/README.md index 58f8271..c4ccc72 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,10 @@ go build ### 运行 -```bash +```shell ./hack-browser-data -h NAME: - hack-browser-data - export passwords/cookies/history/bookmarks from browser + hack-browser-data - Get passwords/cookies/history/bookmarks from browser USAGE: [hack-browser-data -b chrome -f json -dir results -e all] @@ -39,25 +39,32 @@ GLOBAL OPTIONS: ``` +```shell +✗ ./hack-browser-data -b chrome -f json -dir results -e all +[x]: Get 538 bookmarks, filename is results/bookmarks_chrome.json +[x]: Get 1415 cookies, filename is results/cookies_chrome.json +[x]: Get 34050 history, filename is results/history_chrome.json +[x]: Get 357 login data, filename is results/login_data_chrome.json +``` -### 目前支持平台 - +### 目前支持平台 | Browser | Password | Cookie | Bookmark | History | | :---------------------------------- | :------: | :----: | :------: | :-----: | -| Chrome [Windows] | ✔ | ✔ | ✔ | ✔ | +| Chrome version < 80 [Windows] | ✔ | ✔ | ✔ | ✔ | +| Chrome version > 80 [Windows] | ✔ | ✔ | ✔ | ✔ | | Chrome [MacOS]
(need password) | ✔ | ✔ | ✔ | ✔ | | Edge [Windows] | ✔ | ✔ | ✔ | ✔ | | Edge [MacOS]
(need password) | ✔ | ✔ | ✔ | ✔ | | 360 Secure Browser [Windows] | ✔ | ✔ | ✔ | ✔ | -| 360 Speed Browser [Windows] | ✖ | ✖ | ✖ | ✖ | +| QQ Browser [Windows] | ✔ | ✔ | ✔ | ✔ | | FireFox [Windows] | ✖ | ✖ | ✖ | ✖ | | FireFox [MacOS] | ✖ | ✖ | ✖ | ✖ | | Safari [MacOS] | ✖ | ✖ | ✖ | ✖ | | Internet Explorer [Windows] | ✖ | ✖ | ✖ | ✖ | -| QQ Browser [Windows] | ✖ | ✖ | ✖ | ✖ | +| 360 Speed Browser [Windows] | ✖ | ✖ | ✖ | ✖ | | Chrome [Linux] | ✖ | ✖ | ✖ | ✖ | @@ -78,8 +85,10 @@ GLOBAL OPTIONS: Based on those two lists, I woulf support those browser in the future - [x] Chrome +- [x] QQ browser +- [x] Edge +- [x] 360 secure browser +- [ ] 360 speed browser - [ ] Safari - [ ] Firefox -- [x] Edge -- [x] 360 browser - [ ] IE \ No newline at end of file diff --git a/utils/utils_darwin.go b/utils/utils_darwin.go index 576da17..b3cf730 100644 --- a/utils/utils_darwin.go +++ b/utils/utils_darwin.go @@ -14,15 +14,15 @@ import ( ) const ( - chromeDir = "/Users/*/Library/Application Support/Google/Chrome/*/" - edgeDir = "/Users/*/Library/Application Support/Microsoft Edge/*/" - mac360Secure = "/Users/*/Library/Application Support/360Chrome/*/" + chromeDir = "/Users/*/Library/Application Support/Google/Chrome/*/" + edgeDir = "/Users/*/Library/Application Support/Microsoft Edge/*/" + //mac360Secure = "/Users/*/Library/Application Support/360Chrome/*/" ) const ( - Chrome = "Chrome" - Edge = "Microsoft Edge" - SecureBrowser = "Chromium" + Chrome = "Chrome" + Edge = "Microsoft Edge" + //Secure360 = "360" ) var ( @@ -80,7 +80,6 @@ func InitKey(key string) error { return err } - func decryptChromeKey(chromePass []byte) { chromeKey = pbkdf2.Key(chromePass, chromeSalt, 1003, 16, sha1.New) } diff --git a/utils/utils_windows.go b/utils/utils_windows.go index 603cc31..b561007 100644 --- a/utils/utils_windows.go +++ b/utils/utils_windows.go @@ -16,10 +16,12 @@ import ( const ( chromeDir = "/AppData/Local/Google/Chrome/User Data/*/" chromeKeyFile = "/AppData/Local/Google/Chrome/User Data/Local State" - secure360Dir = "/AppData/Local/360chrome/Chrome/User Data/*/" - secure360KeyFile = "" edgeDir = "/AppData/Local/Microsoft/Edge/User Data/*/" edgeKeyFile = "/AppData/Local/Microsoft/Edge/User Data/Local State" + secure360Dir = "/AppData/Local/360chrome/Chrome/User Data/*/" + secure360KeyFile = "" + qqBrowserDir = "/AppData/Local/Tencent/QQBrowser/User Data/*/" + qqBrowserKeyFile = "" ) var ( @@ -41,10 +43,13 @@ var ( secure360Dir, secure360KeyFile, }, + "qq": { + qqBrowserDir, + qqBrowserKeyFile, + }, } ) - func PickBrowser(name string) (browserDir, key string, err error) { name = strings.ToLower(name) if choice, ok := browserList[name]; ok {