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
This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2024-01-24 16:29:33 +08:00
parent 6786deb5be
commit c150b22c1b
6 changed files with 152 additions and 77 deletions
+1
View File
@@ -3,6 +3,7 @@ module github.com/moond4rk/hackbrowserdata
go 1.21
require (
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/gocarina/gocsv v0.0.0-20231116093920-b87c2d0e983a
github.com/godbus/dbus/v5 v5.1.0
github.com/otiai10/copy v1.14.0