更新v2.3.0
This commit is contained in:
parent
1b8a7c7f8e
commit
d01aa57633
@ -71,7 +71,7 @@ def load_base64_img_data(start_time, end_time, username_md5, FileStorage_path):
|
||||
# 获取CreateTime的最大值日期
|
||||
min_time = time.strftime("%Y-%m", time.localtime(start_time))
|
||||
max_time = time.strftime("%Y-%m", time.localtime(end_time))
|
||||
img_path = os.path.join(FileStorage_path, "MsgAttach", username_md5, "Image")
|
||||
img_path = os.path.join(FileStorage_path, "MsgAttach", username_md5, "Image") if FileStorage_path else ""
|
||||
if not os.path.exists(img_path):
|
||||
return {}
|
||||
# print(min_time, max_time, img_path)
|
||||
|
@ -99,7 +99,7 @@ class BiasAddr:
|
||||
self.mobile = mobile.encode("utf-8")
|
||||
self.name = name.encode("utf-8")
|
||||
self.key = bytes.fromhex(key) if key else b""
|
||||
self.db_path = db_path if os.path.exists(db_path) else ""
|
||||
self.db_path = db_path if db_path and os.path.exists(db_path) else ""
|
||||
|
||||
self.process_name = "WeChat.exe"
|
||||
self.module_name = "WeChatWin.dll"
|
||||
@ -280,8 +280,8 @@ class BiasAddr:
|
||||
key_bias = self.get_key_bias2(self.db_path, account_bias) if key_bias <= 0 and self.db_path else key_bias
|
||||
|
||||
rdata = {self.version: [name_bias, account_bias, mobile_bias, 0, key_bias]}
|
||||
print(rdata)
|
||||
self.test()
|
||||
# print(rdata)
|
||||
# self.test()
|
||||
if version_list_path and os.path.exists(version_list_path):
|
||||
with open(version_list_path, "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
|
@ -8,6 +8,7 @@
|
||||
import json
|
||||
import ctypes
|
||||
import os
|
||||
import re
|
||||
import winreg
|
||||
import pymem
|
||||
from win32com.client import Dispatch
|
||||
@ -75,6 +76,7 @@ def get_info_filePath(wxid="all"):
|
||||
value, _ = winreg.QueryValueEx(key, "FileSavePath")
|
||||
winreg.CloseKey(key)
|
||||
w_dir = value
|
||||
print(0, w_dir)
|
||||
except Exception as e:
|
||||
# 获取文档实际目录
|
||||
try:
|
||||
@ -87,13 +89,19 @@ def get_info_filePath(wxid="all"):
|
||||
if "%" in documents_paths[0]:
|
||||
w_dir = os.environ.get(documents_paths[0].replace("%", ""))
|
||||
w_dir = os.path.join(w_dir, os.path.join(*documents_paths[1:]))
|
||||
print(1, w_dir)
|
||||
else:
|
||||
w_dir = documents_path
|
||||
print(2, w_dir)
|
||||
except Exception as e:
|
||||
profile = os.path.expanduser("~")
|
||||
profile = os.environ.get("USERPROFILE") # 获取用户目录
|
||||
w_dir = os.path.join(profile, "Documents")
|
||||
print(3, w_dir)
|
||||
if w_dir == "MyDocument:":
|
||||
profile = os.environ.get("USERPROFILE")
|
||||
w_dir = os.path.join(profile, "Documents")
|
||||
msg_dir = os.path.join(w_dir, "WeChat Files")
|
||||
|
||||
print(msg_dir)
|
||||
if wxid == "all" and os.path.exists(msg_dir):
|
||||
return msg_dir
|
||||
|
||||
@ -241,3 +249,9 @@ def get_wechat_db(require_list: Union[List[str], str] = "all", msg_dir: str = No
|
||||
print(f"[+] 共 {len(user_dirs)} 个微信账号")
|
||||
|
||||
return user_dirs
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
with open("version_list.json", "r", encoding="utf-8") as f:
|
||||
version_list = json.load(f)
|
||||
read_info(version_list, is_logging=True)
|
||||
|
Loading…
Reference in New Issue
Block a user