Commit Graph

389 Commits

Author SHA1 Message Date
github-actions[bot]
2f22fa79f6
chore: update contributors [skip ci] 2024-03-24 01:28:27 +00:00
github-actions[bot]
ec10278f65
chore: update contributors [skip ci] 2024-02-18 01:27:00 +00:00
ᴍᴏᴏɴD4ʀᴋ
700b981e5d feat: Upgrade GitHub Actions to v4 for greater stability (#304)
* ci: Upgrade GitHub Actions to v4 for greater stability

- Close #303
- Upgrade GitHub Actions to v4 in all workflows
- Fix zipping and uploading of Linux arm64 assets in release workflow
- Simplify and remove unnecessary steps in build workflow
2024-01-27 23:15:05 +08:00
ᴍᴏᴏɴ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
github-actions[bot]
f93d8d6c95
chore: update contributors [skip ci] 2024-01-09 12:37:51 +00: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
stevenlele
53e9447713 refactor: optimize JSON indent output format (#236) 2024-01-09 18:10:14 +08:00
stevenlele
07561f56fa feat: improve extension parsing (#235)
* feat: improve extension parsing

* refactor: Refactor extension parsing and update file names.

- Refactor extension parsing function for clarity and DRYness
- Update name of a file to "Secure Preferences"
- Add TODO comment for future work on extension files and folders
- Remove unnecessary file write operation and import statement

---------

Co-authored-by: moonD4rk <moond4rk13@gmail.com>
2024-01-09 18:10:14 +08:00
stevenlele
368e2f50a8 fix: add logger info when unable to decrypt the master key (#234) 2024-01-09 18:10:14 +08:00
stevenlele
038e97e2dc chore: fix typos (#232) 2024-01-09 18:10:14 +08:00
github-actions[bot]
c4ce4fe890
chore: update contributors [skip ci] 2024-01-09 07:24:19 +00:00
guangwu
e1420832c4
chore: use better bytes comparison method (#257) 2024-01-09 15:24:03 +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
github-actions[bot]
ecb8db1854
chore: update contributors [skip ci] 2023-07-16 01:33:27 +00:00
Andrii Ursulenko
ab4d3e14db
fix: nil browsing data in case error and walkdir instead of walk (#229)
* fix: nil browsing data in case error

Signed-off-by: Andrii Ursulenko <a.ursulenko@gmail.com>

* fix: ignore walk error, use walkdir instead of walk

---------

Signed-off-by: Andrii Ursulenko <a.ursulenko@gmail.com>
Co-authored-by: Andrii Ursulenko <a.ursulenko@gmail.com>
2023-07-10 17:53:13 +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
Mingxing Liu
5376184c7e fix: wrong session storage key if contains map 2023-05-08 19:23:55 +08:00
Mingxing Liu
d1bff59b8e feat: support export session storage in chromium 2023-05-08 19:23:31 +08:00
Mingxing Liu
115e1d29c6 feat: support export session storage for chromium 2023-05-08 19:22:55 +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