修复info_filePath
This commit is contained in:
parent
cdce82f92f
commit
98430b75fe
10
doc/FAQ.md
10
doc/FAQ.md
@ -79,3 +79,13 @@
|
|||||||
|
|
||||||
1. 请检查参数是否正确,如果正确,请检查是否使用了中文输入法,如果使用了中文输入法,请切换为英文输入法
|
1. 请检查参数是否正确,如果正确,请检查是否使用了中文输入法,如果使用了中文输入法,请切换为英文输入法
|
||||||
2. 检查路径是否正确,如果路径中有空格,请使用英文双引号包裹路径
|
2. 检查路径是否正确,如果路径中有空格,请使用英文双引号包裹路径
|
||||||
|
|
||||||
|
- ### 十二、如何获取微信数据库路径/数据库目录是什么/数据库在哪
|
||||||
|
|
||||||
|
1. 打开微信电脑版,登录微信
|
||||||
|
2. 打开微信
|
||||||
|
3. 打开设置
|
||||||
|
4. 选择文件管理
|
||||||
|
5. 点打开文件夹
|
||||||
|
6. 进入MSG文件夹
|
||||||
|
7. 就是这个文件夹就是微信数据库目录
|
@ -107,15 +107,29 @@ def get_info_wxid(h_process):
|
|||||||
def get_info_filePath(wxid="all"):
|
def get_info_filePath(wxid="all"):
|
||||||
if not wxid:
|
if not wxid:
|
||||||
return "None"
|
return "None"
|
||||||
|
w_dir = "MyDocument:"
|
||||||
|
is_w_dir = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
user_profile = os.environ.get("USERPROFILE")
|
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Tencent\WeChat", 0, winreg.KEY_READ)
|
||||||
path_3ebffe94 = os.path.join(user_profile, "AppData", "Roaming", "Tencent", "WeChat", "All Users", "config",
|
value, _ = winreg.QueryValueEx(key, "FileSavePath")
|
||||||
"3ebffe94.ini")
|
winreg.CloseKey(key)
|
||||||
with open(path_3ebffe94, "r", encoding="utf-8") as f:
|
w_dir = value
|
||||||
w_dir = f.read()
|
is_w_dir = True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
w_dir = "MyDocument:"
|
w_dir = "MyDocument:"
|
||||||
|
|
||||||
|
if not is_w_dir:
|
||||||
|
try:
|
||||||
|
user_profile = os.environ.get("USERPROFILE")
|
||||||
|
path_3ebffe94 = os.path.join(user_profile, "AppData", "Roaming", "Tencent", "WeChat", "All Users", "config",
|
||||||
|
"3ebffe94.ini")
|
||||||
|
with open(path_3ebffe94, "r", encoding="utf-8") as f:
|
||||||
|
w_dir = f.read()
|
||||||
|
is_w_dir = True
|
||||||
|
except Exception as e:
|
||||||
|
w_dir = "MyDocument:"
|
||||||
|
|
||||||
if w_dir == "MyDocument:":
|
if w_dir == "MyDocument:":
|
||||||
try:
|
try:
|
||||||
# 打开注册表路径
|
# 打开注册表路径
|
||||||
|
31
tests/flassk_demo.py
Normal file
31
tests/flassk_demo.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# -*- coding: utf-8 -*-#
|
||||||
|
# -------------------------------------------------------------------------------
|
||||||
|
# Name: flassk_demo.py
|
||||||
|
# Description:
|
||||||
|
# Author: xaoyaoo
|
||||||
|
# Date: 2023/12/11
|
||||||
|
# -------------------------------------------------------------------------------
|
||||||
|
from flask import Flask, jsonify
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/api/demo', methods=["get",'POST'])
|
||||||
|
def demo():
|
||||||
|
# 模拟不同的API情况
|
||||||
|
# 0: 请求成功
|
||||||
|
r_data = {
|
||||||
|
'code': 0,
|
||||||
|
'body': {
|
||||||
|
'message': 'Success!',
|
||||||
|
'data': {
|
||||||
|
'key': 'value'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'msg': 'success',
|
||||||
|
'extra': {}
|
||||||
|
}
|
||||||
|
return jsonify(r_data)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run(debug=True)
|
Loading…
Reference in New Issue
Block a user