diff --git a/README.md b/README.md index 562ad38..5b05485 100644 --- a/README.md +++ b/README.md @@ -89,8 +89,8 @@ qq交流群:[276392799](https://s.xaoyo.top/gOLUDl) or [276392799](https://s.x * 常见问题请参考[FAQ](https://github.com/xaoyaoo/PyWxDump/tree/master/doc/FAQ.md),更新日志请参考[CHANGELOG](https://github.com/xaoyaoo/PyWxDump/tree/master/doc/CHANGELOG.md) * Web UI的仓库位置 [wxdump_web](https://github.com/xaoyaoo/wxdump_web) * 如果对wxdump实现原理感兴趣,请关注公众号:`逍遥之芯`,回复:`原理` 获取原理解析。 - * [:sparkling\_heart: Support Me](https://github.com/xaoyaoo/xaoyaoo/blob/main/donate.md) +* 私有化定制开发请关注公众号:`逍遥之芯`,回复:`私有化定制` 。 ## 5. Star History diff --git a/pywxdump/__init__.py b/pywxdump/__init__.py index e1033d1..50849de 100644 --- a/pywxdump/__init__.py +++ b/pywxdump/__init__.py @@ -25,4 +25,4 @@ except: PYWXDUMP_ROOT_PATH = os.path.dirname(__file__) -__version__ = "2.4.56" +__version__ = "2.4.57" diff --git a/pywxdump/analyzer/db_parsing.py b/pywxdump/analyzer/db_parsing.py index 53facb4..9631965 100644 --- a/pywxdump/analyzer/db_parsing.py +++ b/pywxdump/analyzer/db_parsing.py @@ -206,8 +206,11 @@ def read_audio(MsgSvrID, is_play=False, is_wave=False, DB_PATH: str = "", rate=2 if len(DBdata) == 0: return False data = DBdata[0][0] # [1:] + b'\xFF\xFF' - pcm_data = read_audio_buf(data, is_play, is_wave, rate) - return pcm_data + try: + pcm_data = read_audio_buf(data, is_play, is_wave, rate) + return pcm_data + except Exception as e: + return False def wordcloud_generator(text, out_path="", is_show=False, img_path="", font="C:\Windows\Fonts\simhei.ttf"): diff --git a/pywxdump/api/api.py b/pywxdump/api/api.py index 4b513e1..671f4b4 100644 --- a/pywxdump/api/api.py +++ b/pywxdump/api/api.py @@ -309,6 +309,7 @@ def get_real_time_msg(): """ save_msg_path = read_session(g.sf, "msg_path") save_media_path = read_session(g.sf, "media_path") + save_micro_path = read_session(g.sf, "micro_path") wx_path = read_session(g.sf, "wx_path") key = read_session(g.sf, "key") @@ -316,15 +317,19 @@ def get_real_time_msg(): return ReJson(1002, body="msg_path or media_path or wx_path or key is required") media_paths = get_core_db(wx_path, ["MediaMSG"]) msg_paths = get_core_db(wx_path, ["MSG"]) + micro_paths = get_core_db(wx_path, ["MicroMsg"]) - if not media_paths[0] or not msg_paths[0]: + if not media_paths[0] or not msg_paths[0] or not micro_paths[0]: return ReJson(1001, body="media_paths or msg_paths is required") media_paths = media_paths[1] media_paths.sort() msg_paths = msg_paths[1] msg_paths.sort() + micro_paths = micro_paths[1] + micro_paths.sort() merge_real_time_db(key=key, db_path=media_paths[-1], merge_path=save_media_path) merge_real_time_db(key=key, db_path=msg_paths[-1], merge_path=save_msg_path) + merge_real_time_db(key=key, db_path=micro_paths[-1], merge_path=save_micro_path) return ReJson(0, "success") diff --git a/pywxdump/wx_info/merge_db.py b/pywxdump/wx_info/merge_db.py index 7a547fa..3a2d340 100644 --- a/pywxdump/wx_info/merge_db.py +++ b/pywxdump/wx_info/merge_db.py @@ -356,6 +356,9 @@ def merge_real_time_db(key, db_path: str, merge_path: str, CreateTime: int = 0, if not os.path.exists(db_path): raise FileNotFoundError("数据库不存在") + if "MSG" not in db_path and "MicroMsg" not in db_path and "MediaMSG" not in db_path: + raise FileNotFoundError("数据库不是消息数据库") # MicroMsg实时数据库 + out_path = "tmp_" + ''.join( random.choices('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', k=6)) + ".db" merge_path_base = os.path.dirname(merge_path) # 合并后的数据库路径 diff --git a/pywxdump/wx_info/tools/realTime.exe b/pywxdump/wx_info/tools/realTime.exe index d384058..499b256 100644 Binary files a/pywxdump/wx_info/tools/realTime.exe and b/pywxdump/wx_info/tools/realTime.exe differ