栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Decrypting Chromium cookies

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Decrypting Chromium cookies

您在正确的轨道上!我已经为此工作了几天,终于弄清楚了。(非常感谢OP提供了到Chromium源的有用链接。)

我张贴了一篇文章,其中包含更多细节和有效脚本,但这是基本思想:

#! /usr/bin/env python3from Crypto.Cipher import AESfrom Crypto.Protocol.KDF import PBKDF2# Function to get rid of paddingdef clean(x):     return x[:-x[-1]].depre('utf8')# replace with your encrypted_value from sqlite3encrypted_value = ENCRYPTED_VALUE# Trim off the 'v10' that Chrome/ium prependsencrypted_value = encrypted_value[3:]# Default values used by both Chrome and Chromium in OSX and Linuxsalt = b'saltysalt'iv = b' ' * 16length = 16# On Mac, replace MY_PASS with your password from Keychain# On Linux, replace MY_PASS with 'peanuts'my_pass = MY_PASSmy_pass = my_pass.enpre('utf8')# 1003 on Mac, 1 on Linuxiterations = 1003key = PBKDF2(my_pass, salt, length, iterations)cipher = AES.new(key, AES.MODE_CBC, IV=iv)decrypted = cipher.decrypt(encrypted_value)print(clean(decrypted))


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/669101.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号