更新文档

This commit is contained in:
xaoyaoo 2023-12-06 09:57:45 +08:00
parent 5c9a88df8f
commit 76f4e7697a
4 changed files with 63 additions and 17 deletions

View File

@ -55,7 +55,7 @@
</details>
**更新计划**
**更新计划【由于家里有事,这些计划(除8、9、1)将会在12.30号前统一更新】**
* 1.每个人聊天记录分析,生成词云。
* 2.分析每个人每天的聊天数量,生成折线图(天-聊天数量)

31
doc/FAQ.md Normal file
View File

@ -0,0 +1,31 @@
## 怎么下载
方法一:进入链接[releases](https://github.com/xaoyaoo/PyWxDump/releases)下载最新版本exe文件
方法二本地安装有python环境使用pip安装
```
pip install PyWxDump
```
## 怎么使用
1. 打开微信电脑版,登录微信
2. 进入下载的exe文件所在目录,使用pip安装跳过此步
3. 按住shift键同时鼠标右键选择“在此处打开命令窗口”或者“在此处打开powershell窗口”
4. 在命令窗口中输入`PyWxDump`按回车键pip安装输入`wxdump`
5. 接着根据提示输入参数,回车键确认
## 每台电脑上微信账户的key是不是永远不会变
同一设备同一微信不删除数据情况下key密钥相同
## 刚打开就闪退的问题
1. 请检查是否由cmd或powershell打开不要直接双击exe文件
2. 如果使用方法二安装请检查是否已经安装了python环境如果使用pip安装命令行直接输入wxdump即可
3. 如果使用方法二安装检查是否将python安装目录添加到了环境变量中如果没有请添加
## 如果遇到其他问题
截图或复制错误信息,请全截图或全复制,不要只截一部分或复制部分信息。
通过issue反馈问题或者加入QQ群[加入QQ群](https://s.xaoyo.top/gOLUDl)

1
doc/UserGuide.md Normal file
View File

@ -0,0 +1 @@
用户指南

View File

@ -53,19 +53,31 @@ def pattern_scan_all(handle, pattern, *, return_multiple=False, find_num=100):
def get_info_wxid(h_process):
# find_num = 1000
# addrs = pattern_scan_all(h_process, br'\\FileStorage', return_multiple=True, find_num=find_num)
# wxids = []
# for addr in addrs:
# array = ctypes.create_string_buffer(33)
# if ReadProcessMemory(h_process, void_p(addr - 21), array, 33, 0) == 0: return "None"
# array = bytes(array) # .decode('utf-8', errors='ignore')
# array = array.split(br'\FileStorage')[0]
# for part in [b'}', b'\x7f', b'\\']:
# if part in array:
# array = array.split(part)[1]
# wxids.append(array.decode('utf-8', errors='ignore'))
# break
# wxid = max(wxids, key=wxids.count) if wxids else "None"
find_num = 100
addrs = pattern_scan_all(h_process, br'\\FileStorage', return_multiple=True, find_num=find_num)
addrs = pattern_scan_all(h_process, br'\\Msg\\FTSContact', return_multiple=True, find_num=find_num)
wxids = []
for addr in addrs:
array = ctypes.create_string_buffer(33)
if ReadProcessMemory(h_process, void_p(addr - 21), array, 33, 0) == 0: return "None"
array = bytes(array) # .decode('utf-8', errors='ignore')
array = array.split(br'\FileStorage')[0]
for part in [b'}', b'\x7f', b'\\']:
if part in array:
array = array.split(part)[1]
wxids.append(array.decode('utf-8', errors='ignore'))
break
array = ctypes.create_string_buffer(80)
if ReadProcessMemory(h_process, void_p(addr - 30), array, 80, 0) == 0: return "None"
array = bytes(array) # .split(b"\\")[0]
array = array.split(b"\\Msg")[0]
array = array.split(b"\\")[-1]
wxids.append(array.decode('utf-8', errors='ignore'))
wxid = max(wxids, key=wxids.count) if wxids else "None"
return wxid
@ -82,13 +94,14 @@ def get_info_filePath(wxid="all"):
# 获取文档实际目录
try:
# 打开注册表路径
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER,r"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders")
documents_path = winreg.QueryValueEx(key, "Personal")[0]# 读取文档实际目录路径
winreg.CloseKey(key) # 关闭注册表
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER,
r"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders")
documents_path = winreg.QueryValueEx(key, "Personal")[0] # 读取文档实际目录路径
winreg.CloseKey(key) # 关闭注册表
documents_paths = os.path.split(documents_path)
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:]))
w_dir = os.environ.get(documents_paths[0].replace("%", ""))
w_dir = os.path.join(w_dir, os.path.join(*documents_paths[1:]))
else:
w_dir = documents_path
except Exception as e:
@ -182,6 +195,7 @@ def read_info(version_list, is_logging=False):
return result
def get_wechat_db(require_list: Union[List[str], str] = "all", msg_dir: str = None, wxid: Union[List[str], str] = None,
is_logging: bool = False):
if not msg_dir:
@ -241,4 +255,4 @@ def get_wechat_db(require_list: Union[List[str], str] = "all", msg_dir: str = No
print("-" * 32)
print(f"[+] 共 {len(user_dirs)} 个微信账号")
return user_dirs
return user_dirs