Skip to main content

wxdb

项目介绍

wxdb是一个微信数据库管理工具,可以查询微信数据库数据,解密微信数据库文件。

安装

pip install wxdb

代码示例

查询微信数据库

from wxdb import get_wx_db

try:
    wx_db = get_wx_db("v3")
    msg_db_name = wx_db.get_current_msg_db_name()
    conn = wx_db.create_connection(rf"Msg\Multi\{msg_db_name}")
    with conn:
        print(conn.execute("SELECT * FROM sqlite_master;").fetchall())
except Exception as e:
    wx_db = get_wx_db("v4")
    msg_db_name = wx_db.get_current_msg_db_name()
    conn = wx_db.create_connection(rf"db_storage\message\{msg_db_name}")
    with conn:
        print(conn.execute("SELECT * FROM sqlite_master;").fetchall())

解密微信数据库文件

import os

from wxdb import decrypt_db_file_v3, decrypt_db_file_v4, get_wx_info

decrypt_db_file = decrypt_db_file_v3

wx_info = get_wx_info()

with open("MSG0.db", "wb") as f:
    data = decrypt_db_file(
        path=os.path.join(wx_info["data_dir"], r"Msg\Multi\MSG0.db"),
        pkey=wx_info["key"]
    )
    f.write(data)

Release files for wxdb 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wxdb 0.0.9
File Size Uploaded
wxdb-0.0.9.tar.gz 1.0 MB Details

Release files / wxdb-0.0.9.tar.gz

Download URL wxdb-0.0.9.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
e063685255df69d5a6eaeeedd559e8c214ade5905b6c6236f0587197b12e5d2b
BLAKE2b-256 checksum
How to use checksums
a8f38202375c97fd267368201e46835b56ec37a79b994de07216b6aa672341ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.0.9 This release

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page