Commit Graph
100 Commits
Author SHA1 Message Date
ᴍᴏᴏɴD4ʀᴋ 591b97ce6d feat: Refactor crypto decryption functions for consistency and error handling (#302)
* feat: Refactor crypto decryption functions for consistency and error handling

- Close #301
- Refactored and renamed decryption functions across multiple files for consistency
- Updated cookie sorting method to sort in descending order
- Added new encryption functions for AES in CBC and GCM modes and DES in CBC mode
- Added error handling to decryption functions and created new error variables for invalid ciphertext length and decode failures
- Test cases added for encryption and decryption functions
- Removed unused code and imports.

* chore: Add new words to .typos.toml dictionary

- Add new terms to `.typos.toml` dictionary
- Improve code formatting and readability
- Refactor functions for better performance
- Update comments and documentation
- Resolve minor bugs and errors

* refactor: Refactor crypto package for better structure and readability

- Refactored and cleaned up crypto package code for better readability
- Renamed `ToByteArray` method to `bytes` for consistency
- Modified `DecryptWithDPAPI` method to use `outBlob.bytes()` for efficiency
- Added comments and removed unused methods in `loginPBE`
- Refactored `nssPBE` and `metaPBE` Decrypt methods to use `deriveKeyAndIV` helper method
- Improved overall maintainability and organization of codebase

* refactor: Refactor firefox password encryption and decryption.

- Implement ASN1PBE interface with various PBE struct types and encryption/decryption methods
- Fix naming and remove unused variables in browsingdata and crypto files
- Add tests for ASN1PBE implementation using external assertion package
- Refactor and improve error handling in firefox file functions related to master key retrieval
- Add input validation and AES-GCM encryption function to crypto file
2024-01-27 23:15:05 +08:00
ᴍᴏᴏɴD4ʀᴋ c150b22c1b feat: refactor firefox get master key retrieval and decryption functions. (#300)
* refactor: Simplify Firefox master key retrieval and decryption functions.

- Simplify variable names and functions in browsingdata/password/password.go
- Modify Decrypt function for each PBE type to have only one parameter named globalSalt in crypto/crypto.go
- Implement functions to retrieve master key from Firefox's key4.db file and query metadata and private NSS data in browser/firefox/firefox.go

* chore: Add dependencies and tests to Firefox package.

- Add go-sqlmock and github.com/kisielk/sqlstruct dependencies
- Add tests for Firefox package metadata and nssPrivate query
- Add test for Firefox's processMasterKey function (currently commented out)

* refactor: Refactor Firefox test functions, remove unused code

- Remove unused test function in firefox_test.go file
- Clean up code by removing unnecessary changes
- Simplify file structure for easier maintenance and readability
2024-01-27 23:15:05 +08:00
ᴍᴏᴏɴD4ʀᴋ 6786deb5be chore: remove unused config file (#294)
* docs: Remove unnecessary file.

* docs: Refine CONTRIBUTING.md contribution guidelines.
2024-01-27 23:15:05 +08:00
ᴍᴏᴏɴD4ʀᴋ baa0e09ad2 dev: Remove CGO go-sqlite3 with pure go driver (#292)
* chore: Resize logo and update browser support in READMEs (#284)

* chore: Resize logo and update browser support in READMEs

* docs: Update Coverage Status badge URL

* chore: add typos check linter in github actions (#285)

* refactor: Disable JSON handling in logger/logger.go.

* chore: Standardize spelling and add typos check workflows.

* refactor: Update SQLite driver import for browsing data package.

* refactor: Refactor browsing data package to use SQLite driver instead of SQLite3.

* docs: Add contribution guidelines to README file (#289)

* chore: Refactor file and directory names for improved organization and consistency
2024-01-19 15:45:24 +08:00
ᴍᴏᴏɴD4ʀᴋ cd2b1964c4 chore: add typos check linter in github actions (#285)
* refactor: Disable JSON handling in logger/logger.go.

* chore: Standardize spelling and add typos check workflows.

- Update GitHub Action name to 'unit tests'
- Add spell-check step with custom config to lint workflow
- Use latest version of golangci/lint-action in lint workflow
- Rename variable 'crypted' to 'encrypted' in crypto_windows.go
- Fix typos in comments and error/log messages throughout the codebase
- Update .gitignore to exclude typos.toml file
2024-01-17 13:52:59 +08:00
ᴍᴏᴏɴD4ʀᴋ 559e8ca1a3 chore: Resize logo and update browser support in READMEs (#284)
* chore: Resize logo and update browser support in READMEs
* docs: Update Coverage Status badge URL
2024-01-17 13:52:59 +08:00
ᴍᴏᴏɴD4ʀᴋ e48f35cfd3 feat: refactor logger to standard library (#280)
* refactor: Refactor logging to use structured slog package.

- Remove `gookit` dependencies from `go.sum`
- Improve error logging in multiple packages by replacing `log` with `log/slog`
- Update dependencies in `go.mod`
- Add new `logger` package with test cases
- Refactor logging statements in multiple packages to use `slog` instead of `log`
- Change logging format and level in multiple packages for better structured logging

* refactor: Refactor logger package and add handler interface

- Refactor logger package
- Rename `defaultHandler` to `DefaultLogger`
- Move `ReplaceAttr` function to `Logger` struct
- Implement `LogHandler` struct with `slog.Handler` interface
- Add new `Logger` methods for configuration
- Add `SetMaxLevel`, `SetJSONHandler`, `SetTextHandler`, `SetOutput`, `SetVerbose`, `SetReplaceAttrFunc`
- Add verbose flag to `cmd/hack-browser-data/main.go` to increase logging

* refactor: Refactor logger package to use simplified handler initialization.

- Refactor logger package to use Default instead of DefaultLogger
- Update `NewHandler` method to correctly reference `Default` logger and simplify handler initialization
- Update tests for logger to reflect changes in Default usage
- Rename `DefaultLogger` to `Default` and update comments to better reflect its purpose
- Update function calls in hack-browser-data main.go to reflect logger package updates

* refactor: Refactor logging in Chromium implementation

Refactor logging and simplify decryption in chromium files
- Replace logger package import with shared slog package
- Change logging messages to use slog instead of logger
- Simplify decryption process by removing first 5 characters of encrypted key
- Refactor error logging in linux file to use shared slog package
- Replace string concatenation with formatted string in linux error message
2024-01-16 14:06:13 +08:00
ᴍᴏᴏɴD4ʀᴋ 23037e16fd Chore: Add CONTRIBUTING.md guidelines and standardized templates (#279)
* chore: Improve GitHub workflows, issue template, and gitignore entries

- Add support for manual triggering of build and lint workflows.
- Improve bug report template by clarifying prompts and adding checklist and tips for better explanation of issues.
- Ignore `.md` files in `.github` and `.github/ISSUE_TEMPLATE` folders.
- Add badges for test running and coverage status in README.md.

* chore: Add standardized templates to repository

- Add pull request and feature request templates to the `.github` folder

* docs: Add CONTRIBUTING.md guidelines and update .gitignore.

- Update .gitignore to remove exclusions for browsing history files
- Add an exclusion for CONTRIBUTING.md in the Community section in .gitignore
- Create CONTRIBUTING.md with guidelines for contributors.
2024-01-13 18:08:35 +08:00
ᴍᴏᴏɴD4ʀᴋ 8a717704ed chore: Create CODE_OF_CONDUCT.md 2024-01-13 17:51:43 +08:00
ᴍᴏᴏɴD4ʀᴋ eed1d12282 dev: refactor items and update repo deploy (#278)
* refactor: Refactor file paths and use map to store item names

- Refactored file paths for various browsing data types to use a consistent method of generating temporary file names
- Modified parsing functions in many browsing data types to use the new temporary file naming scheme
- Renamed `FileName` to `Filename` for consistency in the `item` package
- Removed unnecessary code and comments throughout various files
- Made minor improvements to some Item methods such as `TempFilename` and `FileName`

* ci: Optimize GitHub actions and update Go versions. (#274)

* ci: Optimize GitHub actions and update Go versions.

- Add GitHub actions for unit testing, linting, building, and releasing
- Use a matrix strategy to test on different versions and platforms
- Update setup-go and go-version options for compatibility
- Format code and build zip files for different operating systems
- Upload releases to GitHub with specific asset names and types

* fix: Refactor item file naming convention

- Update `filename()` function to return `UnsupportedItem` in specific cases
- Replace `UnknownItem` with `UnsupportedItem` in `Filename` method of `Item` struct
- Refactor code for clarity and consistency

* ci: Update GitHub workflow with latest setup-go version

- Update setup-go action to v3 in lint.yml GitHub workflow
- Omits some big changes in file diff summary
- Improve overall workflow reliability and efficiency

* ci: Improve GitHub actions across platforms

- Improve Windows compatibility in build workflow
- Optimize unit testing for pull requests
- Upgrade Coveralls GitHub action to v2 for improved coverage tracking

* build: Optimize build process for consistency and efficiency

- Ensure consistency of line endings by disabling Git's automatic conversion
- Add format check for Windows systems
- Update Go version in strategy matrix to `1.21.x`
- Remove unused dependencies from build process
- Include all packages in repository in build command

* ci: Refactor GitHub workflow configuration

- Remove unnecessary checks for `windows-latest` in github workflow
- Change `gofmt` check to `diff` for formatting
- Remove unneeded Git configuration for encoding of line endings
- Close #273

* ci: Update default branch references in GitHub Actions workflows (#277)

- Update Github Actions workflows to use `main` branch instead of `master`.
- Rename `master` branch to `main` in `lint.yml` and `build.yml` files.
- Change default branch to `main` in `contributors.yml` workflow file.
2024-01-13 15:58:53 +08:00
ᴍᴏᴏɴD4ʀᴋ f4b4ad1258 chore: remove auto released github actions 2024-01-09 20:57:42 +08:00
moonD4rk 58bca21713 fix: Improve error handling in browsing data and file copying functions
- Improve error handling in browsingdata.go Recovery function
- Add logging for file copy errors in chromium.go
- Modify copyItemToLocal function to continue copying files on error
2024-01-09 20:36:56 +08:00
moonD4rk 5a34d1c176 chore: Downgrade version number and remove unused flag
Refactor version number changes and remove unused flag in CLI

- Downgrade version number from `0.4.7` to `0.4.5` in main.go and README files
- Remove `HelpCommand` flag from `cli.App`
- Update `Github Link` in usage text of hack-browser-data CLI
2024-01-09 18:10:14 +08:00
moonD4rk baac121610 chore: Refactor and update dependencies in go.mod file
- Refactor and optimize parsing function in browsingdata extension
- Update dependency versions and indirect versions in go.mod
2024-01-09 18:10:14 +08:00
moonD4rk 23daf093b8 chore: Update version number to 0.4.7 in README and main.go files
- Update version number to `0.4.7` in `README` and `README_ZH`
- Update version number to `0.4.7` in `cmd/hack-browser-data/main.go`
2024-01-09 18:10:14 +08:00
moonD4rk 83fc248195 chore: update Go version and dependencies for builds
- Update Go version from `1.20` to `1.21` in go.mod, .github/workflows/build.yml, and .github/workflows/lint.yml
2023-10-02 22:37:42 +08:00
moonD4rk 142d9e99e2 refactor: disable paralleltest lint ruler 2023-10-02 22:35:33 +08:00
ᴍᴏᴏɴD4ʀᴋ a2c3cd1090 Merge pull request #227 from moonD4rk/static/update-logo
chore: update logo filetype
2023-07-06 11:49:38 +08:00
moonD4rk 93c0d42b46 chore: update logo filetype convert svg to png 2023-07-06 11:47:03 +08:00
ᴍᴏᴏɴD4ʀᴋ 3eaa2dd2bf Merge pull request #220 from moonD4rk/dev
feat: support Arc Browser for macOS
2023-06-06 19:49:11 +08:00
moonD4rk 3316067af9 chore: Allow all library in depguard linter settings
- Add depguard linter settings to deny pkg github.com/pkg/errors in .golangci.yml file.
2023-06-06 19:45:53 +08:00
moonD4rk 5406ee768e docs: Improve arc browser support and compilation instructions in README. 2023-06-06 19:00:27 +08:00
moonD4rk 71cee38b0c feat: Add support for Arc browser for macOS 2023-06-06 18:57:01 +08:00
moonD4rk 0a7f19ab91 refactor: lowercase library module name 2023-06-04 13:47:43 +08:00
moonD4rk 6c1f653b4f refactor: Refactor storage queries and filters.
- Update local storage query constant and function calls
- Remove null and control characters from UTF-8 split function
2023-05-08 19:24:15 +08:00
moonD4rk 01bf9806e0 fix: renaming unused parameter 2023-05-08 19:22:55 +08:00
moonD4rk c9acb11536 docs: add star hisory to readme 2023-05-08 19:22:55 +08:00
moonD4rk 6351e74f16 fix: add parallel options for unit test 2023-05-08 19:22:55 +08:00
moonD4rk a685be362b chore: set max local storage value length is 2kb 2023-05-08 19:22:55 +08:00
moonD4rk 4fb2acd85c feat: test case for convert utf16 value to utf8 2023-05-08 19:22:55 +08:00
moonD4rk b824f74fae fix: missing key and value in localstorage 2023-05-08 19:22:55 +08:00
moonD4rk c070323e86 refactor: format parse browsing data 2023-05-08 19:22:55 +08:00
moonD4rk 4b2c15088b docs: update readme 2023-05-08 19:22:55 +08:00
ᴍᴏᴏɴD4ʀᴋ dae8edad60 chore: upgrade cross compile ghaction-xgo actions verison 2023-03-11 23:27:20 +08:00
moonD4rk bd56109824 chore: update go version to 1.20 2023-03-11 21:23:22 +08:00
moonD4rk 60772a47f4 chore: update actions go version to 1.20 2023-03-11 21:22:22 +08:00
ᴍᴏᴏɴD4ʀᴋ ee619dace9 Merge pull request #200 from moonD4rk/fix/profile-folder
feat: add full-export browsing data option
2023-03-11 20:16:21 +08:00
moonD4rk 84ab4005f9 feat: add is full export browsing data option 2023-03-11 20:09:10 +08:00
moonD4rk fbe61a2cf4 chore: upgrade package dependencies 2023-03-11 19:18:11 +08:00
moonD4rk 89cd0de693 refactor: rename funciton name 2023-03-11 18:41:05 +08:00
moonD4rk 4b7ad4d505 feat: add is export full data option 2023-03-11 17:51:40 +08:00
moonD4rk cc4edc5cb6 refactor: initial default logger 2023-03-10 15:58:10 +08:00
ᴍᴏᴏɴD4ʀᴋ 1214bf8342 Merge pull request #199 from moonD4rk/feat/layout
feat/layout: format project layout
2023-03-10 15:12:27 +08:00
moonD4rk 4fca1a514f refactor: rename provider name 2023-03-10 15:09:50 +08:00
moonD4rk b0cb59ec2c chore: update version flag 2023-03-10 14:54:47 +08:00
moonD4rk b65d3186c4 chore: update project layout 2023-03-10 14:52:26 +08:00
ᴍᴏᴏɴD4ʀᴋ 9850624d45 Merge pull request #198 from moonD4rk/feat/log
fix: wrong log caller skip level
2023-03-09 19:13:26 +08:00
moonD4rk da496cd563 fix: wrong log caller skip level 2023-03-09 19:07:06 +08:00
ᴍᴏᴏɴD4ʀᴋ 9e784c6e7c Merge pull request #197 from moonD4rk/feat/dependency
chore: upgrade package dependencies
2023-03-09 17:59:51 +08:00
moonD4rk 7e6c18caea chore: upgrade package dependencies 2023-03-09 17:55:39 +08:00
ᴍᴏᴏɴD4ʀᴋ c156107dc7 Merge pull request #196 from slark-yuxj/master
fix: the bug that the command line Usage prompt is incomplete
2023-01-06 11:27:49 +08:00
ᴍᴏᴏɴD4ʀᴋ 958701f68f Merge pull request #191 from zhe6652/master
fix: issue of data missing caused by title being null
2022-12-29 13:17:24 +08:00
ᴍᴏᴏɴD4ʀᴋ c338f4176a Merge pull request #182 from moonD4rk/feat/add-browser
feat: add sogou and dc browser
2022-11-29 18:40:29 +08:00
ᴍᴏᴏɴD4ʀᴋ 8d34e72090 Merge pull request #178 from moonD4rk/dev/dependency
chore: upgrade go mod, remove json iterator dep
2022-10-30 13:41:58 +08:00
moonD4rk b7cabaa7b9 chore: upgrade go mod, remove json iterator dep 2022-10-30 13:37:49 +08:00
ᴍᴏᴏɴD4ʀᴋ c47ca78fbc Merge pull request #177 from moonD4rk/fix/logbug
fix: handle error if run binary failed
2022-10-30 13:14:49 +08:00
moonD4rk 01b2bc582b fix: handle err run binary failed 2022-10-30 12:58:35 +08:00
ᴍᴏᴏɴD4ʀᴋ 20fdd7a58d Merge pull request #171 from carr0t2/master
fix: init log error
2022-10-24 14:20:59 +08:00
ᴍᴏᴏɴD4ʀᴋ 9976fe0ea1 fix: init log error 2022-10-24 14:19:29 +08:00
ᴍᴏᴏɴD4ʀᴋ b52627afc7 Merge branch 'fix/logbug' into master 2022-10-24 14:04:12 +08:00
moonD4rk 8a952f8baa chore: remove cmd folder from git ignore config 2022-10-24 13:59:57 +08:00
ᴍᴏᴏɴD4ʀᴋ 9a2bfa11b1 refactor: add provider software folder and check linters
Merge pull request #172 from moonD4rk/fix/golangci-lint
2022-10-24 13:50:43 +08:00
moonD4rk 877fcd2c84 refactor: add provider software folder 2022-10-24 13:42:31 +08:00
moonD4rk 714e8a57b9 chore: remove abandoned linter 2022-10-24 13:36:01 +08:00
ᴍᴏᴏɴD4ʀᴋ 7fe14c05d8 Merge pull request #162 from moonD4rk/feat/dev
fix: find cookie file failed on windows
2022-08-16 19:38:17 +08:00
ᴍᴏᴏɴD4ʀᴋ cf4ffeca51 fix: find cookies file failed 2022-08-16 19:30:53 +08:00
ᴍᴏᴏɴD4ʀᴋ 86a747143b refactor: remove unused err message 2022-08-16 19:24:36 +08:00
ᴍᴏᴏɴD4ʀᴋ e9bbe16c7d feat: sort with browser name 2022-08-16 15:51:28 +08:00
ᴍᴏᴏɴD4ʀᴋ 286307004e Merge pull request #160 from moonD4rk/dev
docs: update ci status badge
2022-08-14 23:41:51 +08:00
ᴍᴏᴏɴD4ʀᴋ ce415ff363 fix: add errors import for darwin 2022-08-14 23:38:50 +08:00
ᴍᴏᴏɴD4ʀᴋ cf234d40e9 docs: update ci status badge 2022-08-14 23:38:26 +08:00
ᴍᴏᴏɴD4ʀᴋ ab6ca5abfa Merge pull request #159 from moonD4rk/dev
refactor: formatting code used to pass golangci-lint rules
2022-08-14 23:06:23 +08:00
ᴍᴏᴏɴD4ʀᴋ 76554e48c3 refactor: only handle error if security command not found 2022-08-14 23:04:15 +08:00
ᴍᴏᴏɴD4ʀᴋ a2bfdeb130 chore: add golangci-lint action config file 2022-08-14 22:55:00 +08:00
ᴍᴏᴏɴD4ʀᴋ 77bdde8d0e chore: manually trigger release actions 2022-08-14 22:53:42 +08:00
ᴍᴏᴏɴD4ʀᴋ 2a0ed1ebbf chore: add lint ruler, exclude unused variable 2022-08-14 22:51:31 +08:00
ᴍᴏᴏɴD4ʀᴋ 05957c1bb2 chore: update golang version to 1.19 2022-08-14 22:32:36 +08:00
ᴍᴏᴏɴD4ʀᴋ 14fd71005a refactor: add nolint comment 2022-08-14 22:16:24 +08:00
ᴍᴏᴏɴD4ʀᴋ 63fc3a656a refactor: pass golang-ci lint check 2022-08-14 21:22:34 +08:00
ᴍᴏᴏɴD4ʀᴋ 147d57e8f4 refactor: add comments and format code style 2022-08-14 01:18:28 +08:00
ᴍᴏᴏɴD4ʀᴋ 77991605b2 chore: disable some lint ruler 2022-08-13 20:11:56 +08:00
ᴍᴏᴏɴD4ʀᴋ 916936b9ab chore: add golang-ci lint config 2022-08-13 18:23:14 +08:00
ᴍᴏᴏɴD4ʀᴋ ae3f8f52ee Merge pull request #156 from slimwang/master
fix:' cannot access the file ' Error
2022-08-13 15:34:06 +08:00
ᴍᴏᴏɴD4ʀᴋ 0f0db469ae fix: filter result if item is empty and add utf8 encoder to csv
Merge pull request #144 from moonD4rk/fix/bug
2022-06-05 15:33:12 +08:00
ᴍᴏᴏɴD4ʀᴋ 6de08b6751 docs: update readme to v0.4.3 2022-06-05 15:29:05 +08:00
ᴍᴏᴏɴD4ʀᴋ 7b8e2a3fd2 fix: filter result if exported data is empty 2022-06-05 15:27:14 +08:00
ᴍᴏᴏɴD4ʀᴋ d1ae09d9e4 fix: add utf8 encoder for outputter 2022-06-05 15:15:41 +08:00
ᴍᴏᴏɴD4ʀᴋ 5526441e21 feat: support export multiple user from browser
Merge pull request #143 from moonD4rk/feat/multiple-user
2022-06-05 15:03:46 +08:00
ᴍᴏᴏɴD4ʀᴋ 511f71fd48 refactor: remove get single user item path 2022-06-05 14:59:44 +08:00
ᴍᴏᴏɴD4ʀᴋ 6d710c20e1 refactor: refactor package with gofumpt 2022-06-05 14:51:37 +08:00
ᴍᴏᴏɴD4ʀᴋ e6aa1f0c61 feat: add multiple user for chromium 2022-06-05 14:04:39 +08:00
ᴍᴏᴏɴD4ʀᴋ 0cde56c6e6 Merge pull request #138 from Amir-78/master
Profile folder for Chrome and OperaGx fixed for windows
2022-05-27 19:22:51 +08:00
ᴍᴏᴏɴD4ʀᴋ b7821d4024 fix: check copy dir with filename suffix 2022-05-03 15:51:10 +08:00
ᴍᴏᴏɴD4ʀᴋ e17ad16133 style: fix typo in log message
merge pull request #131 from dexhek/patch-1
2022-05-03 02:19:34 +08:00
ᴍᴏᴏɴD4ʀᴋ 0e73875e99 docs: update readme to v0.4.2 2022-04-30 00:50:49 +08:00
ᴍᴏᴏɴD4ʀᴋ f0e56b11a1 feat: support export extension info, Close #129
merge pull request #129 from moonD4rk/dev
2022-04-30 00:42:15 +08:00
ᴍᴏᴏɴD4ʀᴋ 353503f90f feat: support extension for firefox 2022-04-30 00:37:23 +08:00
ᴍᴏᴏɴD4ʀᴋ 26de1075ee feat: support extension for chromium 2022-04-29 23:59:37 +08:00
ᴍᴏᴏɴD4ʀᴋ d6cb101512 refactor: remove log from fileutil 2022-04-29 21:30:14 +08:00
ᴍᴏᴏɴD4ʀᴋ 8daaa427c8 docs: add svg logo for hackbrowserdata
merge pull request #128 from moonD4rk/dev
2022-04-25 18:31:41 +08:00