wxutil
微信3.x图片解密
import pathlib
from wxutil.dat import find_key, decrypt_dat
xor_key, aes_key = find_key(pathlib.Path(r"C:\Users\<username>\Documents\WeChat Files\<wxid>"), version=3)
data = decrypt_dat(
r"C:\Users\<username>\Documents\WeChat Files\<wxid>\FileStorage\Image\2024-11\00f0395964ec76d2406f15cc69c4e566.dat",
xor_key)
with open("00f0395964ec76d2406f15cc69c4e566.png", "wb") as f:
f.write(data)
微信3.x消息监听
from wxutil.db.v3 import WeChatDB, ALL_MESSAGE
wechat_db = WeChatDB()
@wechat_db.handle(ALL_MESSAGE)
def _(wechat_db, event):
print(event)
wechat_db.run()
微信4.x消息监听
from wxutil.db.v4 import WeChatDB, ALL_MESSAGE
from wxutil.utils import get_wechat4_key
import psutil
def get_wechat_pid():
for proc in psutil.process_iter(["pid", "name"]):
try:
if proc.info["name"].lower() == "weixin.exe":
return proc.info["pid"]
except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
pass
return None
key = get_wechat4_key()
pid = get_wechat_pid()
if pid is None:
raise Exception("未找到微信进程")
wechat_db = WeChatDB(
pid=pid,
key=key,
data_dir=r"C:\Users\<username>\xwechat_files\<wxid>"
)
@wechat_db.handle(ALL_MESSAGE)
def _(wechat_db, event):
print(event)
wechat_db.run()
Metadata
Release files for wxutil 0.0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wxutil-0.0.15.tar.gz | 1.5 MB | Without provenance | Details for wxutil-0.0.15.tar.gz |
Release files / wxutil-0.0.15.tar.gz
| Download URL | wxutil-0.0.15.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e32dbdc2394278cbecd50116f9f19e665ed77efe206b9555e2fe20ff57b5d6ba
|
|
BLAKE2b-256 checksum How to use checksums |
f1923f20e37806ca7afed2733ac8b12d8f99653fc3ce4da900b304f633a41104
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for wxutil 0.0.15
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.