Skip to main content

wechat database manager.

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wxdb-0.0.8.tar.gz (1.0 MB view details)

Uploaded Source

File details

Details for the file wxdb-0.0.8.tar.gz.

File metadata

  • Download URL: wxdb-0.0.8.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for wxdb-0.0.8.tar.gz
Algorithm Hash digest
SHA256 d1f8eb1605606e5426056c165de20c6ddc29c2cc3ab2e3c7585028a253fc7f62
MD5 f2c62e21236a9e8cf1b70af92073c611
BLAKE2b-256 41091797d20f10a62aef546d7e27799d562ff8ce077f533fd5abf0a53cf832da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page