Skip to content

Commit 22749ae

Browse files
authored
Update README.md
1 parent b6e8223 commit 22749ae

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,27 @@ This project is designed to decrypt cookies stored by the Microsoft Edge browser
4343
4444
3. The program will output the decrypted cookies to a file named `cookies.json`.
4545
46+
## Execution Flow
47+
48+
1. **Terminate Edge Process**:
49+
- The program begins by attempting to terminate the Edge browser process using the `KillProcessByName` function. This ensures that the SQLite database containing the cookies is not locked, allowing for read access.
50+
51+
2. **Retrieve Encrypted AES Key**:
52+
- The program then calls `getEncryptedAESKey` to retrieve the encrypted AES key from the Edge browser's `Local State` file. The key is base64-encoded, so it is decoded using `base64Decode`.
53+
54+
3. **Decrypt AES Key**:
55+
- Once the AES key is decoded, it is decrypted using the Windows DPAPI (`CryptUnprotectData`) through the `decryptAESKey` function. This decrypted AES key is then used to decrypt the cookies.
56+
57+
4. **Locate Edge Browser Cookie Database**:
58+
- The program constructs the path to the SQLite database that stores the cookies via the `getEdgeBrowserCookiePath` function.
59+
60+
5. **Decrypt Cookies**:
61+
- Using the decrypted AES key, the program reads and decrypts the cookies stored in the SQLite database. The `readAndDecryptCookies` function handles the decryption process, and the `decryptData` function determines the encryption method (AES-GCM or DPAPI) and decrypts the cookie values.
62+
63+
6. **Output to JSON**:
64+
- Finally, the decrypted cookies are written to a JSON file named `cookies.json` using the `writeCookiesToJson` function, providing a structured output of the cookies' names, values, domains, paths, creation times, and expiration times.
65+
66+
4667
## Code Overview
4768
4869
### `main.cpp`

0 commit comments

Comments
 (0)