相关疑难解决方法(0)

解密铬饼干

我正在尝试在Python中使用Chromium cookie,因为Chromium使用AES(使用CBC)对其cookie进行加密,我需要对此进行反转.

我可以从OS X的Keychain中恢复AES密钥(它存储在Base 64中):

security find-generic-password -w -a Chrome -s Chrome Safe Storage
# From Python:
python -c 'from subprocess import PIPE, Popen; print(Popen(['security', 'find-generic-password', '-w', '-a', 'Chrome', '-s', 'Chrome Safe Storage'], stdout=PIPE).stdout.read().strip())'
Run Code Online (Sandbox Code Playgroud)

这是我的代码,我所缺少的是解密cookie:

from subprocess import PIPE, Popen
from sqlite3 import dbapi2

def get_encryption_key():
  cmd = ['security', 'find-generic-password', '-w', '-a', 'Chrome', '-s', 'Chrome Safe Storage']
  return Popen(cmd, stdout=PIPE).stdout.read().strip().decode('base-64')

def get_cookies(database):
  key = get_encryption_key()
  with dbapi2.connect(database) as conn:
    conn.rollback()
    rows = conn.cursor().execute('SELECT name, encrypted_value FROM cookies WHERE host_key like …
Run Code Online (Sandbox Code Playgroud)

c++ python cookies google-chrome chromium

12
推荐指数
2
解决办法
8570
查看次数

Visual Studio 如何加密 .pubxml.user 文件中的密码?

当您告诉 Visual Studio 保存发布配置文件的密码时,它会.pubxml.user在您的发布文件旁边创建一个文件,如下所示:

<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. 
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <TimeStampOfAssociatedLegacyPublishXmlFile />
    <EncryptedPassword>AQAAANC[...]</EncryptedPassword>
  </PropertyGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)

Visual Studio 实际上如何加密元素中的密码EncryptedPassword?我想解密它,因为我忘记了密码......现在它只是加密存储在这个文件中!

encryption passwords visual-studio webdeploy visual-studio-2019

7
推荐指数
1
解决办法
1125
查看次数