From 25699b07c5d8ca24490b1b7be08e414e8d3c2c51 Mon Sep 17 00:00:00 2001 From: stevenlele <15964380+stevenlele@users.noreply.github.com> Date: Thu, 27 Jul 2023 21:08:07 +0800 Subject: [PATCH] chore: fix typos (#232) --- .gitignore | 6 +++--- README.md | 14 ++++++------- README_ZH.md | 12 +++++------ browser/browser.go | 4 ++-- browser/chromium/chromium.go | 6 +++--- browser/firefox/firefox.go | 6 +++--- .../bookmark/bookmark.go | 0 {browingdata => browsingdata}/browsingdata.go | 20 +++++++++---------- .../cookie/cookie.go | 0 .../creditcard/creditcard.go | 0 .../download/download.go | 0 .../extension/extension.go | 0 .../history/history.go | 0 .../localstorage/localstorage.go | 0 .../localstorage/localstorage_test.go | 0 {browingdata => browsingdata}/outputter.go | 2 +- .../outputter_test.go | 2 +- .../password/password.go | 0 .../sessionstorage/sessionstorage.go | 0 cmd/hack-browser-data/main.go | 6 +++--- 20 files changed, 39 insertions(+), 39 deletions(-) rename {browingdata => browsingdata}/bookmark/bookmark.go (100%) rename {browingdata => browsingdata}/browsingdata.go (83%) rename {browingdata => browsingdata}/cookie/cookie.go (100%) rename {browingdata => browsingdata}/creditcard/creditcard.go (100%) rename {browingdata => browsingdata}/download/download.go (100%) rename {browingdata => browsingdata}/extension/extension.go (100%) rename {browingdata => browsingdata}/history/history.go (100%) rename {browingdata => browsingdata}/localstorage/localstorage.go (100%) rename {browingdata => browsingdata}/localstorage/localstorage_test.go (100%) rename {browingdata => browsingdata}/outputter.go (98%) rename {browingdata => browsingdata}/outputter_test.go (95%) rename {browingdata => browsingdata}/password/password.go (100%) rename {browingdata => browsingdata}/sessionstorage/sessionstorage.go (100%) diff --git a/.gitignore b/.gitignore index 9b6e196..cc894e9 100644 --- a/.gitignore +++ b/.gitignore @@ -191,6 +191,6 @@ results/ hack-browser-data !/cmd/hack-browser-data -!/browingdata/history -!/browingdata/history/history.go -!/browingdata/history/history_test.go +!/browsingdata/history +!/browsingdata/history/history.go +!/browsingdata/history/history_test.go diff --git a/README.md b/README.md index 586de3a..98b94a5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [中文说明](https://github.com/moonD4rk/HackBrowserData/blob/master/README_ZH.md) -`HackBrowserData` is a command-line tool for decrypting and exporting browser data ( passwords, history, cookies, bookmarks, credit cards, download records, localStorage and extension ) from the browser. It supports the most popular browsers on the market and runs on Windows, macOS and Linux. +`HackBrowserData` is a command-line tool for decrypting and exporting browser data (passwords, history, cookies, bookmarks, credit cards, download history, localStorage and extensions) from the browser. It supports the most popular browsers on the market and runs on Windows, macOS and Linux. > Disclaimer: This tool is only intended for security research. Users are responsible for all legal and related liabilities resulting from the use of this tool. The original author does not assume any legal responsibility. @@ -127,11 +127,11 @@ You can double-click to run, or use command line. ``` PS C:\test> .\hack-browser-data.exe -h NAME: - hack-browser-data - Export password|bookmark|cookie|history|credit card|download|localStorage|extension from browser + hack-browser-data - Export passwords|bookmarks|cookies|history|credit cards|download history|localStorage|extensions from browser USAGE: - [hack-browser-data -b chrome -f json -dir results -cc] - Export all browingdata(password/cookie/history/bookmark) from browser + [hack-browser-data -b chrome -f json --dir results --zip] + Export all browsing data (passwords/cookies/history/bookmarks) from browser Github Link: https://github.com/moonD4rk/HackBrowserData VERSION: @@ -140,16 +140,16 @@ VERSION: GLOBAL OPTIONS: --verbose, --vv verbose (default: false) --compress, --zip compress result to zip (default: false) - --browser value, -b value available browsers: all|brave|chrome|chrome-beta|chromium|coccoc|edge|firefox|opera|opera-gx|vivaldi|yandex (default: "all") + --browser value, -b value available browsers: all|360|brave|chrome|chrome-beta|chromium|coccoc|dc|edge|firefox|opera|opera-gx|qq|sogou|vivaldi|yandex (default: "all") --results-dir value, --dir value export dir (default: "results") - --format value, -f value file name csv|json (default: "csv") + --format value, -f value output format: csv|json (default: "csv") --profile-path value, -p value custom profile dir path, get with chrome://version --full-export, --full is export full browsing data (default: true) --help, -h show help --version, -v print the version -PS C:\test> .\hack-browser-data.exe -b all -f json --dir results -zip +PS C:\test> .\hack-browser-data.exe -b all -f json --dir results --zip [NOTICE] [browser.go:46,pickChromium] find browser Chrome success [NOTICE] [browser.go:46,pickChromium] find browser Microsoft Edge success [NOTICE] [browsingdata.go:59,Output] output to file results/microsoft_edge_download.json success diff --git a/README_ZH.md b/README_ZH.md index 02f6d08..d684670 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -122,11 +122,11 @@ CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ GOARCH=amd64 GOOS=linux CGO_E ``` PS C:\test> .\hack-browser-data.exe -h NAME: - hack-browser-data - Export password|bookmark|cookie|history|credit card|download|localStorage|extension from browser + hack-browser-data - Export passwords|bookmarks|cookies|history|credit cards|download history|localStorage|extensions from browser USAGE: - [hack-browser-data -b chrome -f json -dir results -cc] - Export all browingdata(password/cookie/history/bookmark) from browser + [hack-browser-data -b chrome -f json --dir results --zip] + Export all browsing data (passwords/cookies/history/bookmarks) from browser Github Link: https://github.com/moonD4rk/HackBrowserData VERSION: @@ -135,16 +135,16 @@ VERSION: GLOBAL OPTIONS: --verbose, --vv verbose (default: false) --compress, --zip compress result to zip (default: false) - --browser value, -b value available browsers: all|brave|chrome|chrome-beta|chromium|coccoc|edge|firefox|opera|opera-gx|vivaldi|yandex (default: "all") + --browser value, -b value available browsers: all|360|brave|chrome|chrome-beta|chromium|coccoc|dc|edge|firefox|opera|opera-gx|qq|sogou|vivaldi|yandex (default: "all") --results-dir value, --dir value export dir (default: "results") - --format value, -f value file name csv|json (default: "csv") + --format value, -f value output format: csv|json (default: "csv") --profile-path value, -p value custom profile dir path, get with chrome://version --full-export, --full is export full browsing data (default: true) --help, -h show help --version, -v print the version -PS C:\test> .\hack-browser-data.exe -b all -f json --dir results -zip +PS C:\test> .\hack-browser-data.exe -b all -f json --dir results --zip [NOTICE] [browser.go:46,pickChromium] find browser Chrome success [NOTICE] [browser.go:46,pickChromium] find browser Microsoft Edge success [NOTICE] [browsingdata.go:59,Output] output to file results/microsoft_edge_download.json success diff --git a/browser/browser.go b/browser/browser.go index c4b2eec..25c3df6 100644 --- a/browser/browser.go +++ b/browser/browser.go @@ -5,9 +5,9 @@ import ( "sort" "strings" - "github.com/moond4rk/hackbrowserdata/browingdata" "github.com/moond4rk/hackbrowserdata/browser/chromium" "github.com/moond4rk/hackbrowserdata/browser/firefox" + "github.com/moond4rk/hackbrowserdata/browsingdata" "github.com/moond4rk/hackbrowserdata/log" "github.com/moond4rk/hackbrowserdata/utils/fileutil" "github.com/moond4rk/hackbrowserdata/utils/typeutil" @@ -17,7 +17,7 @@ type Browser interface { // Name is browser's name Name() string // BrowsingData returns all browsing data in the browser. - BrowsingData(isFullExport bool) (*browingdata.Data, error) + BrowsingData(isFullExport bool) (*browsingdata.Data, error) } // PickBrowsers returns a list of browsers that match the name and profile. diff --git a/browser/chromium/chromium.go b/browser/chromium/chromium.go index cc3ff11..b8dc7f0 100644 --- a/browser/chromium/chromium.go +++ b/browser/chromium/chromium.go @@ -5,7 +5,7 @@ import ( "path/filepath" "strings" - "github.com/moond4rk/hackbrowserdata/browingdata" + "github.com/moond4rk/hackbrowserdata/browsingdata" "github.com/moond4rk/hackbrowserdata/item" "github.com/moond4rk/hackbrowserdata/utils/fileutil" "github.com/moond4rk/hackbrowserdata/utils/typeutil" @@ -48,13 +48,13 @@ func (c *Chromium) Name() string { return c.name } -func (c *Chromium) BrowsingData(isFullExport bool) (*browingdata.Data, error) { +func (c *Chromium) BrowsingData(isFullExport bool) (*browsingdata.Data, error) { items := c.items if !isFullExport { items = item.FilterSensitiveItems(c.items) } - data := browingdata.New(items) + data := browsingdata.New(items) if err := c.copyItemToLocal(); err != nil { return nil, err diff --git a/browser/firefox/firefox.go b/browser/firefox/firefox.go index 825f349..d690826 100644 --- a/browser/firefox/firefox.go +++ b/browser/firefox/firefox.go @@ -6,7 +6,7 @@ import ( "io/fs" "path/filepath" - "github.com/moond4rk/hackbrowserdata/browingdata" + "github.com/moond4rk/hackbrowserdata/browsingdata" "github.com/moond4rk/hackbrowserdata/item" "github.com/moond4rk/hackbrowserdata/utils/fileutil" "github.com/moond4rk/hackbrowserdata/utils/typeutil" @@ -76,13 +76,13 @@ func (f *Firefox) Name() string { return f.name } -func (f *Firefox) BrowsingData(isFullExport bool) (*browingdata.Data, error) { +func (f *Firefox) BrowsingData(isFullExport bool) (*browsingdata.Data, error) { items := f.items if !isFullExport { items = item.FilterSensitiveItems(f.items) } - b := browingdata.New(items) + b := browsingdata.New(items) if err := f.copyItemToLocal(); err != nil { return nil, err diff --git a/browingdata/bookmark/bookmark.go b/browsingdata/bookmark/bookmark.go similarity index 100% rename from browingdata/bookmark/bookmark.go rename to browsingdata/bookmark/bookmark.go diff --git a/browingdata/browsingdata.go b/browsingdata/browsingdata.go similarity index 83% rename from browingdata/browsingdata.go rename to browsingdata/browsingdata.go index a1acdfe..436b280 100644 --- a/browingdata/browsingdata.go +++ b/browsingdata/browsingdata.go @@ -1,17 +1,17 @@ -package browingdata +package browsingdata 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/browsingdata/bookmark" + "github.com/moond4rk/hackbrowserdata/browsingdata/cookie" + "github.com/moond4rk/hackbrowserdata/browsingdata/creditcard" + "github.com/moond4rk/hackbrowserdata/browsingdata/download" + "github.com/moond4rk/hackbrowserdata/browsingdata/extension" + "github.com/moond4rk/hackbrowserdata/browsingdata/history" + "github.com/moond4rk/hackbrowserdata/browsingdata/localstorage" + "github.com/moond4rk/hackbrowserdata/browsingdata/password" + "github.com/moond4rk/hackbrowserdata/browsingdata/sessionstorage" "github.com/moond4rk/hackbrowserdata/item" "github.com/moond4rk/hackbrowserdata/log" "github.com/moond4rk/hackbrowserdata/utils/fileutil" diff --git a/browingdata/cookie/cookie.go b/browsingdata/cookie/cookie.go similarity index 100% rename from browingdata/cookie/cookie.go rename to browsingdata/cookie/cookie.go diff --git a/browingdata/creditcard/creditcard.go b/browsingdata/creditcard/creditcard.go similarity index 100% rename from browingdata/creditcard/creditcard.go rename to browsingdata/creditcard/creditcard.go diff --git a/browingdata/download/download.go b/browsingdata/download/download.go similarity index 100% rename from browingdata/download/download.go rename to browsingdata/download/download.go diff --git a/browingdata/extension/extension.go b/browsingdata/extension/extension.go similarity index 100% rename from browingdata/extension/extension.go rename to browsingdata/extension/extension.go diff --git a/browingdata/history/history.go b/browsingdata/history/history.go similarity index 100% rename from browingdata/history/history.go rename to browsingdata/history/history.go diff --git a/browingdata/localstorage/localstorage.go b/browsingdata/localstorage/localstorage.go similarity index 100% rename from browingdata/localstorage/localstorage.go rename to browsingdata/localstorage/localstorage.go diff --git a/browingdata/localstorage/localstorage_test.go b/browsingdata/localstorage/localstorage_test.go similarity index 100% rename from browingdata/localstorage/localstorage_test.go rename to browsingdata/localstorage/localstorage_test.go diff --git a/browingdata/outputter.go b/browsingdata/outputter.go similarity index 98% rename from browingdata/outputter.go rename to browsingdata/outputter.go index a72d379..3de846d 100644 --- a/browingdata/outputter.go +++ b/browsingdata/outputter.go @@ -1,4 +1,4 @@ -package browingdata +package browsingdata import ( "encoding/csv" diff --git a/browingdata/outputter_test.go b/browsingdata/outputter_test.go similarity index 95% rename from browingdata/outputter_test.go rename to browsingdata/outputter_test.go index 0cab67e..329e5fa 100644 --- a/browingdata/outputter_test.go +++ b/browsingdata/outputter_test.go @@ -1,4 +1,4 @@ -package browingdata +package browsingdata import ( "os" diff --git a/browingdata/password/password.go b/browsingdata/password/password.go similarity index 100% rename from browingdata/password/password.go rename to browsingdata/password/password.go diff --git a/browingdata/sessionstorage/sessionstorage.go b/browsingdata/sessionstorage/sessionstorage.go similarity index 100% rename from browingdata/sessionstorage/sessionstorage.go rename to browsingdata/sessionstorage/sessionstorage.go diff --git a/cmd/hack-browser-data/main.go b/cmd/hack-browser-data/main.go index 0706f0a..995927c 100644 --- a/cmd/hack-browser-data/main.go +++ b/cmd/hack-browser-data/main.go @@ -27,15 +27,15 @@ func main() { func Execute() { app := &cli.App{ Name: "hack-browser-data", - Usage: "Export password|bookmark|cookie|history|credit card|download|localStorage|extension from browser", - UsageText: "[hack-browser-data -b chrome -f json -dir results -cc]\nExport all browingdata(password/cookie/history/bookmark) from browser\nGithub Link: https://github.com/moonD4rk/HackBrowserData", + Usage: "Export passwords|bookmarks|cookies|history|credit cards|download history|localStorage|extensions from browser", + UsageText: "[hack-browser-data -b chrome -f json -dir results --zip]\nExport all browsing data (passwords/cookies/history/bookmarks) from browser\nGithub Link: https://github.com/moonD4rk/HackBrowserData", Version: "0.5.0", Flags: []cli.Flag{ &cli.BoolFlag{Name: "verbose", Aliases: []string{"vv"}, Destination: &verbose, Value: false, Usage: "verbose"}, &cli.BoolFlag{Name: "compress", Aliases: []string{"zip"}, Destination: &compress, Value: false, Usage: "compress result to zip"}, &cli.StringFlag{Name: "browser", Aliases: []string{"b"}, Destination: &browserName, Value: "all", Usage: "available browsers: all|" + browser.Names()}, &cli.StringFlag{Name: "results-dir", Aliases: []string{"dir"}, Destination: &outputDir, Value: "results", Usage: "export dir"}, - &cli.StringFlag{Name: "format", Aliases: []string{"f"}, Destination: &outputFormat, Value: "csv", Usage: "file name csv|json"}, + &cli.StringFlag{Name: "format", Aliases: []string{"f"}, Destination: &outputFormat, Value: "csv", Usage: "output format: csv|json"}, &cli.StringFlag{Name: "profile-path", Aliases: []string{"p"}, Destination: &profilePath, Value: "", Usage: "custom profile dir path, get with chrome://version"}, &cli.BoolFlag{Name: "full-export", Aliases: []string{"full"}, Destination: &isFullExport, Value: true, Usage: "is export full browsing data"}, },