Hello I hope you can help me, I am trying to decrypt Google Chrome cookies, I know that they are in a Cookies file and that in version 80, I need to get a key of the Local State file.
My code is as follows
# Finds the Chrome encryption key in the "Local State" file
local_state_path = os.path.expandvars(r"%LOCALAPPDATA%\Google\Chrome\User Data\Local State")
with open(local_state_path, "r") as local_state_file:
local_state = json.load(local_state_file)
encrypted_key = base64.b64decode(local_state["os_crypt"]["encrypted_key"])
key = win32crypt.CryptUnprotectData(encrypted_key, None, None, None, 0)[1]
And returns an Error
pywintypes.error: (87, 'CryptUnprotectData', 'The parameter is incorrect.')
What's the problem here? something that's escaping me?
I expect to receive the list of cookies, but first I need to decrypt the key.