Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PC端尝试手动解密数据库,rekey返回值26 #17

Open
shagejack opened this issue Dec 5, 2023 · 4 comments
Open

PC端尝试手动解密数据库,rekey返回值26 #17

shagejack opened this issue Dec 5, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@shagejack
Copy link

想要解密一个几年前备份留下的Msg3.0.db,按照教程手动得到了该消息记录的账号的key替换了pcqq_rekey_to_none.cpp的313行,把Msg3.0.db和编译的a.exe丢到Bin下后运行a.exe,Msg3.0.db除了修改时间元数据变化没有任何改变(md5相同),输出如下:
open iRet=0
key iRet=0
====EXEC=========
exec iRet=0
rekey iRet=26
====END=========
我看到返回值26似乎是说被打开的文件不是一个数据库文件,这是数据库损坏了吗?为什么open,key和exec的返回值是正常的?

@Young-Lord
Copy link
Member

这个 cpp 调用的是当前版本(也就是运行目录下的相关dll)里的解密代码,如果这几年里tx更改了加密算法就可能用不了。
不过既然能 exec,导出的方法不止 rekey 一种,你可以试试 VACUUM, ATTACH 等等(当然,不能直接用,这就需要你再去找找资料了)

@Young-Lord
Copy link
Member

不过几年前备份的数据库是怎么得到key的?这个不是会变的吗

@shagejack
Copy link
Author

2022年1月备份的,两年前,key就是三天前从最新版本的QQ获取的,当时是备份了整个QQ目录,所以a.exe是放在当时版本的Bin目录里运行的。

@Young-Lord
Copy link
Member

Young-Lord commented Dec 9, 2023

这个 key 每次打开都会换的,我怀疑你获取到的 key 可能完全不能用
命令行没有其他输出了?正常(貌似)是会在callback函数里打印所有表名的

@Young-Lord Young-Lord added help wanted Extra attention is needed bug Something isn't working labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants