用 Python 解密 Chrome Linux BLOB 加密的 cookie [英] Decrypt Chrome Linux BLOB encrypted cookies in Python
问题描述
我在 Ubuntu 中使用 Chrome 33+,我看到 cookie 以 BLOB 结构加密:
I have Chrome 33+ in Ubuntu and I see that the cookies are encrypted in a BLOB structure:
CREATE TABLE cookies (creation_utc INTEGER NOT NULL UNIQUE PRIMARY KEY,host_key TEXT NOT NULL,name TEXT NOT NULL,value TEXT NOT NULL,path TEXT NOT NULL,expires_utc INTEGER NOT NULL,secure INTEGER NOT NULL,httponly INTEGERNOT NULL,last_access_utc INTEGER NOT NULL, has_expires INTEGER NOT NULL DEFAULT 1, 持久性 INTEGER NOT NULL DEFAULT 1,priority INTEGER NOT NULL DEFAULT 1,encrypted_value BLOB DEFAULT '');
我想写一个python脚本来解密cookie.我已经看到 Chrome 33 Beta 的 Cookie 问题 但依赖于CryptUnprotectData
它是一个 Windows API.
I would like to write a python script to decrypt the cookie. I've seen that there is Cookie issue with Chrome 33 Beta but relies in CryptUnprotectData
that it's a Windows API.
首先我想知道cookies是如何加密的.我已经阅读了 3DES 和 AES,但我找不到可靠的来源来获取信息.
First of all I would like to know how are the cookies encrypted. I've read 3DES and AES but I don't find a trusty source to get the info.
如果我有关于如何做的信息,我会编写代码来进行必要的加密和解密.
I will write the code to do the necessary encryption and decryption if I have info about how to do it.
谢谢
推荐答案
我已经在这里发布了一个示例 Python 脚本用于在 OSX 或 Linux 中解码加密的 cookie.
I've posted an example Python script here for decoding the encrypted cookies in either OSX or Linux.
这篇关于用 Python 解密 Chrome Linux BLOB 加密的 cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!