Skip to main content

WDecipher is a third-party extension tool for WeChat that can decrypt WeChat SQLite databases and export and merge databases.

Project description

WDecipher

WDecipher (Wechat Database dECIPER) is a third-party extension tool for WeChat that can decrypt WeChat SQLite databases and export and merge databases. This enables various backend extension services such as data analysis and model training to be implemented on it.

WDecipher is a compressed version of PyWxDump with a small amount of code and interface optimization.

Features

  • Get the WeChat decryption key (db_key) for the SQLite database
  • Supports automatic search for the location and type of all databases
  • Allows to decrypt WeChat SQLite database based on the key
  • Allows merging different types of databases into one
  • Provides standard package-level interfaces and code comments to facilitate expansion and development

Interfaces

There are two package-level interfaces for you to use, namely wx_info.py and wx_db.py. For wx_info.py, it provides interfaces for obtaining WeChat account information, mainly including:

  • get_wx_pids() -> List[int]: Returns all currently running WeChat process ids
  • get_wxid(process) -> Optional[str]: Retrieves the wxid of the specified WeChat process login
  • get_wx_dir(wxid: str, process=None) -> Optional[str]: Finds the working directory of the specified WeChat id
  • verify_db_key(db_key: bytes, db_path: str) -> bool: Verifies that the key is valid by decrypting the specified database
  • get_db_key(process, wx_dir: str, **kwargs: Any) -> Optional[bytes]: Retrieves the database decryption key
  • get_wx_info(pid: int) -> Dict[str, str]: Returns the account information of the current online WeChat process
  • *get_wx_infos() -> List[Dict[str, str]]: Returns all currently running WeChat account information

For wx_db.py, it provides interfaces for WeChat database operations, mainly including:

  • *get_wx_dbs(wx_dir: str, db_types: Optional[str | List[str]] = None) -> List[Dict[str, str]]: Returns all databases of the specified type that exist in the specified WeChat working directory
  • merge_wx_db(srcs: List[str], dest: str, verbose: bool = True) -> None: Merges multiple WeChat databases of the same type into one
  • decrypt_wx_db(key: str, db_path: str, out_path: str) -> None: Decrypt the WeChat database.
  • *batch_decrypt_wx_db(key: str, dbs: List[Dict[str, str]], out_dir: str, merge_db: bool = True, verbose: bool = True) -> None: Batch decryption of WeChat database

If there is no development purpose, the interfaces marked with * can complete most of the work. Here is an example (before you execute the following script you need ensure your WeChat account logined):

from wdecipher import get_wx_infos, get_wx_dbs, batch_decrypt_wx_db

info = get_wx_infos()[0]
db_key, wx_dir = info["db_key"], info["wx_dir"]

out_dir = "/tmp/decrypted_db"
dbs = get_wx_dbs(wx_dir)
batch_decrypt_wx_db(db_key, dbs, out_dir)

Supported platforms

The support for each platform is shown in the following table. MacOS is being supported in the future and a unified access interface will be provided. For mobile devices, no further support is considered. If there are related services, please refer to Migrate WeChat Chat History and then perform subsequent operations on the PC.

Platform Supported
Windows >= 10 Yes
MacOS No
Android or IOS No

Disclaimer

  • This project is only for learning and communication purposes, do not use it for illegal purposes, otherwise the consequences will be borne by yourself
  • Users understand and agree that any violation of laws and regulations, infringement of the legitimate rights and interests of others, is unrelated to this project and its developers, and the consequences are borne by the user themselves

Acknowledgments

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

wdecipher-0.0.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distributions

wdecipher-0.0.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

wdecipher-0.0.1-py2.py3-none-any.whl (16.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file wdecipher-0.0.1.tar.gz.

File metadata

  • Download URL: wdecipher-0.0.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for wdecipher-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6eb1605a5f4c9f42b7016ead4e37b280e0e7bb9f357140bfb511a26f80e737c8
MD5 6d314318234006beacc82080e2ae0a0c
BLAKE2b-256 9e38c72ec16b5ac3d55f9f93968ddbf75ff19266b72ec2d4cc51e4bb22ec001c

See more details on using hashes here.

File details

Details for the file wdecipher-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: wdecipher-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for wdecipher-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 571ee1665c62b5b79ea456332a9c7b7ad7351169ea10121a81ed19f8e19fe15a
MD5 6dd673b91c403b0cd2657a0e8b281455
BLAKE2b-256 141ce302e0a95b8507892118d688b0a84ae0c60eede5a2c0e25acb613a9fe4e2

See more details on using hashes here.

File details

Details for the file wdecipher-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: wdecipher-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for wdecipher-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 543c7987009b5b65e1b22f7374b5cab4d3a3f84f31c4165b92a8b8a6e3cb902f
MD5 38c881387692ad40e514e955d637cfbd
BLAKE2b-256 26cf3cddcbd24affc9c7ad713a9be8b8f470e808ba12999d91197a177358c866

See more details on using hashes here.

Supported by

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