网上大部分的教程都是python版本的,C#的详细版本比较少,这一次就详细的记录我的踩坑摸索吧。
先来看看Python版本的解密
# encoding: utf-8
import io
import os
import json
import base64
import sqlite3
import win32crypt
from win32crypt import CryptUnprotectData
from cryptography.hazmat.primitives.ciphers.aead import AESGCMdef get_string(local_state):with io.open(local_state, 'r', encoding='utf-8') as f:s = json.load(f)['os_crypt']['encrypted_key']print(s)return sdef pull_the_key(base64_encrypted_key):encrypted_key_with_header = base64.b64decode(base64_encrypted_key)encrypted_key = encrypted_key_with_header[5:]print(encrypted_key)key = CryptUnprotectData(encrypted_key, None, None, None, 0)[1]return key#local_state = os.environ['LOCALAPPDATA'] + r'\Google\Chrome\User Data\Local State'
local_state = "./Local State"
print(local_state)
key &#