添加test文件,添加自动构建可执行文件的脚本

This commit is contained in:
xaoyo committed 2023-11-15 15:25:02 +08:00
1 parent 342b323c12
commit 950ab10bef
5 files changed
+72 -7

No files matched your search

+9 -3
View File
@@ -10,6 +10,12 @@ from pywxdump import VERSION_LIST_PATH, VERSION_LIST
from pywxdump.bias_addr import BiasAddr
from pywxdump.wx_info import read_info
# bias = BiasAddr("12345678901", "test", "test", "test", "test").run()
wx_info = read_info(VERSION_LIST)
print(wx_info)
mobile = '13800138000'
name = '张三'
account = 'xxxxxx'
key = None # "xxxxxx"
db_path = None # "xxxxxx"
vlp = None # VERSION_LIST_PATH
# 调用 run 函数,并传入参数
rdata = BiasAddr(account, mobile, name, key, db_path).run(True, vlp)
+37
View File
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-#
# -------------------------------------------------------------------------------
# Name: test_dbshow.py
# Description: 显示数据库聊天记录
# Author: xaoyaoo
# Date: 2023/11/15
# -------------------------------------------------------------------------------
try:
from flask import Flask, request, jsonify, render_template, g
import logging
from pywxdump.show_chat.main_window import app_show_chat, get_user_list
except Exception as e:
print(e)
print("[-] 请安装flask( pip install flask )")
assert "[-] 请安装flask( pip install flask )"
app = Flask(__name__, template_folder='./show_chat/templates')
app.logger.setLevel(logging.ERROR)
msg_path = r"xxxxxx"
micro_path = r"xxxxxx"
media_path = r"xxxxxx"
filestorage_path = r"xxxxxx"
@app.before_request
def before_request():
g.MSG_ALL_db_path = msg_path
g.MicroMsg_db_path = micro_path
g.MediaMSG_all_db_path = media_path
g.FileStorage_path = filestorage_path
g.USER_LIST = get_user_list(msg_path, micro_path)
app.register_blueprint(app_show_chat)
print("[+] 请使用浏览器访问 http://127.0.0.1:5000/ 查看聊天记录")
app.run(debug=False)
+16
View File
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-#
# -------------------------------------------------------------------------------
# Name: test_decrypt.py
# Description:
# Author: xaoyaoo
# Date: 2023/11/15
# -------------------------------------------------------------------------------
from pywxdump import VERSION_LIST_PATH, VERSION_LIST
from pywxdump import batch_decrypt
key = "xxxxxx" # 解密密钥
db_path = "xxxxxx" # 数据库路径(文件or文件list)
out_path = "xxxxxx" # 输出路径(目录)
result = batch_decrypt(key, db_path, out_path, True)
+6 -3
View File
@@ -5,6 +5,9 @@
# Author: xaoyaoo
# Date: 2023/10/21
# -------------------------------------------------------------------------------
from pywxdump import get_wechat_db
user_dirs = get_wechat_db(require_list=["MediaMSG", "MicroMsg", "FTSMSG", "MSG", "Sns", "Emotion"])
print(user_dirs)
from pywxdump.wx_info import read_info
from pywxdump import VERSION_LIST_PATH, VERSION_LIST
result = read_info(VERSION_LIST, is_logging=True) # 读取微信信息