fix 自动解密中获取主要数据库失败问题

This commit is contained in:
xaoyaoo 2024-01-23 11:22:16 +08:00
parent f2e6a0a484
commit 1ced36f7e3
3 changed files with 4 additions and 2 deletions

View File

@ -65,6 +65,7 @@ class MainWxInfo():
return sb_wx_info
def run(self, args):
print(f"[*] PyWxDump v{pywxdump.__version__}")
# 读取微信各版本偏移
path = args.version_list_path
save_path = args.save_path

View File

@ -304,10 +304,11 @@ def get_core_db(wx_path: str, db_type: list = None) -> [str]:
return False, f"[-] 目录不存在: {wx_path}"
db_type_all = ["MSG", "MediaMSG", "MicroMsg"]
db_type = [dt for dt in db_type if dt in db_type_all]
if not db_type:
db_type = db_type_all
db_type = [dt for dt in db_type if dt in db_type_all]
msg_dir = os.path.dirname(wx_path)
my_wxid = os.path.basename(wx_path)
WxDbPath = get_wechat_db('all', msg_dir, wxid=my_wxid, is_logging=False) # 获取微信数据库路径

View File

@ -301,7 +301,7 @@ def decrypt_merge(wx_path, key, outpath="", CreateTime: int = 0, endCreateTime:
my_wxid = os.path.basename(wx_path)
# 解密
code, wxdbpaths = get_core_db(wx_path)
code, wxdbpaths = get_core_db(wx_path, ["MSG", "MediaMSG", "MicroMsg"])
# 判断out_path是否为空目录
if os.path.exists(decrypted_path) and os.listdir(decrypted_path):