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)

Metadata

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 Provenance Actions
wxdb-0.0.9.tar.gz 1.0 MB Without provenance Details for wxdb-0.0.9.tar.gz

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

Security for wxdb 0.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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